Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using external ZooKeeper instance (in OS other than Linux) #40

Open
ivangreene opened this issue Sep 19, 2019 · 5 comments
Open

Using external ZooKeeper instance (in OS other than Linux) #40

ivangreene opened this issue Sep 19, 2019 · 5 comments

Comments

@ivangreene
Copy link

If wanting to connect to a local ZooKeeper on 2181 outside of the docker container, we cannot use network: host mode. Here is how I was able to get around this, remove net=host mode and open 9000 on the host machine:

docker run \
  -d -p 9000:9000 \
  --name zoonavigator \
  --restart unless-stopped \
  elkozmon/zoonavigator:latest

And use the connection string docker.for.mac.host.internal:2181 (varies by operating system, see this answer: https://stackoverflow.com/a/43541732/7983959

Wanted to share here in case others experience this issue, it was not straightforward to determine the issue

@elkozmon
Copy link
Owner

Thanks for sharing this, I will probably link this issue in the docs too.

@elkozmon elkozmon pinned this issue Sep 20, 2019
@solarmosaic-kflorence
Copy link

solarmosaic-kflorence commented Dec 9, 2019

This configuration worked for me when deploying to local Kubernetes with docker stack deploy:

  zookeeper1:
    image: bitnami/zookeeper:latest
    hostname: zookeeper1
    ports:
      - "2181:2181"
    environment:
      ALLOW_ANONYMOUS_LOGIN: "yes"
    volumes:
      - zookeeper1-data:/bitnami/zookeeper
  zoonavigator:
    image: elkozmon/zoonavigator:0.7.1
    ports:
      - "8000:8000"
    environment:
      HTTP_PORT: 8000
      AUTO_CONNECT_CONNECTION_STRING: zookeeper1:2181

volumes:
  zookeeper1-data:

@elkozmon elkozmon unpinned this issue Jan 12, 2020
@elkozmon elkozmon pinned this issue Jan 12, 2020
@wolfch-elsevier
Copy link

docker.for.mac.host.internal

I read this DNS string is deprecated and is now just host.docker.internal
https://forums.docker.com/t/understanding-the-docker-for-mac-localhost-behavior/41921/4

@csaltos
Copy link

csaltos commented Jun 26, 2020

Or just run it outside Docker with this script ->

wget https://www.dropbox.com/s/zaea4o5cdqlsrk0/zoonavigator-0.1.0.tar.bz2?dl=1 -O zoonavigator-0.1.0.tar.bz2
tar xjf zoonavigator-0.1.0.tar.bz2
zoonavigator-0.1.0/bin/zoonavigator-play \
    '-Dplay.http.secret.key=9z34aAn7k?6Z?iarawMxILR1CTF:G2gf:92lmtabG@5142AB:R5W11l2:N:::Cy@' \
    -Dplay.server.http.port=9001

NOTE: if you want to update to a new version, just follow the build steps at https://zoonavigator.elkozmon.com/en/latest/development.html
NOTE2: obviously for security reasons change the secret key to a new random you want

@csaltos
Copy link

csaltos commented Jun 26, 2020

By the way, thanks for ZooNavigator, it's a great tool !! ;) :) ... and please don't forget to sponsor the author at -> https://www.paypal.me/elkozmon

@elkozmon elkozmon changed the title Using external ZooKeeper instance Using external ZooKeeper instance (in OS other than Linux) Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants