Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-09-02 Thread Jonathan Nieder
Olaf van der Spek wrote:

 Lighttpd actually sets v6only = 1 itself (AFAIK) now.

Hmm, right (r2758: bind to IPV6-only if ipv6 address was specified).

 Could you try with a clean conf and post a strace of the error?

 $ ltrace lighttpd -f /etc/lighttpd/lighttpd.conf
...
 memcpy(0x081319b0, :80, 3) = 0x081319b0
 strrchr(:80, ':')  = :80
 strtol(0x81319b1, 0, 10, 0xb7584ff4, 0xb75863a0) = 80
 socket(2, 1, 6)  = 4
 fcntl(4, 2, 1, 0xb7584ff4, 0xb75863a0)   = 0
 setsockopt(4, 1, 2, 0xbfa119fc, 4)   = 0
 bind(4, 0x81318c8, 16, 0xbfa119fc, 4)= -1
...

So: use_ipv6 is not 1 because host_token has no [::] for some reason.

Extract from strace follows.

 # dpkg --purge lighttpd
 # dpkg --install /var/cache/apt/archives/lighttpd_1.4.28-1_i386.deb
...
 Errors were encountered while processing:
  lighttpd
 # strace -f /var/lib/dpkg/info/lighttpd.postinst configure
...
 socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 3
 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf84d648) = -1 EINVAL (Invalid 
argument)
 _llseek(3, 0, 0xbf84d690, SEEK_CUR) = -1 ESPIPE (Illegal seek)
 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf84d648) = -1 EINVAL (Invalid 
argument)
 _llseek(3, 0, 0xbf84d690, SEEK_CUR) = -1 ESPIPE (Illegal seek)
 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
 close(3)= 0
 write(1, $SERVER[\socket\] == \[::]:80\ {..., 35) = 35
...
 munmap(0xb725d000, 89487)   = 0
 open(/etc/passwd, O_RDONLY|O_CLOEXEC) = 4
 fcntl64(4, F_GETFD) = 0x1 (flags FD_CLOEXEC)
 _llseek(4, 0, [0], SEEK_CUR) = 0
 fstat64(4, {st_mode=S_IFREG|0644, st_size=1199, ...}) = 0
 mmap2(NULL, 1199, PROT_READ, MAP_SHARED, 4, 0) = 0xb7719000
 _llseek(4, 1199, [1199], SEEK_SET) = 0
 munmap(0xb7719000, 1199)= 0
 close(4)= 0
 socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
 connect(4, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT 
(No such file or directory)
 close(4)= 0
 socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
 connect(4, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT 
(No such file or directory)
 close(4)= 0
 open(/etc/group, O_RDONLY|O_CLOEXEC) = 4
 _llseek(4, 0, [0], SEEK_CUR) = 0
 fstat64(4, {st_mode=S_IFREG|0644, st_size=702, ...}) = 0
 mmap2(NULL, 702, PROT_READ, MAP_SHARED, 4, 0) = 0xb7719000
 _llseek(4, 702, [702], SEEK_SET) = 0
 munmap(0xb7719000, 702) = 0
 close(4)= 0
 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
 setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
 bind(4, {sa_family=AF_INET, sin_port=htons(80), 
sin_addr=inet_addr(0.0.0.0)}, 16) = -1 EADDRINUSE (Address already in use)
...



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-09-02 Thread Jonathan Nieder
notfound 564556 lighttpd/1.4.25-2
fixed 564556 lighttpd/1.4.25-2
close 564556
quit

Olaf van der Spek wrote:

 Eh, netstat -nlp | grep 80?

Sigh.  Sorry to waste your time.

# killall apache2
# dpkg --configure -a
Setting up lighttpd (1.4.28-1) ...
Starting web server: lighttpd.
# echo $?
0

I had uninstalled but not purged apache and clearly I do not know
how to use netstat. :(



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-09-02 Thread Jonathan Nieder
Olaf van der Spek wrote:

 Eh, netstat -nlp | grep 80?

Forgot to say: thank you!  (for the fix and the debugging help)
You have been very patient.

*shuffles off to sleep*



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-09-02 Thread Olaf van der Spek
On Thu, Sep 2, 2010 at 2:13 PM, Jonathan Nieder jrnie...@gmail.com wrote:
 # killall apache2
 # dpkg --configure -a
 Setting up lighttpd (1.4.28-1) ...
 Starting web server: lighttpd.
 # echo $?
 0

 I had uninstalled but not purged apache and clearly I do not know
 how to use netstat. :(

You're kidding me, right? :p
I guess uninstalling didn't succeed either.

Olaf



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-09-02 Thread Jonathan Nieder
Olaf van der Spek wrote:

 I guess uninstalling didn't succeed either.

Right, I removed the apache2 package but not the daemon (apache2-mpm-worker)
itself.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-09-01 Thread Olaf van der Spek
On Wed, Sep 1, 2010 at 3:29 AM, Jonathan Nieder jrnie...@gmail.com wrote:
  net.ipv6.bindv6only = 1

 Wait, wasn't that changed back in netbase?  Well, yes, for _new_
 installs, but this is a conffile so it keeps the existing value
 for existing installations.

That sucks, IMO it should've been set to 0 before the file being removed.

 My own analysis is the same as before: relying on anything about
 the bindv6only setting is just asking for trouble.  lighttpd needs to
 set or clear the IPV6_V6ONLY option itself for ipv6 sockets, or
 autoconfigure correctly at runtime.

This bug was about Lighttpd relying on v6only = 1. So in your case it
should've worked.
Lighttpd actually sets v6only = 1 itself (AFAIK) now.
Could you try with a clean conf and post a strace of the error?

Olaf



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-05-31 Thread Timo Juhani Lindfors
Hi,

not sure if it is relevant at all anymore but I hit this too in the
following environment:

* debian stable
* custom kernel with CONFIG_IPV6=y
* debian unstable chroot for testing unstable packages

Obviously /proc/sys/net/ipv6/bindv6only is false since it is not set
by the debian stable system. (And as noted earlier setting it to true
would destroy java networking from all other users of the system.)

I can confirm that changing

#include_shell /usr/share/lighttpd/use-ipv6.pl

to

server.socket = [::]:80

indeed makes it possible to start lighttpd.




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-05-22 Thread Olaf van der Spek
On Sat, May 22, 2010 at 9:51 PM, Jonathan Nieder jrnie...@gmail.com wrote:
 Olaf van der Spek wrote:

 I think the problem was that I compiled Linux with CONFIG_IPV6=m.

 So this is no longer a problem?

 I’m using a Debian kernel now; I’ll try rebuilding a kernel with ipv6
 disabled and get back to you in the next few days.

 Was this fixed upstream or something?

I thought the problem was caused by your kernel option.
bindv6only is now enabled by default in netbase AFAIK.

Olaf



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-05-22 Thread Jonathan Nieder
Olaf van der Spek wrote:

 I thought the problem was caused by your kernel option.
 bindv6only is now enabled by default in netbase AFAIK.

Maybe it could be considered a kernel bug: if ipv6 support is disabled
(because built as a module) at the time the netbase init script runs,
then it cannot enable bindv6only.  The sysctl errors out.

But surely programs should not be relying on bindv6only to be set!
That is just asking for trouble.  There _are_ going to be
administrators who disable it, and we should accomodate them.  In
other words, lighttpd needs to set or clear the IPV6_V6ONLY option
itself for ipv6 sockets.

Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#564556: [pkg-lighttpd] Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use

2010-05-22 Thread Olaf van der Spek
On Sat, May 22, 2010 at 10:09 PM, Jonathan Nieder jrnie...@gmail.com wrote:
 Olaf van der Spek wrote:

 I thought the problem was caused by your kernel option.
 bindv6only is now enabled by default in netbase AFAIK.

 Maybe it could be considered a kernel bug: if ipv6 support is disabled
 (because built as a module) at the time the netbase init script runs,
 then it cannot enable bindv6only.  The sysctl errors out.

 But surely programs should not be relying on bindv6only to be set!
 That is just asking for trouble.  There _are_ going to be
 administrators who disable it, and we should accomodate them.  In
 other words, lighttpd needs to set or clear the IPV6_V6ONLY option
 itself for ipv6 sockets.

I think Lighttpd does set it now.

-- 
Olaf



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org