tiangolo / dockerswarm.rocks

Docker Swarm mode rocks! Ideas, tools and recipes. Get a production-ready, distributed, HTTPS served, cluster in minutes, not weeks.

Home Page:https://dockerswarm.rocks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swarmpit setup fails - http://db:5984 host unreachable

andretheronsa opened this issue · comments

Thanks to the great guide I have been able to set up traefik and portainer on a single node.

However, swarmpit does not start up successfully for me by following the steps in the guide.

  1. CouchDB is not able to start up due to missing databases related to this issue. Should the setup be updated?
  • The error looks something like this on the couchdb container:

chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards)

  • It can be resolved by running the following in the container and redeploying the stack:
    curl -X PUT http://127.0.0.1:5984/_users
    curl -X PUT http://127.0.0.1:5984/_replicator
    curl -X PUT http://127.0.0.1:5984/_global_changes
  1. The swarmpit app is unable to connect to the db service at http://db:5984
21-01-19 20:04:35 fd9c090c50a2 ERROR [swarmpit.http:71] - Request execution failed! Scope: DB
|> GET http://db:5984/
|> Headers: null
|> Payload: null
|< Message: No route to host (Host unreachable)
|< Data: { }
Jan 19, 2021 8:04:38 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.NoRouteToHostException) caught when processing request to {}->http://db:5984: No route to host (Host unreachable)

I have been unable to figure out how to debug or resolve this.

I also have my fullstack fastapi app deployed with a nested Traefik service with Gitlab. Everything else works perfectly and is setup from a clean Ubuntu 20.04 instance with only Docker 20.10.2 (API 1.41, compose 1.27.4).

Docker was installed as directed by their docs. Except I had to modify hosts for the docker/daemon. This was while trying to debug docker connectivity but I wonder if it can somehow play a role?
echo '{"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"], "dns": ["8.8.8.8", "1.1.1.1"]}' > /etc/docker/daemon.json

I am facing similar issues, any updates on this ?

Thanks for the patience! I just updated the CouchDB version, maybe that could help.

In any case, I should let you know, that I had to deprecate this website and ideas, I would no longer recommend Docker Swarm Mode for new projects: https://dockerswarm.rocks/swarm-or-kubernetes/ 🥲

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.