nginx-proxy: nginx process shuts itself down immediately, seemingly without any error

Thanks for you great repository. Using it on many servers, works perfectly. But have one issue today on AWS and can’t find solution to solve it. So I really hope to find help here.

docker-compose (used for many servers, only last one with issue):

version: '2'

services:
    nginx-proxy:
        image: jwilder/nginx-proxy
        ports:
            - "80:80"
            - "443:443"
        volumes:
            - ./config/params.conf:/etc/nginx/conf.d/params.conf:ro
            - ./storage/conf:/etc/nginx/conf.d
            - ./storage/vhost:/etc/nginx/vhost.d
            - ./storage/html:/usr/share/nginx/html
            - ./storage/dhparam:/etc/nginx/dhparam
            - ./storage/certs:/etc/nginx/certs:ro
            - /var/run/docker.sock:/tmp/docker.sock:ro
        restart: always

    letsencrypt:
        image: jrcs/letsencrypt-nginx-proxy-companion
        container_name: nginx-proxy-le
        volumes_from:
            - nginx-proxy
        volumes:
            - ./storage/certs:/etc/nginx/certs:rw
            - /var/run/docker.sock:/var/run/docker.sock:ro
        restart: always

volumes:
    conf:
    vhost:
    html:
    dhparam:
    certs:

networks:
    default:
        external:
            name: nginx-proxy

docker-compose logs:

docker-compose logs
Attaching to nginx-proxy-le, nginx-proxy_nginx-proxy_1
nginx-proxy-le | Info: running acme-companion version v2.1.0-25-g7f1b754
nginx-proxy-le | Warning: '/etc/acme.sh' does not appear to be a mounted volume.
nginx-proxy-le | Info: Custom Diffie-Hellman group found, generation skipped.
nginx-proxy-le | Reloading nginx proxy (3f60950e83e979aa324d8c674199a963c5e0ecf773a91ae436598c192d766fd7)...
nginx-proxy-le | 2021/09/15 10:55:51 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification ''
nginx-proxy-le | 2021/09/15 10:55:51 [notice] 54#54: signal process started
nginx-proxy-le | 2021/09/15 10:55:51 Generated '/app/letsencrypt_service_data' from 5 containers
nginx-proxy-le | 2021/09/15 10:55:51 Running '/app/signal_le_service'
nginx-proxy-le | 2021/09/15 10:55:51 Watching docker events
nginx-proxy-le | 2021/09/15 10:55:51 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'
nginx-proxy-le | [Wed Sep 15 10:55:52 UTC 2021] Create account key ok.
nginx-proxy-le | [Wed Sep 15 10:55:52 UTC 2021] Registering account: https://acme-v02.api.letsencrypt.org/directory
nginx-proxy-le | [Wed Sep 15 10:55:53 UTC 2021] Registered
nginx-proxy-le | [Wed Sep 15 10:55:53 UTC 2021] ACCOUNT_THUMBPRINT='UW5wVKaGcgtEBNQ41OuMtm5eQseuZGNDpY35n76DY0o'
nginx-proxy-le | Reloading nginx proxy (3f60950e83e979aa324d8c674199a963c5e0ecf773a91ae436598c192d766fd7)...
nginx-proxy-le | 2021/09/15 10:55:53 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification ''
nginx-proxy-le | 2021/09/15 10:55:53 [notice] 76#76: signal process started
nginx-proxy-le | Creating/renewal subdomain.mydomain.com certificates... (subdomain.mydomain.com)
nginx-proxy-le | [Wed Sep 15 10:55:54 UTC 2021] Using CA: https://acme-v02.api.letsencrypt.org/directory
nginx-proxy-le | [Wed Sep 15 10:55:54 UTC 2021] Creating domain key
nginx-proxy-le | [Wed Sep 15 10:55:55 UTC 2021] The domain key is here: /etc/acme.sh/me@mymail.com/subdomain.mydomain.com/subdomain.mydomain.com.key
nginx-proxy-le | [Wed Sep 15 10:55:55 UTC 2021] Single domain='subdomain.mydomain.com'
nginx-proxy-le | [Wed Sep 15 10:55:55 UTC 2021] Getting domain auth token for each domain
nginx-proxy-le | [Wed Sep 15 10:55:56 UTC 2021] Getting webroot for domain='subdomain.mydomain.com'
nginx-proxy-le | [Wed Sep 15 10:55:56 UTC 2021] Verifying: subdomain.mydomain.com
nginx-proxy_1  | Custom dhparam.pem file found, generation skipped
nginx-proxy_1  | forego      | starting dockergen.1 on port 5000
nginx-proxy_1  | forego      | starting nginx.1 on port 5100
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:49 [notice] 26#26: using the "epoll" event method
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:49 [notice] 26#26: nginx/1.21.1
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:49 [notice] 26#26: built by gcc 8.3.0 (Debian 8.3.0-6)
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:49 [notice] 26#26: OS: Linux 5.11.0-1017-aws
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:49 [notice] 26#26: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:49 [notice] 26#26: start worker processes
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:49 [notice] 26#26: start worker process 30
nginx-proxy_1  | dockergen.1 | 2021/09/15 10:55:49 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx-proxy_1  | dockergen.1 | 2021/09/15 10:55:49 Watching docker events
nginx-proxy_1  | dockergen.1 | 2021/09/15 10:55:50 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx-proxy_1  | dockergen.1 | 2021/09/15 10:55:50 Received event start for container 7dcd1c40b0ce
nginx-proxy_1  | dockergen.1 | 2021/09/15 10:55:50 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: signal 1 (SIGHUP) received from 54, reconfiguring
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: reconfiguring
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: using the "epoll" event method
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: start worker processes
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: start worker process 55
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 30#30: gracefully shutting down
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 30#30: exiting
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 30#30: exit
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: signal 17 (SIGCHLD) received from 30
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: worker process 30 exited with code 0
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:51 [notice] 26#26: signal 29 (SIGIO) received
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: signal 1 (SIGHUP) received from 76, reconfiguring
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: reconfiguring
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: using the "epoll" event method
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: start worker processes
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: start worker process 77
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 55#55: gracefully shutting down
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 55#55: exiting
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 55#55: exit
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: signal 17 (SIGCHLD) received from 55
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: worker process 55 exited with code 0
nginx-proxy_1  | nginx.1     | 2021/09/15 10:55:53 [notice] 26#26: signal 29 (SIGIO) received

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 35 (12 by maintainers)

Commits related to this issue

Most upvoted comments

If anyone still experience this issue (nginx process shutting itself down immediately without obvious error on versions >= 0.9.2 but does not on version 0.9.1) now that #2387 has been merged, please chime in.

I have the same(?) issue (macOS 12.1, Docker 4.3.1, Compose 1.29.2). Even with the example configuration, the process shuts itself down immediately (seemingly without any error):

nginx_1       | Info: running nginx-proxy version 0.10.0-21-g3670d39
nginx_1       | Setting up DH Parameters..
nginx_1       | forego      | starting dockergen.1 on port 5000
nginx_1       | forego      | starting nginx.1 on port 5100
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: using the "epoll" event method
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: nginx/1.21.6
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: OS: Linux 5.10.76-linuxkit
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: start worker processes
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: start worker process 23
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: start worker process 24
nginx_1       | dockergen.1 | 2022/02/21 12:02:20 Generated '/etc/nginx/conf.d/default.conf' from 2 containers
nginx_1       | dockergen.1 | 2022/02/21 12:02:20 Running 'nginx -s reload'
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: signal 1 (SIGHUP) received from 26, reconfiguring
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: reconfiguring
nginx_1       | dockergen.1 | 2022/02/21 12:02:20 Watching docker events
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: using the "epoll" event method
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: start worker processes
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: start worker process 29
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: start worker process 30
nginx_1       | dockergen.1 | 2022/02/21 12:02:20 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 23#23: gracefully shutting down
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 24#24: gracefully shutting down
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 24#24: exiting
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 23#23: exiting
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 24#24: exit
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 23#23: exit
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: signal 17 (SIGCHLD) received from 24
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: worker process 24 exited with code 0
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: signal 29 (SIGIO) received
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: signal 17 (SIGCHLD) received from 23
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: worker process 23 exited with code 0
nginx_1       | nginx.1     | 2022/02/21 12:02:20 [notice] 17#17: signal 29 (SIGIO) received

Switching to nginxproxy/nginx-proxy:0.9.1-alpine (as suggested for the last working version above) does not result in this behaviour. I haven’t tried any versions in-between 0.9.1 and 0.10.0, but could do that if it would be helpful.

Same issue here. I’ll try to going back to 0.8.0.

UPDATE: 0.9.1 is working, 0.9.2 and 0.9.3 not.

@danifr thanks for the feedback, I’ll merge the change to main this week. I’m not yet certain we’ve identified and fixed the same issue that others here were experiencing though.

One week later, nginx-proxy container is still running on my Raspberry Pi 2 (1Gb of RAM). During this 7 days there were no errors nor service interruptions. So we can call this a success. Thanks a lot @buchdag

Thanks a lot, I went for 1780-alpine, so far so good, but I will leave it running for a few days. I will report again in one week or so.

same here,

GNU nano 2.9.3 docker-compose.yml Modified

version: '2'
services:
  nginx-proxy:
    image: nginxproxy/nginx-proxy:0.9.1-alpine
    container_name: nginx-proxy
    ports:
      - "80:80"
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro

  whoami:
    image: jwilder/whoami
    environment:
      - VIRTUAL_HOST=whoami.local

SOLVER THE ERRROR LINE, but still does not working properly… but is and advance

I have exactly the same issue reported by https://github.com/nginx-proxy/nginx-proxy/issues/1780#issuecomment-1080029015

As other comments mentioned before, 0.9.1 was the latest version that worker for me.

$ docker --version
Docker version 20.10.17, build 100c70180f
$ docker-compose --version
docker-compose version 1.29.2, build unknown
$ uname -a
Linux alarmpi 5.10.83-1-rpi-legacy-ARCH #1 SMP Tue Dec 7 15:22:30 UTC 2021 armv7l GNU/Linux