Comment 0 for bug 1838246

Revision history for this message
Dave Bevan (dave-bevan) wrote :

See bug report at https://trac.nginx.org/nginx/ticket/1821#comment:1

# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

  inet 192.168.249.1 netmask 255.255.255.0 broadcast 192.168.249.255
  ether 02:42:19:ba:e6:23 txqueuelen 0 (Ethernet)
  RX packets 0 bytes 0 (0.0 B)
  RX errors 0 dropped 0 overruns 0 frame 0
  TX packets 0 bytes 0 (0.0 B)
  TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

docker_gwbridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

  inet 192.168.250.1 netmask 255.255.255.0 broadcast 192.168.250.255
  ether 02:42:19:d7:3f:8e txqueuelen 0 (Ethernet)
  RX packets 0 bytes 0 (0.0 B)
  RX errors 0 dropped 0 overruns 0 frame 0
  TX packets 1033 bytes 172294 (172.2 KB)
  TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

  ether c8:d3:ff:69:38:89 txqueuelen 1000 (Ethernet)
  RX packets 1334863 bytes 1058768699 (1.0 GB)
  RX errors 0 dropped 0 overruns 0 frame 0
  TX packets 380949 bytes 134078135 (134.0 MB)
  TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  device interrupt 16 memory 0xe1200000-e1220000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536

  inet 127.0.0.1 netmask 255.0.0.0
  loop txqueuelen 1000 (Local Loopback)
  RX packets 4019381 bytes 2054803911 (2.0 GB)
  RX errors 0 dropped 0 overruns 0 frame 0
  TX packets 4019381 bytes 2054803911 (2.0 GB)
  TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

veth3b18948: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

  ether ba:7a:7f:04:bc:2d txqueuelen 0 (Ethernet)
  RX packets 0 bytes 0 (0.0 B)
  RX errors 0 dropped 0 overruns 0 frame 0
  TX packets 1033 bytes 172294 (172.2 KB)
  TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

  inet 10.56.110.15 netmask 255.255.252.0 broadcast 10.56.111.255
  ether f0:d5:bf:01:b7:4c txqueuelen 1000 (Ethernet)
  RX packets 17897545 bytes 13685388137 (13.6 GB)
  RX errors 0 dropped 0 overruns 0 frame 0
  TX packets 5316328 bytes 1206667801 (1.2 GB)
  TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

# 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

Fragment from /etc/nginx/sites-enabled/default

  server {
    listen 80 default_server;
    listen [::]:80 default_server;

If I comment out the listen [::]:80 ipv6 directive, nginx starts successfully.

This appears to be a recent regression, as previously, the default presence of the listen ipv6 directive, and absence of ipv6 support on the host, would not result is a nginx start error.

For info, this occurred during a today's Ubuntu 18.04 upgrade:

nginx/bionic-updates,bionic-updates 1.14.0-0ubuntu1.3 all [upgradable from: 1.14.0-0ubuntu1.2]
nginx-common/bionic-updates,bionic-updates 1.14.0-0ubuntu1.3 all [upgradable from: 1.14.0-0ubuntu1.2]
nginx-core/bionic-updates 1.14.0-0ubuntu1.3 amd64 [upgradable from: 1.14.0-0ubuntu1.2]

The running nginx instance was halted because of the defect. What should have been a seamless upgrade was service affecting.

The NGINX team response:

Resolution set to invalid
Status changed from new to closed
You may want to report this to maintainers of the package you are using - by default nginx does not listen on IPv6 addresses.