#14429·Sylius

Nginx container failed to connect to localhost in Sylius project on Docker

Author: achraflamhamdiCreated Oct 11, 2022Updated Sep 23, 2026
LabelsHelp WantedDockerMS Windows

Sylius version affected: 1.12

I tried to work on sylius project with docker, and after all passed fine, an error in nginx container faced me, it says (as mentioned bellow) that connection with the local host is refused

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
172.18.0.1 - - [11/Oct/2022:13:58:11 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.34" "-"
2022/10/11 13:57:41 [notice] 1#1: signal 17 (SIGCHLD) received from 32
2022/10/11 13:57:41 [notice] 1#1: worker process 32 exited with code 0
2022/10/11 13:57:41 [notice] 1#1: signal 29 (SIGIO) received
2022/10/11 13:57:41 [notice] 1#1: signal 17 (SIGCHLD) received from 31
2022/10/11 13:57:41 [notice] 1#1: worker process 31 exited with code 0
2022/10/11 13:57:41 [notice] 1#1: exit
2022/10/11 13:57:43 [notice] 1#1: using the "epoll" event method
2022/10/11 13:57:43 [notice] 1#1: nginx/1.21.6
2022/10/11 13:57:43 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027) 
2022/10/11 13:57:43 [notice] 1#1: OS: Linux 5.10.124-linuxkit
2022/10/11 13:57:43 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2022/10/11 13:57:43 [notice] 1#1: start worker processes
2022/10/11 13:57:43 [notice] 1#1: start worker process 31
2022/10/11 13:57:43 [notice] 1#1: start worker process 32
2022/10/11 13:58:11 [error] 31#31: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "localhost"