cherokee / webserver

Cherokee Web Server
GNU General Public License v2.0
563 stars 104 forks source link

Need double binding when using ipv6 and net.ipv6.bindv6only=1 #644

Open danielniccoli opened 11 years ago

danielniccoli commented 11 years ago

Original author: rasas...@gmail.com (March 04, 2010 11:36:09)

What steps will reproduce the problem?

  1. net.ipv6.bindv6only=1 sysctl is getting defult these days on distros
  2. IPv6 is enabled by default on cherokee
  3. In this situation, cherokee will just bind to a IPv6 socker, whereas it should bind to both IPv6 and IPv4.

What is the expected output? What do you see instead? netstat -tnlp |grep cherokee This is what I get: tcp6 0 0 :::80 :::* LISTEN 9375/cherokee-worke

And I should get: tcp6 0 0 :::80 :::* LISTEN 9375/cherokee-worke tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
9375/cherokee-worke (or similar)

What version of the product are you using? On what operating system? cherokee 0.99.42-1 on Debian testing.

Please provide any additional information below.

The possible workarounds are either disabling IPv6 on cherokee to get just a sole IPv4 listening socket or either setting sysctl net.ipv6.bindv6only=0

The solution would be making cherokee double bind to IPv4 and IPv6 sockets.

See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560238

Regards,

Original issue: http://code.google.com/p/cherokee/issues/detail?id=760

xnoreq commented 11 years ago

The problem still exists with version 1.2.101. Trying to add both ipv4 (0.0.0.0) and ipv6 (::) with the same port (80) on the "Ports to listen" configuration page prevents the server from starting. The error is something like "cannot bind on port 80 because it is already in use by another application".