forcedotcom / phoenix

BSD 3-Clause "New" or "Revised" License
558 stars 227 forks source link

Can not connect Hbase #68

Closed guowseu closed 11 years ago

guowseu commented 11 years ago

Dear ,

I use the following command to connect to zk using phoenix. But I can not connect to the hbase and make test.

java -jar phoenix-1.0-client.jar 192.168.1.198:2181 examples/stock_symbol.sql

The following error returned from phoenix.

And when I use SquirreLSQL, It comes the same exception. Please help me find why. Thanks a lot.

Hbase version: 0.94.1 Zk Version: 3.4.3

The exception is as following:

13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.3-1240972, built on 02/06/2012 10:48 GMT 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:host.name=wbtest02 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:java.version=1.7.0_09 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Oracle Corporation 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/lib/java/jdk1.7/jre 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:java.class.path=phoenix-1.0-client.jar 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:java.compiler= 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:os.version=3.5.0-17-generic 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:user.name=hadoop 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/hadoop 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Client environment:user.dir=/home/hadoop/hbase 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.1.198:2181 sessionTimeout=180000 watcher=hconnection 13/02/22 16:53:13 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.1.198:2181 13/02/22 16:53:13 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 32682@wbtest02 13/02/22 16:53:13 INFO client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration. 13/02/22 16:53:13 INFO zookeeper.ClientCnxn: Socket connection established to wbtest02/192.168.1.198:2181, initiating session 13/02/22 16:53:13 INFO zookeeper.ClientCnxn: Session establishment complete on server wbtest02/192.168.1.198:2181, sessionid = 0x13ce72e6de4023f, negotiated timeout = 40000 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.1.198:2181 sessionTimeout=180000 watcher=hconnection 13/02/22 16:53:13 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.1.198:2181 13/02/22 16:53:13 INFO client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration. 13/02/22 16:53:13 INFO zookeeper.ClientCnxn: Socket connection established to wbtest02/192.168.1.198:2181, initiating session 13/02/22 16:53:13 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 32682@wbtest02 13/02/22 16:53:13 INFO zookeeper.ClientCnxn: Session establishment complete on server wbtest02/192.168.1.198:2181, sessionid = 0x13ce72e6de40240, negotiated timeout = 40000 13/02/22 16:53:13 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x13ce72e6de4023f 13/02/22 16:53:13 INFO zookeeper.ZooKeeper: Session: 0x13ce72e6de4023f closed 13/02/22 16:53:13 INFO zookeeper.ClientCnxn: EventThread shut down 13/02/22 16:53:13 WARN client.HConnectionManager$HConnectionImplementation: Error executing for row java.util.concurrent.ExecutionException: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.TABLE: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252) at java.util.concurrent.FutureTask.get(FutureTask.java:111) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processExecs(HConnectionManager.java:1453) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:605) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:639) at com.salesforce.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:315) at com.salesforce.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:78) at com.salesforce.phoenix.jdbc.PhoenixStatement$ExecutableCreateTableStatement.executeUpdate(PhoenixStatement.java:271) at com.salesforce.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:657) at com.salesforce.phoenix.util.SchemaUtil.initMetaData(SchemaUtil.java:314) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:720) at com.salesforce.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:95) at com.salesforce.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:100) at java.sql.DriverManager.getConnection(DriverManager.java:579) at java.sql.DriverManager.getConnection(DriverManager.java:243) at com.salesforce.phoenix.util.PhoenixRuntime.main(PhoenixRuntime.java:154) Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.TABLE: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:95) at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:79) at org.apache.hadoop.hbase.client.ServerCallable.translateException(ServerCallable.java:228) at org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:166) at org.apache.hadoop.hbase.ipc.ExecRPCInvoker.invoke(ExecRPCInvoker.java:79) at $Proxy7.createTable(Unknown Source) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl$8.call(ConnectionQueryServicesImpl.java:643) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl$8.call(ConnectionQueryServicesImpl.java:640) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.TABLE: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at com.salesforce.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:49) at com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:344) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.hbase.regionserver.HRegion.exec(HRegion.java:4887) at org.apache.hadoop.hbase.regionserver.HRegionServer.execCoprocessor(HRegionServer.java:3478) at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364) at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1389) Caused by: java.lang.IllegalAccessError: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:308) ... 11 more

at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:1021)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:150)
at $Proxy6.execCoprocessor(Unknown Source)
at org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1.call(ExecRPCInvoker.java:75)
at org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1.call(ExecRPCInvoker.java:73)
at org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:163)
... 10 more

java.sql.SQLException: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.TABLE: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:623) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:639) at com.salesforce.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:315) at com.salesforce.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:78) at com.salesforce.phoenix.jdbc.PhoenixStatement$ExecutableCreateTableStatement.executeUpdate(PhoenixStatement.java:271) at com.salesforce.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:657) at com.salesforce.phoenix.util.SchemaUtil.initMetaData(SchemaUtil.java:314) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:720) at com.salesforce.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:95) at com.salesforce.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:100) at java.sql.DriverManager.getConnection(DriverManager.java:579) at java.sql.DriverManager.getConnection(DriverManager.java:243) at com.salesforce.phoenix.util.PhoenixRuntime.main(PhoenixRuntime.java:154) Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.TABLE: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:95) at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:79) at org.apache.hadoop.hbase.client.ServerCallable.translateException(ServerCallable.java:228) at org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:166) at org.apache.hadoop.hbase.ipc.ExecRPCInvoker.invoke(ExecRPCInvoker.java:79) at $Proxy7.createTable(Unknown Source) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl$8.call(ConnectionQueryServicesImpl.java:643) at com.salesforce.phoenix.query.ConnectionQueryServicesImpl$8.call(ConnectionQueryServicesImpl.java:640) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.TABLE: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at com.salesforce.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:49) at com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:344) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.hbase.regionserver.HRegion.exec(HRegion.java:4887) at org.apache.hadoop.hbase.regionserver.HRegionServer.execCoprocessor(HRegionServer.java:3478) at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364) at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1389) Caused by: java.lang.IllegalAccessError: tried to access method org.apache.hadoop.hbase.regionserver.HRegion.getLock(Ljava/lang/Integer;[BZ)Ljava/lang/Integer; from class com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl at com.salesforce.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:308) ... 11 more

at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:1021)
at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:150)
at $Proxy6.execCoprocessor(Unknown Source)
at org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1.call(ExecRPCInvoker.java:75)
at org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1.call(ExecRPCInvoker.java:73)
at org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:163)
... 10 more
cclien commented 11 years ago

I've seen similar message with older version of HBase. Just try to run it with HBase 0.94.2.

guowseu commented 11 years ago

Thanks a lot. I will try.

guowseu commented 11 years ago

It solves my problem.

jtaylor-sfdc commented 11 years ago

Closing this since Phoenix requires HBase 0.94.2 or above.