Support Questions

Find answers, ask questions, and share your expertise

Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.client.RetriesExhaustedException): Can't get the location for replica 0

avatar
Explorer

Hi all,

 

I am getting error while executing the phoenix query.

 

Error: Can't get the location for replica 0 (state=08000,code=101)
org.apache.phoenix.exception.PhoenixIOException: Can't get the location for replica 0
at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:117)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1126)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1418)
at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2190)
at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:872)
at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:194)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:343)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:331)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:330)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1440)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:808)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the location for replica 0
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:423)
at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)
at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:95)
at org.apache.hadoop.hbase.util.ForeignExceptionUtil.toIOException(ForeignExceptionUtil.java:45)
at org.apache.hadoop.hbase.client.HBaseAdmin$ProcedureFuture.convertResult(HBaseAdmin.java:4821)
at org.apache.hadoop.hbase.client.HBaseAdmin$ProcedureFuture.waitProcedureResult(HBaseAdmin.java:4779)
at org.apache.hadoop.hbase.client.HBaseAdmin$ProcedureFuture.get(HBaseAdmin.java:4713)
at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:676)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1065)
... 15 more
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.client.RetriesExhaustedException): Can't get the location for replica 0
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:354)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:159)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:61)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:211)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327)
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:302)
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:167)
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:162)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:799)
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602)
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366)
at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.prepareCreate(CreateTableProcedure.java:287)
at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.executeFromState(CreateTableProcedure.java:109)
at org.apache.hadoop.hbase.master.procedure.CreateTableProcedure.executeFromState(CreateTableProcedure.java:58)
at org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:107)
at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:500)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1086)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:888)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:841)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$200(ProcedureExecutor.java:77)
at org.apache.hadoop.hbase.procedure2.ProcedureExecutor$1.run(ProcedureExecutor.java:443)
0: jdbc:phoenix:> Closing: org.apache.phoenix.jdbc.PhoenixConnection

 

Thank you

1 ACCEPTED SOLUTION

avatar
Contributor

@Lakshu : Seems to be configuration issue, your code doesnt find the correct region as per the configration.

 

Go through hbase site xml files for the below configuration parameters, if not found add:

 

hbase.thrift.support.proxyuser --> true

hbase.regionserver.thrift.http --> true

 

Add these configurations and restart the hbase and let me know how this works. 

View solution in original post

10 REPLIES 10

avatar
Contributor

@Lakshu : Did u get this while running a phoenix sqlline ?? 

 

Are u trying to run a phoenix sql query within this sqlline utility.. Be precise so that we could get this resolved. 

avatar
Explorer

Yes, while the running the create statement in phoenix-sqlline getting this error.

 

 

avatar
Contributor

@Lakshu : Seems to be configuration issue, your code doesnt find the correct region as per the configration.

 

Go through hbase site xml files for the below configuration parameters, if not found add:

 

hbase.thrift.support.proxyuser --> true

hbase.regionserver.thrift.http --> true

 

Add these configurations and restart the hbase and let me know how this works. 

avatar
Explorer

@Govins: Okay i will work and get back to you.

avatar
Explorer

@Govins : Now its working fine.

 

Thank you

avatar
Contributor

@Lakshu : thanks for quick response 🙂 good to hear that works .... 

avatar

Which part (path) within ambari should I change the file parameters in?

 

Thanks in advance,

avatar
Explorer

Hi

 

Yes you need to add that parameters into the hbase-site.xml in Ambari UI under HBASE configuration.

 

 

 

avatar
Thanks, but I can't see any option that you mentioned, just the options below (see file attached):