[pkg-lighttpd] Bug#564556: Bug#564556: lighttpd: can't bind to port: :: 80 Address already in use
Jonathan Nieder
jrnieder at gmail.com
Thu Sep 2 09:35:58 UTC 2010
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)
...
More information about the pkg-lighttpd-maintainers
mailing list