You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Akmal Abbasov <ak...@gmail.com> on 2015/12/03 16:59:47 UTC

Problems getting started with Phoenix

Hi,
I have Hadoop/HBase cluster with 4 nodes, 2 masters and 2 slaves, and a
zookeeper server.
Hadoop HDFS is running in HA mode. I'm using HBase 0.98.x and Hadoop 2.5.x.
I download phoenix-4.6.0-HBase-0.98-bin.tar.gz, put it to one of master
nodes.
Put phoenix-4.6.0-HBase-0.98-server.jar into $HBASE_HOME/lib for all nodes.
Then tried
phoenix-4.6.0-HBase-0.98-bin/bin/sqlline.py zk1
and got

Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:zk1 none none
org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:zk1
15/12/03 16:54:18 WARN util.NativeCodeLoader: Unable to load native-hadoop
library for your platform... using builtin-java classes where applicable
Error: ERROR 103 (08004): Unable to establish connection.
(state=08004,code=103)
java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
at
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:396)
at
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:298)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:179)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1919)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1898)
at
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:78)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1898)
at
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
at
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
at sqlline.Commands.connect(Commands.java:1064)
at sqlline.Commands.connect(Commands.java:996)
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:497)
at
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
at sqlline.SqlLine.dispatch(SqlLine.java:804)
at sqlline.SqlLine.initArgs(SqlLine.java:588)
at sqlline.SqlLine.begin(SqlLine.java:656)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
at
org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:459)
at
org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:352)
at
org.apache.phoenix.query.HConnectionFactory$HConnectionFactoryImpl.createConnection(HConnectionFactory.java:47)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:296)
... 22 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at
org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:457)
... 25 more
Caused by: java.lang.ExceptionInInitializerError
at org.apache.hadoop.hbase.ClusterId.parseFrom(ClusterId.java:64)
at
org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:69)
at
org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:83)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.retrieveClusterId(HConnectionManager.java:907)
at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:701)
... 30 more
Caused by: java.lang.IllegalArgumentException:
java.net.UnknownHostException: hdfs1
at
org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:418)
at
org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:231)
at
org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:139)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:510)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:453)
at
org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:136)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2433)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:287)
at
org.apache.hadoop.hbase.util.DynamicClassLoader.<init>(DynamicClassLoader.java:104)
at
org.apache.hadoop.hbase.protobuf.ProtobufUtil.<clinit>(ProtobufUtil.java:204)
... 35 more
Caused by: java.net.UnknownHostException: hdfs1
... 49 more
sqlline version 1.1.8

Any suggestions?
Thank you.

Regards, Akmal

Re: Problems getting started with Phoenix

Posted by Akmal Abbasov <ak...@gmail.com>.
Hi Thomas,
The thing is that I'm getting "Caused by: java.net.UnknownHostException:
hdfs1" error.
hdfs1 is the fs.defaultFS property value which is defined in core-site.xml
of hdfs.
While for "zkCli.sh get /hbase/master" I'm getting hbase-m2 which is active
hbase master.
Any ideas, why it could happen?
Thank you.

Regards, Akmal

p.s. I'm running "phoenix-4.6.0-HBase-0.98-bin/bin/sqlline.py zk1" from one
of the hbase masters, if it's relevant



Kind regards,
Akmal Abbasov

On Thu, Dec 3, 2015 at 6:17 PM, Thomas Decaux <eb...@gmail.com> wrote:

> UnknownHostException
>
> Which means HBase host is not resolved.
>
> On zookeeper server, run "zkCli.sh get /hbase/master"to find the HBase
> host.
>
> 2015-12-03 16:59 GMT+01:00 Akmal Abbasov <ak...@gmail.com>:
>
>> Hi,
>> I have Hadoop/HBase cluster with 4 nodes, 2 masters and 2 slaves, and a
>> zookeeper server.
>> Hadoop HDFS is running in HA mode. I'm using HBase 0.98.x and Hadoop
>> 2.5.x.
>> I download phoenix-4.6.0-HBase-0.98-bin.tar.gz, put it to one of master
>> nodes.
>> Put phoenix-4.6.0-HBase-0.98-server.jar into $HBASE_HOME/lib for all
>> nodes.
>> Then tried
>> phoenix-4.6.0-HBase-0.98-bin/bin/sqlline.py zk1
>> and got
>>
>> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
>> issuing: !connect jdbc:phoenix:zk1 none none
>> org.apache.phoenix.jdbc.PhoenixDriver
>> Connecting to jdbc:phoenix:zk1
>> 15/12/03 16:54:18 WARN util.NativeCodeLoader: Unable to load
>> native-hadoop library for your platform... using builtin-java classes where
>> applicable
>> Error: ERROR 103 (08004): Unable to establish connection.
>> (state=08004,code=103)
>> java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
>> at
>> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:396)
>> at
>> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:298)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:179)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1919)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1898)
>> at
>> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:78)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1898)
>> at
>> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
>> at
>> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
>> at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
>> at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
>> at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
>> at sqlline.Commands.connect(Commands.java:1064)
>> at sqlline.Commands.connect(Commands.java:996)
>> 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:497)
>> at
>> sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
>> at sqlline.SqlLine.dispatch(SqlLine.java:804)
>> at sqlline.SqlLine.initArgs(SqlLine.java:588)
>> at sqlline.SqlLine.begin(SqlLine.java:656)
>> at sqlline.SqlLine.start(SqlLine.java:398)
>> at sqlline.SqlLine.main(SqlLine.java:292)
>> Caused by: java.io.IOException:
>> java.lang.reflect.InvocationTargetException
>> at
>> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:459)
>> at
>> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:352)
>> at
>> org.apache.phoenix.query.HConnectionFactory$HConnectionFactoryImpl.createConnection(HConnectionFactory.java:47)
>> at
>> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:296)
>> ... 22 more
>> Caused by: java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>> at
>> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:457)
>> ... 25 more
>> Caused by: java.lang.ExceptionInInitializerError
>> at org.apache.hadoop.hbase.ClusterId.parseFrom(ClusterId.java:64)
>> at
>> org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:69)
>> at
>> org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:83)
>> at
>> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.retrieveClusterId(HConnectionManager.java:907)
>> at
>> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:701)
>> ... 30 more
>> Caused by: java.lang.IllegalArgumentException:
>> java.net.UnknownHostException: hdfs1
>> at
>> org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:418)
>> at
>> org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:231)
>> at
>> org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:139)
>> at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:510)
>> at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:453)
>> at
>> org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:136)
>> at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2433)
>> at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
>> at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467)
>> at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449)
>> at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)
>> at org.apache.hadoop.fs.Path.getFileSystem(Path.java:287)
>> at
>> org.apache.hadoop.hbase.util.DynamicClassLoader.<init>(DynamicClassLoader.java:104)
>> at
>> org.apache.hadoop.hbase.protobuf.ProtobufUtil.<clinit>(ProtobufUtil.java:204)
>> ... 35 more
>> Caused by: java.net.UnknownHostException: hdfs1
>> ... 49 more
>> sqlline version 1.1.8
>>
>> Any suggestions?
>> Thank you.
>>
>> Regards, Akmal
>>
>>
>>
>

Re: Problems getting started with Phoenix

Posted by Thomas Decaux <eb...@gmail.com>.
UnknownHostException

Which means HBase host is not resolved.

On zookeeper server, run "zkCli.sh get /hbase/master"to find the HBase host.

2015-12-03 16:59 GMT+01:00 Akmal Abbasov <ak...@gmail.com>:

> Hi,
> I have Hadoop/HBase cluster with 4 nodes, 2 masters and 2 slaves, and a
> zookeeper server.
> Hadoop HDFS is running in HA mode. I'm using HBase 0.98.x and Hadoop 2.5.x.
> I download phoenix-4.6.0-HBase-0.98-bin.tar.gz, put it to one of master
> nodes.
> Put phoenix-4.6.0-HBase-0.98-server.jar into $HBASE_HOME/lib for all nodes.
> Then tried
> phoenix-4.6.0-HBase-0.98-bin/bin/sqlline.py zk1
> and got
>
> Setting property: [isolation, TRANSACTION_READ_COMMITTED]
> issuing: !connect jdbc:phoenix:zk1 none none
> org.apache.phoenix.jdbc.PhoenixDriver
> Connecting to jdbc:phoenix:zk1
> 15/12/03 16:54:18 WARN util.NativeCodeLoader: Unable to load native-hadoop
> library for your platform... using builtin-java classes where applicable
> Error: ERROR 103 (08004): Unable to establish connection.
> (state=08004,code=103)
> java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
> at
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:396)
> at
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:298)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:179)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1919)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1898)
> at
> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:78)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1898)
> at
> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
> at
> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
> at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
> at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
> at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
> at sqlline.Commands.connect(Commands.java:1064)
> at sqlline.Commands.connect(Commands.java:996)
> 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:497)
> at
> sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
> at sqlline.SqlLine.dispatch(SqlLine.java:804)
> at sqlline.SqlLine.initArgs(SqlLine.java:588)
> at sqlline.SqlLine.begin(SqlLine.java:656)
> at sqlline.SqlLine.start(SqlLine.java:398)
> at sqlline.SqlLine.main(SqlLine.java:292)
> Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
> at
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:459)
> at
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:352)
> at
> org.apache.phoenix.query.HConnectionFactory$HConnectionFactoryImpl.createConnection(HConnectionFactory.java:47)
> at
> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:296)
> ... 22 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
> at
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:457)
> ... 25 more
> Caused by: java.lang.ExceptionInInitializerError
> at org.apache.hadoop.hbase.ClusterId.parseFrom(ClusterId.java:64)
> at
> org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:69)
> at
> org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:83)
> at
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.retrieveClusterId(HConnectionManager.java:907)
> at
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:701)
> ... 30 more
> Caused by: java.lang.IllegalArgumentException:
> java.net.UnknownHostException: hdfs1
> at
> org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:418)
> at
> org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:231)
> at
> org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:139)
> at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:510)
> at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:453)
> at
> org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:136)
> at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2433)
> at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
> at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467)
> at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2449)
> at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:367)
> at org.apache.hadoop.fs.Path.getFileSystem(Path.java:287)
> at
> org.apache.hadoop.hbase.util.DynamicClassLoader.<init>(DynamicClassLoader.java:104)
> at
> org.apache.hadoop.hbase.protobuf.ProtobufUtil.<clinit>(ProtobufUtil.java:204)
> ... 35 more
> Caused by: java.net.UnknownHostException: hdfs1
> ... 49 more
> sqlline version 1.1.8
>
> Any suggestions?
> Thank you.
>
> Regards, Akmal
>
>
>