hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Haidinyak <phaidin...@local.com>
Subject RE: Problem connecting to HBase using Java Client
Date Thu, 02 Dec 2010 22:02:29 GMT
Thanks, I also found that if you manually add the hbase-site.xml URL to the configuration it
fixes the problem too.

-Pete

-----Original Message-----
From: jdcryans@gmail.com [mailto:jdcryans@gmail.com] On Behalf Of Jean-Daniel Cryans
Sent: Thursday, December 02, 2010 1:22 PM
To: user@hbase.apache.org
Subject: Re: Problem connecting to HBase using Java Client

Ah it's the issue with the test jar containing the tests'
configurations which only shows up on cloudera's distribution because
the file is in HBase's root directory, simply move
hbase-0.89.20100924+28-tests.jar away to get around the issue.

In 0.90 we now exclude the file from that jar so the problem will be
solved for everyone.

J-D

On Thu, Dec 2, 2010 at 12:41 PM, Peter Haidinyak <phaidinyak@local.com> wrote:
> Ok, I cleaned up my classpath and now I am receiving an error where ZooKeeper can't connect
to 'localhost:21810'
>
> Where does it decide to connect there? I have nothing listening on that port. Here is
the log4j dump.
>
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeperWrapper: Reconnecting to zookeeper
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.3.1-942149,
built on 05/07/2010 17:14 GMT
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:host.name=caiss01a.epilotcolo.eliberation.com
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_10-ea
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems
Inc.
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/java/jdk1.6.0_10/jre
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/usr/java/current/lib/tools.jar:/usr/local/Hadoop/hadoop/hadoop-core-0.20.2+737.jar:/usr/local/Hadoop/hadoop/hadoop-test-0.20.2+737.jar:/usr/local/Hadoop/hadoop/SearchLogSorter.jar:/usr/local/Hadoop/hadoop/hadoop-ant-0.20.2+737.jar:/usr/local/Hadoop/hadoop/hadoop-examples-0.20.2+737.jar:/usr/local/Hadoop/hadoop/hadoop-tools-0.20.2+737.jar:/usr/local/Hadoop/hadoop/lib/commons-codec-1.4.jar:/usr/local/Hadoop/hadoop/lib/commons-el-1.0.jar:/usr/local/Hadoop/hadoop/lib/jasper-runtime-5.5.12.jar:/usr/local/Hadoop/hadoop/lib/jasper-compiler-5.5.12.jar:/usr/local/Hadoop/hadoop/lib/slf4j-api-1.4.3.jar:/usr/local/Hadoop/hadoop/lib/commons-net-1.4.1.jar:/usr/local/Hadoop/hadoop/lib/jackson-core-asl-1.5.2.jar:/usr/local/Hadoop/hadoop/lib/commons-httpclient-3.0.1.jar:/usr/local/Hadoop/hadoop/lib/slf4j-log4j12-1.4.3.jar:/usr/local/Hadoop/hadoop/lib/jackson-mapper-asl-1.5.2.jar:/usr/local/Hadoop/hadoop/lib/oro-2.0.8.jar:/usr/local/Hadoop/hadoop/lib/commons-daemon-1.0.1.jar:/usr/local/Hadoop/hadoop/lib/commons-logging-api-1.0.4.jar:/usr/local/Hadoop/hadoop/lib/kfs-0.2.2.jar:/usr/local/Hadoop/hadoop/lib/jetty-6.1.14.jar:/usr/local/Hadoop/hadoop/lib/junit-4.5.jar:/usr/local/Hadoop/hadoop/lib/commons-cli-1.2.jar:/usr/local/Hadoop/hadoop/lib/mockito-all-1.8.2.jar:/usr/local/Hadoop/hadoop/lib/jets3t-0.6.1.jar:/usr/local/Hadoop/hadoop/lib/core-3.1.1.jar:/usr/local/Hadoop/hadoop/lib/hadoop-fairscheduler-0.20.2+737.jar:/usr/local/Hadoop/hadoop/lib/xmlenc-0.52.jar:/usr/local/Hadoop/hadoop/lib/aspectjrt-1.6.5.jar:/usr/local/Hadoop/hadoop/lib/commons-logging-1.0.4.jar:/usr/local/Hadoop/hadoop/lib/log4j-1.2.15.jar:/usr/local/Hadoop/hadoop/lib/jetty-util-6.1.14.jar:/usr/local/Hadoop/hadoop/lib/servlet-api-2.5-6.1.14.jar:/usr/local/Hadoop/hadoop/lib/mysql-connector-java-5.0.8-bin.jar:/usr/local/Hadoop/hadoop/lib/aspectjtools-1.6.5.jar:/usr/local/Hadoop/hadoop/lib/hsqldb-1.8.0.10.jar:/usr/local/Hadoop/hadoop/conf:/usr/local/HBase/hbase-0.89/hbase-0.89.20100924+28-tests.jar:/usr/local/HBase/hbase-0.89/hbase-0.89.20100924+28.jar:/usr/local/HBase/hbase-0.89/hbase-0.89.20100924+28-sources.jar:/usr/local/HBase/hbase-0.89/lib/stax-api-1.0.1.jar:/usr/local/HBase/hbase-0.89/lib/commons-logging-1.1.1.jar:/usr/local/HBase/hbase-0.89/lib/hbase-contrib-transactional-0.21.jar:/usr/local/HBase/hbase-0.89/lib/jsr311-api-1.1.1.jar:/usr/local/HBase/hbase-0.89/lib/jsp-api-2.0.jar:/usr/local/HBase/hbase-0.89/lib/servlet-api-2.5-20081211.jar:/usr/local/HBase/hbase-0.89/lib/thrift-0.2.0.jar:/usr/local/HBase/hbase-0.89/lib/jline-0.9.94.jar:/usr/local/HBase/hbase-0.89/lib/commons-el-1.0.jar:/usr/local/HBase/hbase-0.89/lib/guava-r05.jar:/usr/local/HBase/hbase-0.89/lib/kfs-0.3.jar:/usr/local/HBase/hbase-0.89/lib/stax-api-1.0-2.jar:/usr/local/HBase/hbase-0.89/lib/jetty-util-6.1.24.jar:/usr/local/HBase/hbase-0.89/lib/paranamer-generator-2.2.jar:/usr/local/HBase/hbase-0.89/lib/commons-net-1.4.1.jar:/usr/local/HBase/hbase-0.89/lib/jasper-runtime-5.5.23.jar:/usr/local/HBase/hbase-0.89/lib/jackson-core-asl-1.5.2.jar:/usr/local/HBase/hbase-0.89/lib/avro-1.3.2.jar:/usr/local/HBase/hbase-0.89/lib/jersey-json-1.1.5.1.jar:/usr/local/HBase/hbase-0.89/lib/ant-1.7.1.jar:/usr/local/HBase/hbase-0.89/lib/protobuf-java-2.3.0.jar:/usr/local/HBase/hbase-0.89/lib/jaxb-api-2.1.jar:/usr/local/HBase/hbase-0.89/lib/jersey-core-1.1.5.1.jar:/usr/local/HBase/hbase-0.89/lib/jackson-mapper-asl-1.5.2.jar:/usr/local/HBase/hbase-0.89/lib/oro-2.0.8.jar:/usr/local/HBase/hbase-0.89/lib/jruby-complete-1.4.0.jar:/usr/local/HBase/hbase-0.89/lib/hadoop-core-0.20.2-737.jar:/usr/local/HBase/hbase-0.89/lib/jets3t-0.7.1.jar:/usr/local/HBase/hbase-0.89/lib/ant-launcher-1.7.1.jar:/usr/local/HBase/hbase-0.89/lib/jettison-1.1.jar:/usr/local/HBase/hbase-0.89/lib/servlet-api-2.4.jar:/usr/local/HBase/hbase-0.89/lib/commons-cli-1.2.jar:/usr/local/HBase/hbase-0.89/lib/paranamer-2.2.jar:/usr/local/HBase/hbase-0.89/lib/ant-1.6.5.jar:/usr/local/HBase/hbase-0.89/lib/jetty-6.1.24.jar:/usr/local/HBase/hbase-0.89/lib/commons-httpclient-3.1.jar:/usr/local/HBase/hbase-0.89/lib/core-3.1.1.jar:/usr/local/HBase/hbase-0.89/lib/jsp-2.1-6.1.14.jar:/usr/local/HBase/hbase-0.89/lib/qdox-1.10.1.jar:/usr/local/HBase/hbase-0.89/lib/slf4j-api-1.5.8.jar:/usr/local/HBase/hbase-0.89/lib/activation-1.1.jar:/usr/local/HBase/hbase-0.89/lib/jaxb-impl-2.1.12.jar:/usr/local/HBase/hbase-0.89/lib/xmlenc-0.52.jar:/usr/local/HBase/hbase-0.89/lib/commons-codec-1.2.jar:/usr/local/HBase/hbase-0.89/lib/slf4j-log4j12-1.5.8.jar:/usr/local/HBase/hbase-0.89/lib/paranamer-ant-2.2.jar:/usr/local/HBase/hbase-0.89/lib/zookeeper-3.3.1.jar:/usr/local/HBase/hbase-0.89/lib/log4j-1.2.15.jar:/usr/local/HBase/hbase-0.89/lib/servlet-api-2.5-6.1.14.jar:/usr/local/HBase/hbase-0.89/lib/jsp-api-2.1-6.1.14.jar:/usr/local/HBase/hbase-0.89/lib/jasper-compiler-5.5.23.jar:/usr/local/HBase/hbase-0.89/lib/jersey-server-1.1.5.1.jar:/usr/local/HBase/hbase-0.89/lib/asm-3.1.jar:/usr/local/HBase/hbase-0.89/lib/hsqldb-1.8.0.10.jar:/usr/local/HBase/hbase-0.89/lib/commons-lang-2.5.jar:/usr/local/HBase/hbase-0.89/conf:./ImportTrafficLogs-1.0.jar
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/jdk1.6.0_10/jre/lib/i386/server:/usr/java/jdk1.6.0_10/jre/lib/i386:/usr/java/jdk1.6.0_10/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:os.arch=i386
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:os.version=2.6.9-55.ELsmp
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:user.name=hadoop
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/hadoop
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Client environment:user.dir=/search/ctr/bin
> 10/12/02 12:36:33 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:21810
sessionTimeout=60000 watcher=org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper@d81784
> 10/12/02 12:36:33 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:21810
> 10/12/02 12:36:33 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected
error, closing socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
>        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
>        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1078)
> 1
>
>
> -----Original Message-----
> From: jdcryans@gmail.com [mailto:jdcryans@gmail.com] On Behalf Of Jean-Daniel Cryans
> Sent: Thursday, December 02, 2010 12:26 PM
> To: user@hbase.apache.org
> Subject: Re: Problem connecting to HBase using Java Client
>
> I didn't know we were already at 20.20.2 ;)
>
> It seems that your client doesn't have the address of the zookeeper
> ensemble, but that part of the log is missing so I can't tell.
>
> J-D
>
> On Thu, Dec 2, 2010 at 12:19 PM, Peter Haidinyak <phaidinyak@local.com> wrote:
>> Hidey Ho,
>>  I have a three node cluster up running
>> Hadoop 20.20.2+737.tar  (from Cloudera)
>> HBase  0.89.20100924+28 (from Cloudera)
>>
>> When I do a JPS everything looks ok.
>>
>> I am trying to connect to HBase using a Java Client.
>>
>>    final Configuration config = HBaseConfiguration.create();
>>    m_trafficTable = new HTable(config, TRAFFIC_LOG_TABLE_NAME);
>>    m_trafficTable.setAutoFlush(false);  // performance
>>    m_trafficTable.setWriteBufferSize(12582912L);  // performance
>>
>> When the client tries to create the configuration I get the following...
>>
>> 2010-12-02 11:35:59,971 INFO  [Import Click Log Thread] zookeeper.ZooKeeperWrapper(195):
Reconnecting to zookeeper
>> 2010-12-02 11:36:00,033 DEBUG [Import Click Log Thread] zookeeper.ZooKeeperWrapper(201):
<localhost:/hbase,org.apache.hadoop.hbase.client.HConnectionManager>Connected to zookeeper
again
>> 2010-12-02 11:36:00,035 DEBUG [Import Click Log Thread] zookeeper.ZooKeeperWrapper(466):
<localhost:/hbase,org.apache.hadoop.hbase.client.HConnectionManager>Trying to read /hbase/root-region-server
>> 2010-12-02 11:36:00,171 DEBUG [Import Click Log Thread] zookeeper.ZooKeeperWrapper(469):
<localhost:/hbase,org.apache.hadoop.hbase.client.HConnectionManager>Failed to read org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/root-region-server
>> 2010-12-02 11:36:00,172 DEBUG [Import Click Log Thread] client.HConnectionManager$TableServers(1077):
Sleeping 5000ms, waiting for root region.
>> 2
>>
>> This just repeats.
>>
>> Any ideas?
>>
>> Thanks
>>
>> -Pete
>>
>>
>

Mime
View raw message