[ https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14091271#comment-14091271 ]
Andrew Purtell commented on HBASE-11589: ---------------------------------------- The v2 patch lgtm. We are either changing the type of a thrown exception but not interface signatures (they declare the supertype IOException) or tweaking private scope classes. I don't think adding the constructor to AccessDeniedException will break users because it is overriding a constructor of the same signature in a base class. +1 > AccessControlException handling in HBase rpc server and client. > AccessControlException should be a not retriable exception > -------------------------------------------------------------------------------------------------------------------------- > > Key: HBASE-11589 > URL: https://issues.apache.org/jira/browse/HBASE-11589 > Project: HBase > Issue Type: Bug > Components: IPC/RPC > Affects Versions: 0.98.3 > Environment: SLES 11 SP1 > Reporter: Kashif J S > Assignee: Qiang Tian > Fix For: 0.99.0, 2.0.0, 0.98.6 > > Attachments: hbase-11589-master-v1.patch, > hbase-11589-master-v2.patch, hbase-11589-master.patch > > > RPC server does not handle the AccessControlException thrown by > authorizeConnection failure properly and in return sends IOException to the > HBase client. > Ultimately the client does retries and gets RetriesExhaustedException but > does not getting any link or information or stack trace about > AccessControlException. > In short summary, upon inspection of RPCServer.java, it seems > for the Listener, the Reader read code as below does not handle > AccessControlException > {noformat} > void doRead(…. > ….. > ….. > try { > count = c.readAndProcess(); // This readAndProcess method throws > AccessControlException from processOneRpc(byte[] buf) which is not handled ? > } catch (InterruptedException ieo) { > throw ieo; > } catch (Exception e) { > LOG.warn(getName() + ": count of bytes read: " + count, e); > count = -1; //so that the (count < 0) block is executed > } > {noformat} > Below is the client logs if authorizeConnection throws AccessControlException: > 2014-07-24 19:40:58,768 INFO [main] > client.HConnectionManager$HConnectionImplementation: getMaster attempt 7 of 7 > failed; no more retrying. > com.google.protobuf.ServiceException: java.io.IOException: Call to > host-10-18-40-101/10.18.40.101:60000 failed on local exception: > java.io.EOFException > at > org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1674) > at > org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1715) > at > org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:42561) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(HConnectionManager.java:1688) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:1597) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:1623) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:1677) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:1885) > [...] > Caused by: java.io.IOException: Call to host-10-18-40-101/10.18.40.101:60000 > failed on local exception: java.io.EOFException > at > org.apache.hadoop.hbase.ipc.RpcClient.wrapException(RpcClient.java:1485) > at org.apache.hadoop.hbase.ipc.RpcClient.call(RpcClient.java:1457) > at > org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1657) > ... 254 more > Caused by: java.io.EOFException > at java.io.DataInputStream.readInt(DataInputStream.java:375) > at > org.apache.hadoop.hbase.ipc.RpcClient$Connection.readResponse(RpcClient.java:1072) > at > org.apache.hadoop.hbase.ipc.RpcClient$Connection.run(RpcClient.java:728) -- This message was sent by Atlassian JIRA (v6.2#6252)