** Description changed:

- There is a known issue where NGINX will not properly run or install when
- IPv6 is fully disabled on a system.
+ [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
+ 
+ * Fresh install of nginx:
+   # apt-get install nginx -y
+ 
+ Output:
+ --------
+ ......
+ 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)
+ --------
+ 
+ [REGRESSION POTENTIAL]
+ 
+ LOW.
+ 
+ Other distributions does that already (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).
+ 
+ I don't see any major blocker here.
+ 
+ [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.

** Description changed:

  [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;
+  listen 80 default_server;
+  listen [::]:80 default_server;
  ......
- 
  
  [TEST CASE]
  * Disable ipv6
-   # cat /proc/cmdline
-   .... ipv6.disable=1
+   # 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
+   # apt-get install nginx -y
  
  Output:
  --------
  ......
  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)
+    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
+  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.
+  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
+  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 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
+  nginx-core
+  nginx
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  --------
  
  [REGRESSION POTENTIAL]
  
  LOW.
  
  Other distributions does that already (Centos and Upstream):
  
  * nginx.vh.default.conf -> "nginx-1.16.0-1.el8.ngx.src.rpm"
  server {
-     listen 80;
-     server_name localhost;
+     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).
  
  I don't see any major blocker here.
  
  [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.

** Description changed:

  [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:
  --------
  ......
  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)
  --------
  
  [REGRESSION POTENTIAL]
  
  LOW.
  
- Other distributions does that already (Centos and Upstream):
+ 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).
  
  I don't see any major blocker here.
  
  [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.

** Changed in: nginx (Ubuntu Eoan)
     Assignee: (unassigned) => Eric Desrochers (slashd)

** Changed in: nginx (Ubuntu Disco)
     Assignee: (unassigned) => Eric Desrochers (slashd)

** Changed in: nginx (Ubuntu Bionic)
     Assignee: (unassigned) => Eric Desrochers (slashd)

** Changed in: nginx (Ubuntu Xenial)
     Assignee: (unassigned) => Eric Desrochers (slashd)

** Description changed:

  [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;
+ ==> 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:
  --------
  ......
  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)
  --------
  
  [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).
  
  I don't see any major blocker here.
  
  [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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1743592

Title:
  NGINX fails to start/install/upgrade if IPv6 is completely disabled.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1743592/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to