group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #33207
[Bug 1743592] Re: NGINX fails to start/install/upgrade if IPv6 is completely disabled.
This bug was fixed in the package nginx - 1.17.5-0ubuntu1
---------------
nginx (1.17.5-0ubuntu1) focal; urgency=medium
* New upstream release (1.17.5) - full changelog available from
http://nginx.org/en/CHANGES
* Remaining Ubuntu-specific changes:
- debian/patches/ubuntu-branding.patch: add Ubuntu branding (refreshed)
- d/{control,rules,nginx-core.*}: add new binary package for main,
nginx-core, which contains only source-tarball-included modules
and no third-party modules.
- debian/tests/control: add nginx-core test.
- debian/apport/source_nginx.py: Add apport hooks for additional bug
information gathering.
- debian/nginx-common.install: Add install rule for apport hooks.
- d/nginx-{core,light,full,extras}.postinst: Add checks for whether
port 80 is in use or not to determine whether or not to attempt
starting of the NGINX service during install/upgrade
- d/control: Add dependencies to nginx-{core,light,full,extras} on
`iproute2` as the postinst scripts now use `ss` to determine if
Port 80 is open or not.
- d/rules: Enable --with-compat build option for all nginx package
flavors
- d/{control,rules,copyright,modules/http-geoip2*}: Add GeoIP2 third party
module to nginx-full and nginx-extras (and use proper DEP5 syntax for
d/copyright).
* New Ubuntu-specific changes:
- d/conf/sites-available/default: Update default nginx site configuration
file to remove the IPv6 listening line so that servers running without
IPv6 enabled at all on the system will start nginx properly.
(LP: #1743592)
-- Thomas Ward <teward@xxxxxxxxxx> Fri, 01 Nov 2019 11:55:10 -0400
** Changed in: nginx (Ubuntu)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1743592
Title:
NGINX fails to start/install/upgrade if IPv6 is completely disabled.
Status in nginx package in Ubuntu:
Fix Released
Status in nginx source package in Xenial:
Won't Fix
Status in nginx source package in Bionic:
Won't Fix
Status in nginx source package in Disco:
Won't Fix
Status in nginx source package in Eoan:
Won't Fix
Status in nginx package in Debian:
New
Bug description:
[IMPACT]
With current default vhost listening on IPV6, nginx won't start on
fully IPV6 disabled system, expecting to connect to a IPV6 socket on
port 80.
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
==> nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
nginx: configuration file /etc/nginx/nginx.conf test failed
# cat /etc/nginx/sites-enabled/default
......
server {
listen 80 default_server;
==> listen [::]:80 default_server;
......
[TEST CASE]
* Disable ipv6
# cat /proc/cmdline
.... ipv6.disable=1
* Reboot for the kernel parameter to be taken into account.
* Fresh install of nginx:
# apt-get install nginx -y
Output:
--------
# apt-get install nginx -y
.......................
Setting up nginx-core (1.14.0-0ubuntu1.6) ...
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-10-23 14:01:26 UTC; 6ms ago
Docs: man:nginx(8)
Process: 1005 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Oct 23 14:01:26 nginxbionictest1 systemd[1]: Starting A high performance web server and a reverse proxy server...
Oct 23 14:01:26 nginxbionictest1 nginx[1005]: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
Oct 23 14:01:26 nginxbionictest1 nginx[1005]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 23 14:01:26 nginxbionictest1 systemd[1]: nginx.service: Control process exited, code=exited status=1
Oct 23 14:01:26 nginxbionictest1 systemd[1]: nginx.service: Failed with result 'exit-code'.
Oct 23 14:01:26 nginxbionictest1 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
dpkg: error processing package nginx-core (--configure):
installed nginx-core package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-core (<< 1.14.0-0ubuntu1.6.1~) | nginx-full (<< 1.14.0-0ubuntu1.6.1~) | nginx-light (<< 1.14.0-0ubuntu1.6.1~) | nginx-extras (<< 1.14.0-0ubuntu1.6.1~); however:
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-core (>= 1.14.0-0ubuntu1.6) | nginx-full (>= 1.14.0-0ubuntu1.6) | nginx-light (>= 1.14.0-0ubuntu1.6) | nginx-extras (>= 1.14.0-0ubuntu1.6); however:
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (237-3ubuntu10.31) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
nginx-core
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
# dpkg -l | grep -i nginx
iU nginx 1.14.0-0ubuntu1.6 all small, powerful, scalable web/proxy server
ii nginx-common 1.14.0-0ubuntu1.6 all small, powerful, scalable web/proxy server - common files
iF nginx-core 1.14.0-0ubuntu1.6 amd64 nginx web/proxy server (standard version)
--------
[REGRESSION POTENTIAL]
LOW.
Other distributions does that (not including ipv6 listen by default)
already (e.g. Centos and Upstream)
* nginx.vh.default.conf -> "nginx-1.16.0-1.el8.ngx.src.rpm"
server {
listen 80;
server_name localhost;
* Upstream nginx:
https://github.com/nginx/nginx/blob/master/conf/nginx.conf#L36
This won't introduce behaviour change for those who upgrade nginx, but
it will introduce a behaviour change for those used to have ipv6
listen in the default vhost at fresh package installation.
But IMHO, the default vhost is a starting point/example, that the
admin will anyway have to modify manually or via some automation tool
(ansible, chef, puppet, ...)
So this will only imply that the admin will need to update their
recipe to add the ipv6 listen in their vhost config (ONLY if needed).
Minus leaving the users to have to uncomment the ipv6 listen in the
vhost (if needed) by themselves manually, automation recipes, ... I
don't see any major blocker, I personally think it's a good compromise
in order to prevent the actual package to fails and be found in a
erroneous state if ipv6 is disabled.
Of course, we can debate if disabling ipv6 is a good or wrong, but I
think that the package installation should succeed for both ipv4only
and ipv6.
[OTHER INFORMATION]
* Debian upstream bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942817
[ORIGINAL DESCRIPTION]
There is a known issue where NGINX will not properly run or install when IPv6 is fully disabled on a system.
Per Bug #1712696 which first detailed this, these are some 'relevant'
log entries:
Aug 23 23:52:24 thomas-ThinkPad-T430 nginx[20166]: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
Aug 23 23:52:24 thomas-ThinkPad-T430 nginx[20166]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 23 23:52:24 thomas-ThinkPad-T430 systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 23 23:52:24 thomas-ThinkPad-T430 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
As you can see the system could not bind to Port 80 on IPv6.
While this is a **nonstandard** setup, there are some systems which
are configured to not have IPv6 support. It should currently be
considered whether we should test for such 'systems' to see whether
IPv6 is enabled or not, and modify the configuration file accordingly
during install/configure.
This issue happens regardless of the 'supported' operating system
status or not, and is a core NGINX package issue, but also a core
'incompatible configuration' issue with systems which disable IPv6.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1743592/+subscriptions