Project

General

Profile

(network.c.313) can't bind to socket: 0.0.0.0:80 Address already in use ?

Added by walterbyrd over 2 years ago

This seemed to happen after I upgraded from php-7.0 to php-7.3

# uname -a
Linux servername 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux

# /etc/init.d/lighttpd restart
[ ok ] Stopping web server: lighttpd.
[....] Starting web server: lighttpd2021-11-26 17:25:47: (network.c.313) can't bind to socket: 0.0.0.0:80 Address already in use

# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1802/lighttpd

I tried commenting out this line in the conf file:

include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port

But that did not do anything


Replies (3)

After PHP upgrade, nothing works - Added by walterbyrd over 2 years ago

After restarting my system, the error went away. But, lighttpd will still not work with PHP 7.3.

Everything was working with PHP 7.0, but after "upgrading" nothing works. I just get 503 errors.

RE: (network.c.313) can't bind to socket: 0.0.0.0:80 Address already in use ? - Added by LuigiMdg over 2 years ago

This problem is due to the fact that a lighttpd process remains open on port 80 and the command service lighttpd stop seems to have no effect, you have to kill the specific process, to find it use the command:

netstat -pntle | grep: 80

RE: (network.c.313) can't bind to socket: 0.0.0.0:80 Address already in use ? - Added by walterbyrd over 2 years ago

Thank you. I have given up. But maybe I will re-install and try again.

    (1-3/3)