[ 
https://issues.apache.org/jira/browse/HBASE-4138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090877#comment-13090877
 ] 

ramkrishna.s.vasudevan commented on HBASE-4138:
-----------------------------------------------

I have cracked the reason for the build failure.
There are two problems:
-> Some prev zk cluster was not shutdown (or the port 21818 was busy)
-> The connection caching logic uses zookeeper client port as the connection 
key.

Consider the log in the failed build #2132 for the testcase TestScannerTimeOut
{noformat}
2011-08-23 04:30:11,195 INFO  [main] zookeeper.MiniZooKeeperCluster(141): 
Failed binding ZK Server to client port: 21818
2011-08-23 04:30:11,226 INFO  [main] zookeeper.MiniZooKeeperCluster(164): 
Started MiniZK Cluster and connect 1 ZK server on client port: 21819
{noformat}
By default we try connecting to 21818 but as it was not bindable we connect to 
21819. (may be the port was busy).

After starting the miniZkCluster
{code}
    this.conf.set("hbase.zookeeper.property.clientPort",
      Integer.toString(clientPort));
{code}
we set this port in the config object.
So for RS and Master the zookeeper client port will be 21819.
Now when the testcase starts running there is no testcase till test3686a where 
we need a client connection.
Now as part of test3686a we create new HTable() which calls
{code}
    this(HBaseConfiguration.create(), tableName);
{code}
Here we create a new configuration object.  Hence the zookeeper client port is 
taken to be 21818.
Ideally due to improper shutdown of some prev zk cluster that was running in 
21818 the test case was able to connect to this but the port being different it 
could not find the /hbase node.
Hence the failure has happened.
The remaining two testcases in TestHTablePool that failed also has the similar 
problem.  Even the failure in build #2119 is exactly the same.
There should be a mechanism from the test for the client code to know to which 
zk he should connect to.  I have reproduced this problem. Can we provide a fix 
for this? 



> If zookeeper.znode.parent is not specifed explicitly in Client code then 
> HTable object loops continuously waiting for the root region by using /hbase 
> as the base node.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4138
>                 URL: https://issues.apache.org/jira/browse/HBASE-4138
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.3
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4138_trunk_1.patch, HBASE-4138_trunk_2.patch, 
> HBASE-4138_trunk_3.patch
>
>
> Change the zookeeper.znode.parent property (default is /hbase).
> Now do not specify this change in the client code.
> Use the HTable Object.
> The HTable is not able to find the root region and keeps continuously looping.
> Find the stack trace:
> ====================
> Object.wait(long) line: not available [native method]          
> RootRegionTracker(ZooKeeperNodeTracker).blockUntilAvailable(long) line: 122
> RootRegionTracker.waitRootRegionLocation(long) line: 73                
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[], boolean) line: 578
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[]) line: 558
> HConnectionManager$HConnectionImplementation.locateRegionInMeta(byte[],
> byte[], byte[], boolean, Object) line: 687
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[], boolean) line: 589
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[]) line: 558
> HConnectionManager$HConnectionImplementation.locateRegionInMeta(byte[],
> byte[], byte[], boolean, Object) line: 687
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[], boolean) line: 593
> HConnectionManager$HConnectionImplementation.locateRegion(byte[],
> byte[]) line: 558
> HTable.<init>(Configuration, byte[]) line: 171                 
> HTable.<init>(Configuration, String) line: 145                 
> HBaseTest.test() line: 45

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to