Welcome! Log In Create A New Profile

Advanced

Re: ipv4 & ipv6 Virtual Hosting - address in use

December 27, 2010 10:55AM
Linux 2.6.34-gentoo-r12 x86_64 Intel(R) Core(TM) i7 CPU 930 @ 2.80GHz GenuineIntel GNU/Linux
# nginx -V
nginx version: nginx/0.8.53
TLS SNI support enabled
configure arguments: --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --with-cc-opt=-I/usr/include --with-ld-opt=-L/usr/lib --http-log-path=/var/log/nginx/access_log --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --with-ipv6 --with-pcre --without-http_autoindex_module --without-http_browser_module --without-http_charset_module --without-http_geo_module --without-http_map_module --without-http_memcached_module --without-http_referer_module --without-http_ssi_module --without-http_split_clients_module --without-http_userid_module --with-http_realip_module --with-http_ssl_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module

server {
listen [::]:80 default_server;
listen 80 default_server;
return 444;
}
#According to docs, this config should fail, because without ipv6only=on,
#this line should automatically listen on ipv4 interfaces also.
# netstat -lp | grep nginx
tcp 0 0 *:http *:* LISTEN 31704/nginx.conf
tcp6 0 0 [::]:http [::]:* LISTEN 31704/nginx.conf

server {
listen [::]:80 default_server ipv6only=on;
return 444;
}
#I remove the listen 80 line, and add ipv6only=on
# /etc/init.d/nginx start
* Checking nginx' configuration ...
the configuration file /etc/nginx/nginx.conf syntax is ok
configuration file /etc/nginx/nginx.conf test is successful [ ok ]
* Starting nginx ...
[emerg]: bind() to [2a01:4f8:130:9101::3]:80 failed (98: Address already in use)
[emerg]: bind() to [2a01:4f8:130:9101::3]:80 failed (98: Address already in use)
[emerg]: bind() to [2a01:4f8:130:9101::3]:80 failed (98: Address already in use)
[emerg]: bind() to [2a01:4f8:130:9101::3]:80 failed (98: Address already in use)
[emerg]: bind() to [2a01:4f8:130:9101::3]:80 failed (98: Address already in use)
[emerg]: still could not bind()
* start-stop-daemon: failed to start `/usr/sbin/nginx'
* Failed to start nginx [ !! ]
* ERROR: nginx failed to start

Not only does it not work as described, it seems to be trying to bind a specific address multiple times, and maybe succeeding the first time, because there's nothing else running on any interface port 80, so it fails since it can't successfully bind the same address a second time.
Subject Author Posted

ipv4 & ipv6 Virtual Hosting - address in use

David J. December 01, 2010 02:36PM

Re: ipv4 & ipv6 Virtual Hosting - address in use

Igor Sysoev December 01, 2010 03:12PM

Re: ipv4 & ipv6 Virtual Hosting - address in use

António P. P. Almeida December 01, 2010 03:20PM

Re: ipv4 & ipv6 Virtual Hosting - address in use

David J. December 01, 2010 03:28PM

Re: ipv4 & ipv6 Virtual Hosting - address in use

Igor Sysoev December 01, 2010 03:34PM

Re: ipv4 & ipv6 Virtual Hosting - address in use

petteyg359 December 26, 2010 03:36PM

Re: ipv4 & ipv6 Virtual Hosting - address in use

Maxim Dounin December 27, 2010 08:44AM

Re: ipv4 & ipv6 Virtual Hosting - address in use

petteyg359 December 27, 2010 10:55AM

Re: ipv4 & ipv6 Virtual Hosting - address in use

Maxim Dounin December 27, 2010 12:12PM

Re: ipv4 & ipv6 Virtual Hosting - address in use

mikiso October 13, 2011 09:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready