phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle R Stehbens (Jira)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-6119) UngroupedAggregateRegionObserver Malformed connection url Error thrown when using a zookeeper quorum
Date Tue, 15 Sep 2020 19:01:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-6119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kyle R Stehbens updated PHOENIX-6119:
-------------------------------------
    Attachment:     (was: phoenix-master-v1.patch)

> UngroupedAggregateRegionObserver Malformed connection url Error thrown when using a zookeeper
quorum
> ----------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6119
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6119
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.1.0
>            Reporter: Kyle R Stehbens
>            Priority: Major
>             Fix For: 5.1.0
>
>         Attachments: PHOENIX-6119.master.patch
>
>
> When using Phoenix with a HBase instance configured with a HA zookeeper quorum URL like
the following:
> hbase.zookeeper.quorum='zk1:2181,zk2:2181,zk3:2181'
> Phoenix throws exceptions when trying to collect statistics as follows:
> {noformat}
> 2020-09-09 21:19:45,806 INFO [regionserver/regionserver1:16040-shortCompactions-0] util.QueryUtil:
Creating connection with the jdbc url: jdbc:phoenix:zk1:2181,zk2:2181,zk3:2181:2181:/hbase;
>  2020-09-09 21:19:45,808 WARN [regionserver/regionserver1:16040-shortCompactions-0] coprocessor.UngroupedAggregateRegionObserver:
Unable to collect stats for test_namespace:test_table
>  java.io.IOException: java.sql.SQLException: ERROR 102 (08001): Malformed connection
url. :zk1:2181,zk2:2181,zk3:2181:2181:/hbase;
>  at org.apache.phoenix.schema.stats.DefaultStatisticsCollector.init(DefaultStatisticsCollector.java:124)
>  at org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver$5.run(UngroupedAggregateRegionObserver.java:1097)
>  at org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver$5.run(UngroupedAggregateRegionObserver.java:1082)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at javax.security.auth.Subject.doAs(Subject.java:422)
>  at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  at org.apache.hadoop.security.SecurityUtil.doAsUser(SecurityUtil.java:517)
>  at org.apache.hadoop.security.SecurityUtil.doAsLoginUser(SecurityUtil.java:498)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at org.apache.hadoop.hbase.util.Methods.call(Methods.java:40)
>  at org.apache.hadoop.hbase.security.User.runAsLoginUser(User.java:192)
>  at org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver.preCompact(UngroupedAggregateRegionObserver.java:1081)
>  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$8.call(RegionCoprocessorHost.java:656)
>  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$8.call(RegionCoprocessorHost.java:652)
>  at org.apache.hadoop.hbase.coprocessor.CoprocessorHost$ObserverOperationWithResult.callObserver(CoprocessorHost.java:600)
>  at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.execOperation(CoprocessorHost.java:636)
>  at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.execOperationWithResult(CoprocessorHost.java:614)
>  at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preCompact(RegionCoprocessorHost.java:650)
>  at org.apache.hadoop.hbase.regionserver.compactions.Compactor.postCompactScannerOpen(Compactor.java:288)
>  at org.apache.hadoop.hbase.regionserver.compactions.Compactor.compact(Compactor.java:317)
>  at org.apache.hadoop.hbase.regionserver.compactions.DefaultCompactor.compact(DefaultCompactor.java:65)
>  at org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompactionContext.compact(DefaultStoreEngine.java:126)
>  at org.apache.hadoop.hbase.regionserver.HStore.compact(HStore.java:1454)
>  at org.apache.hadoop.hbase.regionserver.HRegion.compact(HRegion.java:2260)
>  at org.apache.hadoop.hbase.regionserver.CompactSplit$CompactionRunner.doCompaction(CompactSplit.java:616)
>  at org.apache.hadoop.hbase.regionserver.CompactSplit$CompactionRunner.run(CompactSplit.java:658)
>  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)
>  Caused by: java.sql.SQLException: ERROR 102 (08001): Malformed connection url. :zk1:2181,zk2:2181,zk3:2181:2181:/hbase;
>  at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:570)
>  at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:195)
>  at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver$ConnectionInfo.getMalFormedUrlException(PhoenixEmbeddedDriver.java:204)
>  at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver$ConnectionInfo.create(PhoenixEmbeddedDriver.java:262)
>  at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:232)
>  at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:144)
>  at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
>  at java.sql.DriverManager.getConnection(DriverManager.java:664)
>  at java.sql.DriverManager.getConnection(DriverManager.java:208)
>  at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:422)
>  at org.apache.phoenix.util.QueryUtil.getConnectionOnServer(QueryUtil.java:400)
>  at org.apache.phoenix.util.QueryUtil.getConnectionOnServer(QueryUtil.java:381)
>  at org.apache.phoenix.schema.stats.DefaultStatisticsCollector.getGuidePostDepthFromSystemCatalog(DefaultStatisticsCollector.java:183)
>  at org.apache.phoenix.schema.stats.DefaultStatisticsCollector.initGuidepostDepth(DefaultStatisticsCollector.java:147)
>  at org.apache.phoenix.schema.stats.DefaultStatisticsCollector.init(DefaultStatisticsCollector.java:122){noformat}
>  
> This is because it is appending an extra default zookeeper port :2181 even though the
zookeeper quorum specifies ports for each host and not adjusting the ZK hosts to remove the
extra provided ports to create a valid JDBC connection string.
> This happens at this line of code:
> [https://github.com/apache/phoenix/blob/f5cc0ad49f13283fefccddf1b187da95eecdb423/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java#L439]
> Because the port here is always appended to the  ZK quorum connection string.
> The ZK connection string in HBase may specify the ports for each host, which results
in a malformed JDBC URL as Phoenix expects that only 1 port is append at the end of the comma
separated ZK host list.
> This exception results in no statistics ever being populated in the system stats table
for any phoenix tables/indices when using a zookeeper quorum with ports specified.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message