Docker Community Forums

Share and learn in the Docker community.

Official Nextcloud Repo results in Connection refused

I followed to setup nextcloud using the linked nginx.conf and everything like in that howto.

Unfortunately, when accessing the site, it just displays “502 Bad Gateway” and the nginx container lists an error:
[error] 6#6: *1 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: , request: "GET / HTTP/1.0", upstream: "fastcgi://"

For debugging I did two things:

  • I opened port 9000 of the nextcloud:fpm container
  • I added a busybox container in the same docker network

So, running telnet localhost 9000 from docker host now succeeds.
While running telnet app 9000 or telnet 9000 from busybox container fails.
(“app” is the docker hostname for the fpm container, is the IP of that container. Ping works.)

Why is fpm accessible from the host network, but not from the very same docker network it resides is?
What can I do to figure it out?
What else do you need to help me?