n-p-m container doesn't come back up after docker service restart after updating to 2.10.0
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker image?- Yes
- Are you sure you're not using someone else's docker image?
- Yes
- Have you searched for similar issues (both open and closed)?
- Yes
Describe the bug
For years I have been backing up my rpi4 on which n-p-m runs with https://github.com/framps/raspiBackup and everything was fine. Before the backup I shut down docker service, then after backup restart it and all the containers came properly back up. After updating to 2.10.0 the container doesn't start back up when docker service starts with the error in log below.
Nginx Proxy Manager Version
2.10.0
To Reproduce Steps to reproduce the behavior:
sudo systemctl stop docker- run my backup
sudo systemctl start docker && sudo systemctl daemon-reload(daemon-reload as the backup stops bunch of other services like cron and snmpd and they always complain about the daemon-reload when they come back up)- See error
Expected behavior
container should come back up as normal (all the others do)
Screenshots
n/a
Operating System
raspberry pi4 Linux pi-docker 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux
Additional context
logs:
nginx-proxy-manager_pi-docker | [3/28/2023] [8:25:01 AM] [SSL ] › ℹ info Renew Complete
nginx-proxy-manager_pi-docker | s6-rc: info: service legacy-services: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service legacy-services successfully stopped
nginx-proxy-manager_pi-docker | s6-rc: info: service nginx: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service frontend: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service backend: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service frontend successfully stopped
nginx-proxy-manager_pi-docker | s6-rc: info: service backend successfully stopped
nginx-proxy-manager_pi-docker | s6-rc: info: service nginx successfully stopped
nginx-proxy-manager_pi-docker | s6-rc: info: service prepare: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service prepare successfully stopped
nginx-proxy-manager_pi-docker | s6-rc: info: service legacy-cont-init: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service legacy-cont-init successfully stopped
nginx-proxy-manager_pi-docker | s6-rc: info: service fix-attrs: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service fix-attrs successfully stopped
nginx-proxy-manager_pi-docker | s6-rc: info: service s6rc-oneshot-runner: stopping
nginx-proxy-manager_pi-docker | s6-rc: info: service s6rc-oneshot-runner successfully stopped
nginx-proxy-manager_pi-docker | [3/28/2023] [8:30:52 AM] [Global ] › ℹ info PID 140 received SIGTERM
nginx-proxy-manager_pi-docker | [3/28/2023] [8:30:52 AM] [Global ] › ℹ info Stopping.
nginx-proxy-manager_pi-docker | s6-rc: info: service s6rc-oneshot-runner: starting
nginx-proxy-manager_pi-docker | s6-rc: info: service s6rc-oneshot-runner successfully started
nginx-proxy-manager_pi-docker | s6-rc: info: service fix-attrs: starting
nginx-proxy-manager_pi-docker | s6-rc: info: service fix-attrs successfully started
nginx-proxy-manager_pi-docker | s6-rc: info: service legacy-cont-init: starting
nginx-proxy-manager_pi-docker | s6-rc: info: service legacy-cont-init successfully started
nginx-proxy-manager_pi-docker | s6-rc: info: service prepare: starting
nginx-proxy-manager_pi-docker | s6-rc: fatal: timed out
nginx-proxy-manager_pi-docker | s6-sudoc: fatal: unable to get exit status from server: Operation timed out
nginx-proxy-manager_pi-docker | /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
[root@docker-7bce5741f82f:/app]# cat /run/uncaught-logs/current
cat: /run/uncaught-logs/current: No such file or directory
docker-compose.yml:
version: '3'
services:
nginx-proxy-manager:
container_name: nginx-proxy-manager_pi-docker
image: 'jc21/nginx-proxy-manager:latest'
ports:
- '10080:80'
- '10081:81'
- '10443:443'
volumes:
- ./data_npm:/data
- ./letsencrypt:/etc/letsencrypt
restart: always
environment:
X_FRAME_OPTIONS: "sameorigin"
DB_SQLITE_FILE: "/data/database.sqlite"
TZ: "Europe/London"
PUID: "1000"
PGID: "1000"
Same for me on the x86 side
Same here, 16 pages down for minimum 10h. Did you test it beofre release?
Same here, 16 pages down for minimum 10h. Did you test it beofre release?
@p6002 Roll back to 2.9.22 if you are concerned
Same here, 16 pages down for minimum 10h. Did you test it beofre release?
That's a bit harsh don't you think, the stack works immediately by simple docker compose up -d, I wouldn't think restarting docker service is a normal use case scenario that would be tested before release, also there were all these warning about the rework and how things might break on the release page; and guess what - things broke.
edit: also if you don't have a system in place to notify you your pages are offline for 10h that's on you really
I use Watchtower, and I noticed the unavailability after I left home and will be able to fix it in about 6h.
Had the same problem here, probably because I also have watchtower running, so that's on me. I am now using 2.9.22 and everything works.
Same here, watchtower auto upgrade to 2.10.0, same last log.
I restart and found it looks like some user permission issue, nginx have no privilege to bind 80 port. If change container network to bridge mode, it work. But I ran it on host mode previously.
Logs below:
❯ Configuring npmuser ...
911
usermod: no changes
...
-------------------------------------
_ _ ____ __ __
| \ | | _ \| \/ |
| \| | |_) | |\/| |
| |\ | __/| | | |
|_| \_|_| |_| |_|
-------------------------------------
User UID: 911
User GID: 911
-------------------------------------
s6-rc: info: service prepare successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service frontend: starting
s6-rc: info: service backend: starting
s6-rc: info: service nginx successfully started
❯ Starting nginx ...
s6-rc: info: service frontend successfully started
s6-rc: info: service backend successfully started
❯ Starting backend ...
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
[3/28/2023] [12:54:42 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite
❯ Starting nginx ...
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
[3/28/2023] [12:54:44 PM] [Migrate ] › ℹ info Current database version: none
❯ Starting nginx ...
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
❯ Starting nginx ...
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
❯ Starting nginx ...
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
more info in / duplicate with #2750
Here is my log: https://i.ibb.co/9YjCbd4/2023-03-28-160245.png
I use Watchtower, and I noticed the unavailability after I left home and will be able to fix it in about 6h.
Same here have watchtower on and noticed today its broken :(
Can confirm.
s6-sudoc: fatal: unable to get exit status from server: Operation timed out
s6-rc: warning: unable to start service prepare: command exited 111
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information
Weirdly the routes still (mostly) worked but the front-end was completely reset. I had no user accounts and it showed zero proxy hosts or streams even though they were in the back-end and routing correctly for the most part (Vikunja threw a hissy fit and I needed to restart the container twice in the last 12 hours or so to get it to work again).
Found this and downgrade to 2.9.22 immediately corrected the issue. I can't pull logs right now as I'm off on vacation and happy to have at least found a stable state.
@hugalafutro @Mosney This seems to be expected behavior.
Release notes for 2.9.22 state: https://github.com/NginxProxyManager/nginx-proxy-manager/releases
v2.9.22
⚠️ The next release v2.10.0 will have changes that may adversely affect you, please pin your docker tag to 2.9.22 and upgrade after you conduct a full backup.
and
v2.10.0
⚠️ This release has changes that may adversely affect you, please pin your docker tag to the previous release 2.9.22 and upgrade after you conduct a full backup.
But I can't find anything about how to prevent this 'adverse affect'.
Even with watchtower disabled, I am getting this error when the container restarts after offen/docker-volume-backup runs. Out of 30+ containers this is the only one that does this. 2.10.1 seems to address it, won't know if it's working till tomorrow.
v2.9.22 is the last working version for me. Anything after is broken.
v2.10.1 (latest) first run:
2023-03-29T15:38:06.416615907Z s6-rc: info: service s6rc-oneshot-runner: starting
2023-03-29T15:38:06.497995780Z s6-rc: info: service s6rc-oneshot-runner successfully started
2023-03-29T15:38:06.498370196Z s6-rc: info: service fix-attrs: starting
2023-03-29T15:38:06.600904985Z s6-rc: info: service fix-attrs successfully started
2023-03-29T15:38:06.601300723Z s6-rc: info: service legacy-cont-init: starting
2023-03-29T15:38:06.611194026Z s6-rc: info: service legacy-cont-init successfully started
2023-03-29T15:38:06.611682944Z s6-rc: info: service prepare: starting
2023-03-29T15:38:07.025871639Z ❯ Configuring npmuser ...
2023-03-29T15:38:08.087720520Z id: 'npmuser': no such user
2023-03-29T15:38:11.422198781Z s6-rc: fatal: timed out
2023-03-29T15:38:11.484348435Z /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
2023-03-29T15:38:11.484577938Z s6-sudoc: fatal: unable to get exit status from server: Operation timed out
Restart after failed run:
2023-03-29T18:33:18.838767897Z s6-rc: info: service legacy-cont-init: stopping
2023-03-29T18:33:19.018553560Z s6-rc: info: service legacy-cont-init successfully stopped
2023-03-29T18:33:19.018907229Z s6-rc: info: service fix-attrs: stopping
2023-03-29T18:33:19.053638003Z s6-rc: info: service fix-attrs successfully stopped
2023-03-29T18:33:19.054022095Z s6-rc: info: service s6rc-oneshot-runner: stopping
2023-03-29T18:33:19.340012096Z s6-rc: info: service s6rc-oneshot-runner successfully stopped
2023-03-29T18:33:36.206299570Z s6-rc: info: service s6rc-oneshot-runner: starting
2023-03-29T18:33:36.335664871Z s6-rc: info: service s6rc-oneshot-runner successfully started
2023-03-29T18:33:36.336188178Z s6-rc: info: service fix-attrs: starting
2023-03-29T18:33:36.390994707Z s6-rc: info: service fix-attrs successfully started
2023-03-29T18:33:36.391378931Z s6-rc: info: service legacy-cont-init: starting
2023-03-29T18:33:36.401504391Z s6-rc: info: service legacy-cont-init successfully started
2023-03-29T18:33:36.401845478Z s6-rc: info: service prepare: starting
2023-03-29T18:33:36.499809504Z ❯ Configuring npmuser ...
2023-03-29T18:33:36.883768050Z undefined
2023-03-29T18:33:37.037719426Z usermod: no changes
2023-03-29T18:33:39.137220293Z ❯ Checking paths ...
2023-03-29T18:33:39.686610261Z ❯ Setting ownership ...
2023-03-29T18:33:40.135531132Z ❯ Dynamic resolvers ...
2023-03-29T18:33:40.361658900Z ❯ IPv6 ...
2023-03-29T18:33:40.441375761Z Enabling IPV6 in hosts in: /etc/nginx/conf.d
2023-03-29T18:33:40.442032347Z - /etc/nginx/conf.d/default.conf
2023-03-29T18:33:40.918985474Z - /etc/nginx/conf.d/production.conf
2023-03-29T18:33:41.088079523Z - /etc/nginx/conf.d/include/ip_ranges.conf
2023-03-29T18:33:41.088286459Z - /etc/nginx/conf.d/include/ssl-ciphers.conf
2023-03-29T18:33:41.088453090Z - /etc/nginx/conf.d/include/block-exploits.conf
2023-03-29T18:33:41.127128172Z - /etc/nginx/conf.d/include/proxy.conf
2023-03-29T18:33:41.154262663Z - /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
2023-03-29T18:33:41.209409528Z - /etc/nginx/conf.d/include/force-ssl.conf
2023-03-29T18:33:41.213141411Z s6-rc: fatal: timed out
2023-03-29T18:33:41.215202207Z s6-sudoc: fatal: unable to get exit status from server: Operation timed out
2023-03-29T18:33:41.217335379Z /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
@DcR-NL you need to add the new environment values PUID, PGID in like so.
version: '3'
services:
nginx-proxy-manager:
container_name: nginx-proxy-manager_pi-docker
image: 'jc21/nginx-proxy-manager:latest'
ports:
- '10080:80'
- '10081:81'
- '10443:443'
volumes:
- ./data_npm:/data
- ./letsencrypt:/etc/letsencrypt
restart: always
environment:
X_FRAME_OPTIONS: "sameorigin"
DB_SQLITE_FILE: "/data/database.sqlite"
TZ: "Europe/London"
PUID: "1000"
PGID: "1000"
Says so in the changelog you should read before upgrading any container not trusting watchtower blindly. This issue here is exactly why. I always recommend https://github.com/crazy-max/diun instead.
I have tested v2.10.1 and it correctly comes up after restarting docker service and as such I am closing this issue, y'all using watchtower and not reading changelogs is beyond the scope of this issue or platform.
edit: logs from docker service restart as the container comes back up correctly:
nginx-proxy-manager_site19 | s6-rc: info: service legacy-services: stopping
nginx-proxy-manager_site19 | s6-rc: info: service legacy-services successfully stopped
nginx-proxy-manager_site19 | s6-rc: info: service nginx: stopping
nginx-proxy-manager_site19 | s6-rc: info: service frontend: stopping
nginx-proxy-manager_site19 | s6-rc: info: service backend: stopping
nginx-proxy-manager_site19 | s6-rc: info: service frontend successfully stopped
nginx-proxy-manager_site19 | s6-rc: info: service backend successfully stopped
nginx-proxy-manager_site19 | s6-rc: info: service nginx successfully stopped
nginx-proxy-manager_site19 | s6-rc: info: service prepare: stopping
nginx-proxy-manager_site19 | s6-rc: info: service prepare successfully stopped
nginx-proxy-manager_site19 | s6-rc: info: service legacy-cont-init: stopping
nginx-proxy-manager_site19 | s6-rc: info: service legacy-cont-init successfully stopped
nginx-proxy-manager_site19 | s6-rc: info: service fix-attrs: stopping
nginx-proxy-manager_site19 | s6-rc: info: service fix-attrs successfully stopped
nginx-proxy-manager_site19 | s6-rc: info: service s6rc-oneshot-runner: stopping
nginx-proxy-manager_site19 | s6-rc: info: service s6rc-oneshot-runner successfully stopped
nginx-proxy-manager_site19 | [3/29/2023] [9:54:26 PM] [Global ] › ℹ info PID 146 received SIGTERM
nginx-proxy-manager_site19 | [3/29/2023] [9:54:26 PM] [Global ] › ℹ info Stopping.
nginx-proxy-manager_site19 | s6-rc: info: service s6rc-oneshot-runner: starting
nginx-proxy-manager_site19 | s6-rc: info: service s6rc-oneshot-runner successfully started
nginx-proxy-manager_site19 | s6-rc: info: service fix-attrs: starting
nginx-proxy-manager_site19 | s6-rc: info: service fix-attrs successfully started
nginx-proxy-manager_site19 | s6-rc: info: service legacy-cont-init: starting
nginx-proxy-manager_site19 | s6-rc: info: service legacy-cont-init successfully started
nginx-proxy-manager_site19 | s6-rc: info: service prepare: starting
nginx-proxy-manager_site19 | ❯ Configuring npmuser ...
nginx-proxy-manager_site19 | 1000
nginx-proxy-manager_site19 | usermod: no changes
nginx-proxy-manager_site19 | ❯ Checking paths ...
nginx-proxy-manager_site19 | ❯ Setting ownership ...
nginx-proxy-manager_site19 | ❯ Dynamic resolvers ...
nginx-proxy-manager_site19 | ❯ IPv6 ...
nginx-proxy-manager_site19 | Enabling IPV6 in hosts in: /etc/nginx/conf.d
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/default.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/force-ssl.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/block-exploits.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/assets.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/proxy.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/ip_ranges.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/ssl-ciphers.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/include/resolvers.conf
nginx-proxy-manager_site19 | - /etc/nginx/conf.d/production.conf
nginx-proxy-manager_site19 | Enabling IPV6 in hosts in: /data/nginx
nginx-proxy-manager_site19 | - /data/nginx/default_host/site.conf
nginx-proxy-manager_site19 | - /data/nginx/proxy_host/1.conf
nginx-proxy-manager_site19 | - /data/nginx/proxy_host/3.conf
nginx-proxy-manager_site19 | - /data/nginx/dead_host/1.conf
nginx-proxy-manager_site19 | ❯ Docker secrets ...
nginx-proxy-manager_site19 |
nginx-proxy-manager_site19 | -------------------------------------
nginx-proxy-manager_site19 | _ _ ____ __ __
nginx-proxy-manager_site19 | | \ | | _ \| \/ |
nginx-proxy-manager_site19 | | \| | |_) | |\/| |
nginx-proxy-manager_site19 | | |\ | __/| | | |
nginx-proxy-manager_site19 | |_| \_|_| |_| |_|
nginx-proxy-manager_site19 | -------------------------------------
nginx-proxy-manager_site19 | User UID: 1000
nginx-proxy-manager_site19 | User GID: 1000
nginx-proxy-manager_site19 | -------------------------------------
nginx-proxy-manager_site19 |
nginx-proxy-manager_site19 | s6-rc: info: service prepare successfully started
nginx-proxy-manager_site19 | s6-rc: info: service nginx: starting
nginx-proxy-manager_site19 | s6-rc: info: service frontend: starting
nginx-proxy-manager_site19 | s6-rc: info: service backend: starting
nginx-proxy-manager_site19 | s6-rc: info: service nginx successfully started
nginx-proxy-manager_site19 | s6-rc: info: service frontend successfully started
nginx-proxy-manager_site19 | ❯ Starting nginx ...
nginx-proxy-manager_site19 | s6-rc: info: service backend successfully started
nginx-proxy-manager_site19 | s6-rc: info: service legacy-services: starting
nginx-proxy-manager_site19 | ❯ Starting backend ...
nginx-proxy-manager_site19 | s6-rc: info: service legacy-services successfully started
nginx-proxy-manager_site19 | [3/29/2023] [9:54:39 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [Migrate ] › ℹ info Current database version: none
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [Setup ] › ℹ info Logrotate Timer initialized
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [Setup ] › ℹ info Logrotate completed.
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services...
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v6
nginx-proxy-manager_site19 | [3/29/2023] [9:54:41 PM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized
nginx-proxy-manager_site19 | [3/29/2023] [9:54:42 PM] [SSL ] › ℹ info Renewing SSL certs close to expiry...
nginx-proxy-manager_site19 | [3/29/2023] [9:54:42 PM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized
nginx-proxy-manager_site19 | [3/29/2023] [9:54:42 PM] [Global ] › ℹ info Backend PID 138 listening on port 3000 ...
nginx-proxy-manager_site19 | [3/29/2023] [9:54:42 PM] [Nginx ] › ℹ info Reloading Nginx
nginx-proxy-manager_site19 | [3/29/2023] [9:54:42 PM] [SSL ] › ℹ info Renew Complete
@hugalafutro Odd - your original post mentioned the PUID and PGID already - I have had it in as well and the same issue persists...
@hugalafutro Not the solution for me. I've been adding TZ, PUID and PGID to all of my containers way before it was required on this one. It still fails.
@DcR-NL your logs suggest otherwise, as they report the puid/pgid value as undefined
2023-03-29T18:33:36.499809504Z ❯ Configuring npmuser ...
2023-03-29T18:33:36.883768050Z undefined
my logs:
nginx-proxy-manager_site19 | ❯ Configuring npmuser ...
nginx-proxy-manager_site19 | 1000
@bothaf do a backup just in case then do chown -R 1000 on your whole n-p-m stack directory (or w/e number of user you used), if that doesn't solve it I've got nothing, those are literally the only 2 things I did to get 2.10.0 working and 2.10.1 with same config doesn't exhibit this issue for me anymore
edit: i'm not actually sure if chown works with number i used my users name which on ubuntu host is 1000, but you get the drift
@bothaf do a backup just in case then do
chown -R 1000on your whole n-p-m stack directory (or w/e number of user you used), if that doesn't solve it I've got nothing, those are literally the only 2 things I did to get 2.10.0 working and 2.10.1 with same config doesn't exhibit this issue for me anymore
Thnx - yes just had the same thought (in my case 1007 but yes I get the drift) and no go..
# docker stop npm && chown -R 1007:1007 /docker/nginx-proxy-manager/* && docker start npm
Container logs...
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service prepare: starting
❯ Configuring npmuser ...
1007
usermod: no changes
❯ Checking paths ...
❯ Setting ownership ...
s6-rc: fatal: timed out
s6-sudoc: fatal: unable to get exit status from server: Operation timed out
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.