Welcome! Log In Create A New Profile

Advanced

Re: another "bind() to 0.0.0.0:80 failed (98: Address already in use)" issue

February 23, 2017 10:08AM
Hello Jeff,

Thank you for your help. I tested your suggestion. This isn't the case. I also tested in normal debian system and this wasn't the case there either.

I believe following section is the culprit. Start-stop-daemon tests if daemon was already running, however it doesn't relinquish the socket before actually starting the daemon. This is good in case of normal service startup where it returns "1" in those cases. For my case this costs me extra 2.5seconds which is huge for my otherwise normal .5 second system boot.

start-stop-daemon --start --quiet --pidfile $PID --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PID --exec $DAEMON -- \
$DAEMON_OPTS 2>/dev/null \
|| return 2

For now I commented first test since I am sure that no service is running in my case, this is system boot and nginx will be only service running on this system at port 80. For now everything works fine and results seems good. I will post again if this broke anything.

Best,
Sum-it
Subject Author Posted

another "bind() to 0.0.0.0:80 failed (98: Address already in use)" issue

sum-it February 22, 2017 01:36PM

Re: another "bind() to 0.0.0.0:80 failed (98: Address already in use)" issue

jeffdyke February 22, 2017 04:48PM

Re: another "bind() to 0.0.0.0:80 failed (98: Address already in use)" issue

sum-it February 23, 2017 10:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready