You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Ajit Koti <aj...@gmail.com> on 2013/04/05 09:15:58 UTC

Remote Connection To Pseudo Distributed HBase (Deployed in aws ec2) Not Working

 Hi,

I have deployed HBase in Pseudo Distributed mode in AWS EC2 and I have also
deployed my app in another ec2 instance which remotely connects to HBase
and it works fine .

When I try to connect to Hbase from application deployed on my local
machine (laptop) it does not connect

Here is the log

2:06:53,320 DEBUG HConnectionManager$HConnectionImplementation:804 -
Lookedup root region location,
connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@e611faa;
serverName=ip-10-145-184-6.ec2.internal,60020,1365142471429 12:06:55,666
DEBUG ClientCnxn:816 - Reading reply sessionid:0x13dd8d4f5c00005, packet::
clientPath:null serverPath:null finished:false header:: 23,3 replyHeader::
23,905,0 request:: '/hbase,F response::
s{3,3,1364049937977,1364049937977,0,48,0,0,0,12,838} 12:06:56,014 DEBUG
ClientCnxn:816 - Reading reply sessionid:0x13dd8d4f5c00005, packet::
clientPath:null serverPath:null finished:false header:: 24,4 replyHeader::
24,905,0 request:: '/hbase/root-region-server,T response::
#ffffffff0001c313532394069702d31302d3134352d3138342d36ffffffe718ffffffadffffffaeffffffd1712dffffffc569702d31302d3134352d3138342d362e6563322e696e7465726e616c2c36303032302c31333635313432343731343239,s{838,838,1365142511189,1365142511189,0,0,0,0,81,0,838}
12:06:56,015 DEBUG ZKUtil:1122 - hconnection-0x13dd8d4f5c00005 Retrieved 48
byte(s) of data from znode /hbase/root-region-server and set watcher;
ip-10-145-184-6.ec2.internal,... 12:06:56,016 DEBUG
HConnectionManager$HConnectionImplementation:804 - Lookedup root region
location,
connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@e611faa;
serverName=ip-10-145-184-6.ec2.internal,60020,1365142471429 12:07:09,352
DEBUG ClientCnxn:727 - Got ping response for sessionid: 0x13dd8d4f5c00005
after 336ms

Here is how /etc/hosts look like on the hbase deployed machine

 127.0.0.1 localhost

 127.0.0.1 54.235.85.109

Tried various combination mention across blogs , Didnt get a working
combination

Hbase-site.xml

<configuration>
<property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
</property>
<property>
  <name>hbase.rootdir</name>
  <value>hdfs://localhost:8020/hbase</value>
</property>
</configuration>

Client Code

configuration = HBaseConfiguration.create();
        configuration.set("hbase.zookeeper.quorum", "54.235.85.109");

Any help is much appreciated , Have been struggling for more than 3 days
now . Please let me know if any more info is needed

-- 
Thanks
Ajit Koti
about.me/ajitkoti

Re: Remote Connection To Pseudo Distributed HBase (Deployed in aws ec2) Not Working

Posted by Viral Bajaria <vi...@gmail.com>.
Are you sure that your hbase regionserver is registered with the external
IP in zookeeper ? Your client (laptop) might be trying to connect to ec2
hbase using the internal host name which will not get resolved. To do a
quick test, just modify the /etc/hosts on your laptop and put both the ec2
external and internal name in it and check if the error goes away.

Can you also post the ERROR log ? I only see DEBUG in your email.

Thanks,
Viral


On Fri, Apr 5, 2013 at 12:15 AM, Ajit Koti <aj...@gmail.com> wrote:

>  Hi,
>
> I have deployed HBase in Pseudo Distributed mode in AWS EC2 and I have also
> deployed my app in another ec2 instance which remotely connects to HBase
> and it works fine .
>
> When I try to connect to Hbase from application deployed on my local
> machine (laptop) it does not connect
>
> Here is the log
>
> 2:06:53,320 DEBUG HConnectionManager$HConnectionImplementation:804 -
> Lookedup root region location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@e611faa
> ;
> serverName=ip-10-145-184-6.ec2.internal,60020,1365142471429 12:06:55,666
> DEBUG ClientCnxn:816 - Reading reply sessionid:0x13dd8d4f5c00005, packet::
> clientPath:null serverPath:null finished:false header:: 23,3 replyHeader::
> 23,905,0 request:: '/hbase,F response::
> s{3,3,1364049937977,1364049937977,0,48,0,0,0,12,838} 12:06:56,014 DEBUG
> ClientCnxn:816 - Reading reply sessionid:0x13dd8d4f5c00005, packet::
> clientPath:null serverPath:null finished:false header:: 24,4 replyHeader::
> 24,905,0 request:: '/hbase/root-region-server,T response::
>
> #ffffffff0001c313532394069702d31302d3134352d3138342d36ffffffe718ffffffadffffffaeffffffd1712dffffffc569702d31302d3134352d3138342d362e6563322e696e7465726e616c2c36303032302c31333635313432343731343239,s{838,838,1365142511189,1365142511189,0,0,0,0,81,0,838}
> 12:06:56,015 DEBUG ZKUtil:1122 - hconnection-0x13dd8d4f5c00005 Retrieved 48
> byte(s) of data from znode /hbase/root-region-server and set watcher;
> ip-10-145-184-6.ec2.internal,... 12:06:56,016 DEBUG
> HConnectionManager$HConnectionImplementation:804 - Lookedup root region
> location,
>
> connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@e611faa
> ;
> serverName=ip-10-145-184-6.ec2.internal,60020,1365142471429 12:07:09,352
> DEBUG ClientCnxn:727 - Got ping response for sessionid: 0x13dd8d4f5c00005
> after 336ms
>
> Here is how /etc/hosts look like on the hbase deployed machine
>
>  127.0.0.1 localhost
>
>  127.0.0.1 54.235.85.109
>
> Tried various combination mention across blogs , Didnt get a working
> combination
>
> Hbase-site.xml
>
> <configuration>
> <property>
>   <name>hbase.cluster.distributed</name>
>   <value>true</value>
> </property>
> <property>
>   <name>hbase.rootdir</name>
>   <value>hdfs://localhost:8020/hbase</value>
> </property>
> </configuration>
>
> Client Code
>
> configuration = HBaseConfiguration.create();
>         configuration.set("hbase.zookeeper.quorum", "54.235.85.109");
>
> Any help is much appreciated , Have been struggling for more than 3 days
> now . Please let me know if any more info is needed
>
> --
> Thanks
> Ajit Koti
> about.me/ajitkoti
>