** Changed in: nginx (Ubuntu Eoan)
       Status: In Progress => Won't Fix

** Changed in: nginx (Ubuntu Disco)
       Status: In Progress => Won't Fix

** Changed in: nginx (Ubuntu Bionic)
       Status: In Progress => Won't Fix

** Changed in: nginx (Ubuntu Xenial)
       Status: New => Won't Fix

-- 
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:
  Triaged
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

_______________________________________________
Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to     : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp

Reply via email to