[Pkg-nginx-maintainers] Bug#1028155: nginx-common: nginx fails to start on reboot when IPv6 enabled.

LeJacq, Jean Pierre jeanpierre.lejacq at quoininc.com
Sat Jan 7 21:28:36 GMT 2023


Package: nginx-common
Version: 1.22.1-5
Severity: normal

Dear Maintainer,

* What led up to the situation?

I have a dual IPv4/IPv6 server with nginx listening on both with the following directive:

server
  {
    server_name "example.org";
    listen 144.202.24.41:443 default_server ssl http2;
    listen [2001:19f0:5401:58:5400:3ff:fe59:e2b1]:443 default_server ssl http2;

    ...
  }

When I reboot the server and login, systemctl report the following:

$ systemctl status nginx.service 
× nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2023-01-07 16:17:40 EST; 50s ago
       Docs: man:nginx(8)
    Process: 481 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 49ms

Jan 07 16:17:40 lj01 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 07 16:17:40 lj01 nginx[481]: nginx: [emerg] bind() to [2001:19f0:5401:58:5400:3ff:fe59:e2b1]:443 failed (99: Cannot assign requested address)
Jan 07 16:17:40 lj01 nginx[481]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 07 16:17:40 lj01 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jan 07 16:17:40 lj01 systemd[1]: nginx.service: Failed with result 'exit-code'.
Jan 07 16:17:40 lj01 systemd[1]: Failed to start A high performance web server and a reverse proxy server.

* What exactly did you do (or not do) that was effective (or
   ineffective)?

Restarting the nginx service resolves the issue.

This appears to be a dependency issue in the nginx.service file.

-- System Information:
Debian Release: 11.4 (Qinux 3.2)
  APT prefers stable-security
  APT policy: (1000, 'stable-security'), (1000, 'stable'), (500, 'stable-updates'), (100, 'bullseye-fasttrack'), (100, 'bullseye-backports-staging'), (100, 'unstable'), (10, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-0.deb11.6-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Thank you for using reportbug

-- 
JP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-nginx-maintainers/attachments/20230107/55e7c7c5/attachment.sig>


More information about the Pkg-nginx-maintainers mailing list