502 Bad Gateway' caused by: dial tcp 172.30.0.8:29091: connect: connection refused"

Hello @tommoulard thanks for your suggestion.
Would you have a suggestion on how I can do to check where the error resides ?

One of the strange things is that I am able to communicate fine with my mezos service on http://ud2.REDACTED.com:29091/version externally, which I want to avoid and force through traefik.

Edits :

$ sudo docker ps
CONTAINER ID   IMAGE                                                                             COMMAND                  CREATED          STATUS                    PORTS                                                                                                                 NAMES
44dc9fa11be3   traefik:v2.6                                                                      "/entrypoint.sh --lo…"   3 minutes ago    Up 3 minutes              0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   traefik
b245a64bc07c   registryxxx/mezos/mezos:v2.2.5                               "./run-mezos.bash ru…"   13 minutes ago   Up 13 minutes (healthy)   0.0.0.0:29091->29091/tcp, :::29091->29091/tcp                                                                         specific_mezos_1
[...]

$ docker exec -ti 44dc9fa11be3 sh
/ # apk add --no-cache curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/4) Installing brotli-libs (1.0.9-r5)
(2/4) Installing nghttp2-libs (1.43.0-r0)
(3/4) Installing libcurl (7.79.1-r0)
(4/4) Installing curl (7.79.1-r0)
Executing busybox-1.33.1-r6.trigger
OK: 11 MiB in 20 packages
/ # curl -v http://specific_mezos_1:29091/version
*   Trying 172.30.0.8:29091...
* connect to 172.30.0.8 port 29091 failed: Connection refused
* Failed to connect to specific_mezos_1 port 29091 after 0 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to specific_mezos_1 port 29091 after 0 ms: Connection refused
/ # curl -v http://specific-mezos:29091/version
*   Trying 172.30.0.8:29091...
* connect to 172.30.0.8 port 29091 failed: Connection refused
* Failed to connect to specific-mezos port 29091 after 0 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to specific-mezos port 29091 after 0 ms: Connection refused
/ # ping specific-mezos
PING specific-mezos (172.30.0.8): 56 data bytes
64 bytes from 172.30.0.8: seq=0 ttl=64 time=0.050 ms
64 bytes from 172.30.0.8: seq=1 ttl=64 time=0.040 ms
64 bytes from 172.30.0.8: seq=2 ttl=64 time=0.038 ms
64 bytes from 172.30.0.8: seq=3 ttl=64 time=0.045 ms
^C
--- specific-mezos ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.038/0.043/0.050 ms

My understanding is that those open ports should allow traefik to connect to specific-mezos on those ports?

  • 0.0.0.0:29091->29091/tcp, :::29091->29091/tcp

Thanks in advance