elkozmon / zoonavigator

Web-based ZooKeeper UI / editor / browser
https://zoonavigator.elkozmon.com
GNU Affero General Public License v3.0
508 stars 73 forks source link

Unable to to connect to zookeeper from zoonavigator #80

Closed Bharathkumarraju closed 2 years ago

Bharathkumarraju commented 2 years ago

Hi,

I run zoonavigator in docker in ubuntu ..from the ubuntu VM able to reach all the zookeepers like below

ubuntu@ip-172-31-11-154:~$ docker run \
  -d \
  -p 9000:9000 \
  -e HTTP_PORT=9000 \
  --name zoonavigator \
  --restart unless-stopped \
  elkozmon/zoonavigator:latest
Unable to find image 'elkozmon/zoonavigator:latest' locally
latest: Pulling from elkozmon/zoonavigator
c229119241af: Pull complete
2f1dc05f270b: Pull complete
39b2c24c052e: Pull complete
313fb0b5de5e: Pull complete
db73a4fe771b: Pull complete
18e0c0fa9797: Pull complete
5b9cc3fc289e: Pull complete
37e4b26f2739: Pull complete
2f1d9d577da5: Pull complete
Digest: sha256:92548872b448395e7bd77ece1912bfdbc68f6bbbb7836082539999c83a4c1db9
Status: Downloaded newer image for elkozmon/zoonavigator:latest
a9889dbba39a7e759bc025e3fd09809207ad00c73a45643630ca25e92ceaf448
ubuntu@ip-172-31-11-154:~$ docker ps
CONTAINER ID   IMAGE                          COMMAND      CREATED              STATUS                        PORTS                                       NAMES
a9889dbba39a   elkozmon/zoonavigator:latest   "./run.sh"   About a minute ago   Up About a minute (healthy)   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp   zoonavigator
ubuntu@ip-172-31-11-154:~$ nc -vz zookeeper1 2181
Connection to zookeeper1 (172.31.9.1) 2181 port [tcp/*] succeeded!
ubuntu@ip-172-31-11-154:~$ nc -vz zookeeper2 2181
Connection to zookeeper2 (172.31.19.230) 2181 port [tcp/*] succeeded!
ubuntu@ip-172-31-11-154:~$ nc -vz zookeeper2 2181
Connection to zookeeper2 (172.31.19.230) 2181 port [tcp/*] succeeded!
ubuntu@ip-172-31-11-154:~$ nc -vz zookeeper3 2181
Connection to zookeeper3 (172.31.35.20) 2181 port [tcp/*] succeeded!
ubuntu@ip-172-31-11-154:~$

but when i tried to connect in UI it is saying unable to connect

image

Bharathkumarraju commented 2 years ago

It worked for me if i use docker-compose

ubuntu@ip-172-31-11-154:~$ docker-compose -f test.yml up -d
Creating zoonavigator ... done
ubuntu@ip-172-31-11-154:~$ docker ps
CONTAINER ID   IMAGE                          COMMAND      CREATED         STATUS                            PORTS                                       NAMES
e26ff4161a3c   elkozmon/zoonavigator:latest   "./run.sh"   3 seconds ago   Up 2 seconds (health: starting)   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp   zoonavigator
ubuntu@ip-172-31-11-154:~$ cat test.yml
version: "3.9"

services:
  zookeeper-navi:
    ports:
      - "9000:9000"
    image: "elkozmon/zoonavigator:latest"
    restart: unless-stopped
    container_name: "zoonavigator"
    environment:
      - "HTTP_PORT=9000"
ubuntu@ip-172-31-11-154:~$

Thanks!!!

image