You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Saptarshi Guha <sa...@gmail.com> on 2009/08/26 03:12:24 UTC

ConnectionLoss during mapreduce

Hello,
I am trying to run a Mapreduce job using Hbase as a source. X,Y are
region servers, X is master and Zookeeper.
Y is the only tasktracker., both have 16Gb ram.
I have kept the hbase-dev.20 and zookeeper jars in $HADOOP/lib folder
across machines.

When run with mapred.job.tracker='local' , it works,(it runs on X)
(entry from log
9/08/25 21:03:04 INFO zookeeper.ZooKeeper: Initiating client
connection, host=localhost:2181 sessionTimeout=30000
watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@4abf053f
09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Attempting connection to
server localhost/127.0.0.1:2181
09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Priming connection to
java.nio.channels.SocketChannel[connected local=/127.0.0.1:59598
remote=localhost/127.0.0.1:2181]
)

But when on a distributed mode, (the job now runs on Y)
i get these errors:

Why is quorum server equal to  localhost:2181? Shouldn't it be on X?
According to the web UI, the quorum server is running on X:2181.
Is Mapreduce not loading the Hbase configuration file?

2009-08-25 21:04:29,335 INFO org.apache.zookeeper.ZooKeeper:
Initiating client connection, host=localhost:2181 sessionTimeout=30000
watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@62facf0b
2009-08-25 21:04:29,336 INFO org.apache.zookeeper.ClientCnxn:
zookeeper.disableAutoWatchReset is false
2009-08-25 21:04:29,343 INFO org.apache.zookeeper.ClientCnxn:
Attempting connection to server localhost/127.0.0.1:2181
2009-08-25 21:04:29,344 WARN org.apache.zookeeper.ClientCnxn:
Exception closing session 0x0 to sun.nio.ch.SelectionKeyImpl@360dc67e
java.net.ConnectException: Connection refused
....
009-08-25 21:04:29,454 WARN
org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper: Failed to create
/hbase -- check quorum servers, currently=localhost:2181
org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
        at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:522)

Thank you
Saptarshi

Re: ConnectionLoss during mapreduce

Posted by Saptarshi Guha <sa...@gmail.com>.
Oh I meant to say, using
>> export HADOOP_CLASSPATH=$HBASE_HOME/conf/
>> in $HADOOP_HOME/conf/hadoop-env.sh

fixed it. It wasn't picking it up before.
Thank you for the assistance.
Regards
Saptarshi

On Tue, Aug 25, 2009 at 9:32 PM, Jonathan Gray<jl...@streamy.com> wrote:
> Well, yes, it certainly can be a nightmare :)  But this should not be
> difficult to get running.
>
> Can you check the TaskTracker and Child running on Y to ensure that the conf
> directory which contains hbase-site.xml is listed in the classpath, and
> ensure that the path it's pointing to contains the correct hbase-site.xml.
>
> Hard to say why, but the issue is almost certainly inability to find
> hbase-site.xml (or it's finding one pointing to localhost).
>
> Saptarshi Guha wrote:
>>
>> Yes, I did this
>>
>> export HADOOP_CLASSPATH=$HBASE_HOME/conf/
>> in $HADOOP_HOME/conf/hadoop-env.sh
>>
>> Am I inexperienced or is JAVA class path a nightmare?
>>
>>
>> On Tue, Aug 25, 2009 at 9:23 PM, Jonathan Gray<jl...@streamy.com> wrote:
>>>
>>> You need to have hbase-site.xml somewhere in the classpath of the job
>>> running on Y (that's where it specifies that zk is on X, not localhost).
>>>
>>> Saptarshi Guha wrote:
>>>>
>>>> Hello,
>>>> I am trying to run a Mapreduce job using Hbase as a source. X,Y are
>>>> region servers, X is master and Zookeeper.
>>>> Y is the only tasktracker., both have 16Gb ram.
>>>> I have kept the hbase-dev.20 and zookeeper jars in $HADOOP/lib folder
>>>> across machines.
>>>>
>>>> When run with mapred.job.tracker='local' , it works,(it runs on X)
>>>> (entry from log
>>>> 9/08/25 21:03:04 INFO zookeeper.ZooKeeper: Initiating client
>>>> connection, host=localhost:2181 sessionTimeout=30000
>>>>
>>>>
>>>> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@4abf053f
>>>> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Attempting connection to
>>>> server localhost/127.0.0.1:2181
>>>> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Priming connection to
>>>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:59598
>>>> remote=localhost/127.0.0.1:2181]
>>>> )
>>>>
>>>> But when on a distributed mode, (the job now runs on Y)
>>>> i get these errors:
>>>>
>>>> Why is quorum server equal to  localhost:2181? Shouldn't it be on X?
>>>> According to the web UI, the quorum server is running on X:2181.
>>>> Is Mapreduce not loading the Hbase configuration file?
>>>>
>>>> 2009-08-25 21:04:29,335 INFO org.apache.zookeeper.ZooKeeper:
>>>> Initiating client connection, host=localhost:2181 sessionTimeout=30000
>>>>
>>>>
>>>> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@62facf0b
>>>> 2009-08-25 21:04:29,336 INFO org.apache.zookeeper.ClientCnxn:
>>>> zookeeper.disableAutoWatchReset is false
>>>> 2009-08-25 21:04:29,343 INFO org.apache.zookeeper.ClientCnxn:
>>>> Attempting connection to server localhost/127.0.0.1:2181
>>>> 2009-08-25 21:04:29,344 WARN org.apache.zookeeper.ClientCnxn:
>>>> Exception closing session 0x0 to sun.nio.ch.SelectionKeyImpl@360dc67e
>>>> java.net.ConnectException: Connection refused
>>>> ....
>>>> 009-08-25 21:04:29,454 WARN
>>>> org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper: Failed to create
>>>> /hbase -- check quorum servers, currently=localhost:2181
>>>> org.apache.zookeeper.KeeperException$ConnectionLossException:
>>>> KeeperErrorCode = ConnectionLoss for /hbase
>>>>       at
>>>> org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
>>>>       at
>>>> org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
>>>>       at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:522)
>>>>
>>>> Thank you
>>>> Saptarshi
>>>>
>>
>

Re: ConnectionLoss during mapreduce

Posted by Jonathan Gray <jl...@streamy.com>.
Well, yes, it certainly can be a nightmare :)  But this should not be 
difficult to get running.

Can you check the TaskTracker and Child running on Y to ensure that the 
conf directory which contains hbase-site.xml is listed in the classpath, 
and ensure that the path it's pointing to contains the correct 
hbase-site.xml.

Hard to say why, but the issue is almost certainly inability to find 
hbase-site.xml (or it's finding one pointing to localhost).

Saptarshi Guha wrote:
> Yes, I did this
> 
> export HADOOP_CLASSPATH=$HBASE_HOME/conf/
> in $HADOOP_HOME/conf/hadoop-env.sh
> 
> Am I inexperienced or is JAVA class path a nightmare?
> 
> 
> On Tue, Aug 25, 2009 at 9:23 PM, Jonathan Gray<jl...@streamy.com> wrote:
>> You need to have hbase-site.xml somewhere in the classpath of the job
>> running on Y (that's where it specifies that zk is on X, not localhost).
>>
>> Saptarshi Guha wrote:
>>> Hello,
>>> I am trying to run a Mapreduce job using Hbase as a source. X,Y are
>>> region servers, X is master and Zookeeper.
>>> Y is the only tasktracker., both have 16Gb ram.
>>> I have kept the hbase-dev.20 and zookeeper jars in $HADOOP/lib folder
>>> across machines.
>>>
>>> When run with mapred.job.tracker='local' , it works,(it runs on X)
>>> (entry from log
>>> 9/08/25 21:03:04 INFO zookeeper.ZooKeeper: Initiating client
>>> connection, host=localhost:2181 sessionTimeout=30000
>>>
>>> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@4abf053f
>>> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Attempting connection to
>>> server localhost/127.0.0.1:2181
>>> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Priming connection to
>>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:59598
>>> remote=localhost/127.0.0.1:2181]
>>> )
>>>
>>> But when on a distributed mode, (the job now runs on Y)
>>> i get these errors:
>>>
>>> Why is quorum server equal to  localhost:2181? Shouldn't it be on X?
>>> According to the web UI, the quorum server is running on X:2181.
>>> Is Mapreduce not loading the Hbase configuration file?
>>>
>>> 2009-08-25 21:04:29,335 INFO org.apache.zookeeper.ZooKeeper:
>>> Initiating client connection, host=localhost:2181 sessionTimeout=30000
>>>
>>> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@62facf0b
>>> 2009-08-25 21:04:29,336 INFO org.apache.zookeeper.ClientCnxn:
>>> zookeeper.disableAutoWatchReset is false
>>> 2009-08-25 21:04:29,343 INFO org.apache.zookeeper.ClientCnxn:
>>> Attempting connection to server localhost/127.0.0.1:2181
>>> 2009-08-25 21:04:29,344 WARN org.apache.zookeeper.ClientCnxn:
>>> Exception closing session 0x0 to sun.nio.ch.SelectionKeyImpl@360dc67e
>>> java.net.ConnectException: Connection refused
>>> ....
>>> 009-08-25 21:04:29,454 WARN
>>> org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper: Failed to create
>>> /hbase -- check quorum servers, currently=localhost:2181
>>> org.apache.zookeeper.KeeperException$ConnectionLossException:
>>> KeeperErrorCode = ConnectionLoss for /hbase
>>>        at
>>> org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
>>>        at
>>> org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
>>>        at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:522)
>>>
>>> Thank you
>>> Saptarshi
>>>
> 

Re: ConnectionLoss during mapreduce

Posted by Saptarshi Guha <sa...@gmail.com>.
Yes, I did this

export HADOOP_CLASSPATH=$HBASE_HOME/conf/
in $HADOOP_HOME/conf/hadoop-env.sh

Am I inexperienced or is JAVA class path a nightmare?


On Tue, Aug 25, 2009 at 9:23 PM, Jonathan Gray<jl...@streamy.com> wrote:
> You need to have hbase-site.xml somewhere in the classpath of the job
> running on Y (that's where it specifies that zk is on X, not localhost).
>
> Saptarshi Guha wrote:
>>
>> Hello,
>> I am trying to run a Mapreduce job using Hbase as a source. X,Y are
>> region servers, X is master and Zookeeper.
>> Y is the only tasktracker., both have 16Gb ram.
>> I have kept the hbase-dev.20 and zookeeper jars in $HADOOP/lib folder
>> across machines.
>>
>> When run with mapred.job.tracker='local' , it works,(it runs on X)
>> (entry from log
>> 9/08/25 21:03:04 INFO zookeeper.ZooKeeper: Initiating client
>> connection, host=localhost:2181 sessionTimeout=30000
>>
>> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@4abf053f
>> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Attempting connection to
>> server localhost/127.0.0.1:2181
>> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Priming connection to
>> java.nio.channels.SocketChannel[connected local=/127.0.0.1:59598
>> remote=localhost/127.0.0.1:2181]
>> )
>>
>> But when on a distributed mode, (the job now runs on Y)
>> i get these errors:
>>
>> Why is quorum server equal to  localhost:2181? Shouldn't it be on X?
>> According to the web UI, the quorum server is running on X:2181.
>> Is Mapreduce not loading the Hbase configuration file?
>>
>> 2009-08-25 21:04:29,335 INFO org.apache.zookeeper.ZooKeeper:
>> Initiating client connection, host=localhost:2181 sessionTimeout=30000
>>
>> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@62facf0b
>> 2009-08-25 21:04:29,336 INFO org.apache.zookeeper.ClientCnxn:
>> zookeeper.disableAutoWatchReset is false
>> 2009-08-25 21:04:29,343 INFO org.apache.zookeeper.ClientCnxn:
>> Attempting connection to server localhost/127.0.0.1:2181
>> 2009-08-25 21:04:29,344 WARN org.apache.zookeeper.ClientCnxn:
>> Exception closing session 0x0 to sun.nio.ch.SelectionKeyImpl@360dc67e
>> java.net.ConnectException: Connection refused
>> ....
>> 009-08-25 21:04:29,454 WARN
>> org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper: Failed to create
>> /hbase -- check quorum servers, currently=localhost:2181
>> org.apache.zookeeper.KeeperException$ConnectionLossException:
>> KeeperErrorCode = ConnectionLoss for /hbase
>>        at
>> org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
>>        at
>> org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
>>        at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:522)
>>
>> Thank you
>> Saptarshi
>>
>

Re: ConnectionLoss during mapreduce

Posted by Jonathan Gray <jl...@streamy.com>.
You need to have hbase-site.xml somewhere in the classpath of the job 
running on Y (that's where it specifies that zk is on X, not localhost).

Saptarshi Guha wrote:
> Hello,
> I am trying to run a Mapreduce job using Hbase as a source. X,Y are
> region servers, X is master and Zookeeper.
> Y is the only tasktracker., both have 16Gb ram.
> I have kept the hbase-dev.20 and zookeeper jars in $HADOOP/lib folder
> across machines.
> 
> When run with mapred.job.tracker='local' , it works,(it runs on X)
> (entry from log
> 9/08/25 21:03:04 INFO zookeeper.ZooKeeper: Initiating client
> connection, host=localhost:2181 sessionTimeout=30000
> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@4abf053f
> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Attempting connection to
> server localhost/127.0.0.1:2181
> 09/08/25 21:03:04 INFO zookeeper.ClientCnxn: Priming connection to
> java.nio.channels.SocketChannel[connected local=/127.0.0.1:59598
> remote=localhost/127.0.0.1:2181]
> )
> 
> But when on a distributed mode, (the job now runs on Y)
> i get these errors:
> 
> Why is quorum server equal to  localhost:2181? Shouldn't it be on X?
> According to the web UI, the quorum server is running on X:2181.
> Is Mapreduce not loading the Hbase configuration file?
> 
> 2009-08-25 21:04:29,335 INFO org.apache.zookeeper.ZooKeeper:
> Initiating client connection, host=localhost:2181 sessionTimeout=30000
> watcher=org.apache.hadoop.hbase.client.HConnectionManager$TableServers@62facf0b
> 2009-08-25 21:04:29,336 INFO org.apache.zookeeper.ClientCnxn:
> zookeeper.disableAutoWatchReset is false
> 2009-08-25 21:04:29,343 INFO org.apache.zookeeper.ClientCnxn:
> Attempting connection to server localhost/127.0.0.1:2181
> 2009-08-25 21:04:29,344 WARN org.apache.zookeeper.ClientCnxn:
> Exception closing session 0x0 to sun.nio.ch.SelectionKeyImpl@360dc67e
> java.net.ConnectException: Connection refused
> ....
> 009-08-25 21:04:29,454 WARN
> org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper: Failed to create
> /hbase -- check quorum servers, currently=localhost:2181
> org.apache.zookeeper.KeeperException$ConnectionLossException:
> KeeperErrorCode = ConnectionLoss for /hbase
>         at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
>         at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
>         at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:522)
> 
> Thank you
> Saptarshi
>