GELOG / docker-ubuntu-hbase

Dockerfile for running HBase on Ubuntu
Apache License 2.0
7 stars 5 forks source link

Can't connect to hbase-master from a client container #1

Closed davidonlaptop closed 9 years ago

davidonlaptop commented 9 years ago

Steps to reproduce

1) Creates a hbase-master container.

docker run -d --name hbase-master -h hbase-master -p 16010:16010 \
       -v $HOME/data/hadoop/hbase:/data \
       hbase hbase master start && \
docker logs -tf hbase-master

2) Create a hbase-shell container

docker run --rm -ti --name hbase-shell \
       --link=hbase-master:hbase-master \
       hbase hbase shell

Consequence

The error: [main] client.ConnectionManager$HConnectionImplementation: Can't get connection to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase

Impact

No interaction possible with hbase.

Workaround

Start the hbase shell in the same container as the master.

docker exec -ti  hbase-master  hbase shell

The drawback is a lack of container isolation.

jbeliveau commented 9 years ago

This has been fixed by modifying the hbase-site.xml config file. The hbase.zookeeper.quorum property has been added and references the hbase-master container.

<property>
    <name>hbase.zookeeper.quorum</name>
    <value>hbase-master</value>
</property>

Instructions to create a HBase Shell client container have been updated in the readme.