Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution
Highlighted

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

New Contributor

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

Accepted Solutions
Highlighted

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

Explorer

@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

6 REPLIES 6
Highlighted

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

Explorer

@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. 

Highlighted

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

New Contributor

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

 

 

Highlighted

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

Explorer

@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

Highlighted

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

New Contributor

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

Highlighted

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

New Contributor

@Govins : Now its working fine.

 

Thank you

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

Explorer

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

Don't have an account?
Coming from Hortonworks? Activate your account here