Nginx container won't start - hangs at "start worker processes"

Viewed 382

For some reason that I can't understand, my nginx container has started failing when it tries to start up. It just hangs after several start worker process log entries, I've included the output below:

Generating /apps/nginx/upstreams.conf...done.
Generating /apps/nginx/locations.conf...done.
Creating NGINX listener certificate...

Successfully generated /apps/nginx/resolver.conf: resolver 192.168.65.5;
Generating /apps/nginx/listen.conf...done.
Starting Nginx...
Generating /apps/nginx/upstreams.conf...done.
Generating /apps/nginx/locations.conf...done.
Creating NGINX listener certificate...
Successfully generated /apps/nginx/resolver.conf: resolver 192.168.65.5;
Generating /apps/nginx/listen.conf...done.
Starting Nginx...


Generating a RSA private key
....................................................+++++
.....................................................................................................+++++
writing new private key to '/apps/nginx/nginx-key.pem'
-----
Generating a RSA private key
........+++++
.................................................................+++++
writing new private key to '/apps/nginx/nginx-key.pem'
-----
2021/10/04 17:39:16 [notice] 1#1: using the "epoll" event method
2021/10/04 17:39:16 [notice] 1#1: nginx/1.20.1
2021/10/04 17:39:16 [notice] 1#1: built by gcc 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
2021/10/04 17:39:16 [notice] 1#1: OS: Linux 5.10.25-linuxkit
2021/10/04 17:39:16 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2021/10/04 17:39:16 [notice] 1#1: start worker processes
2021/10/04 17:39:16 [notice] 1#1: start worker process 20
2021/10/04 17:39:16 [notice] 1#1: start worker process 21
2021/10/04 17:39:16 [notice] 1#1: start worker process 22
2021/10/04 17:39:16 [notice] 1#1: start worker process 23
2021/10/04 17:39:16 [notice] 1#1: start worker process 24
2021/10/04 17:39:16 [notice] 1#1: start worker process 25

Furthermore, there are no error logs at all in /var/log/nginx/error.log

This isn't much to go on, but I'm not sure what other details may be helpful to share. I'm just wondering if anyone has seen error messages like this before in a nginx instance inside a docker container?

1 Answers

I had the same problem. This worked for me:

docker-compose build --no-cache nginx
Related