Hello there,
I've just upgraded our debian server from sarge to etch.
Apache is now running at version 1.3.34-4.1. It keeps crashing. When sent a sighup it won't restart. The error log shows [crit] (98)Address already in use: make_sock: could not bind to port 80
netstat -t -l -n -p | grep 80 then shows only xinetd is listening on port 80.
The only way I can persuade apache to start is to comment out the 'Include hosts.conf' line in httpd.conf, start the server, allow the hosts.conf to be included once again, and restart. It then runs fine until the next time.
I'm very much feeling my way with this upgrade, as the server is unfamiliar to me, and I'm not much cop at ports and virtual hosts and whatnot, but my new job means I'm supposed to keep apache running on this server running at all times. Any pointers as to what the problem could be would be very welcome.
Thanks,
Jenny
"Jenny Hopkins" hopkins.jenny@gmail.com wrote: [...]
[crit] (98)Address already in use: make_sock: could not bind to port 80
netstat -t -l -n -p | grep 80 then shows only xinetd is listening on port 80.
The only way I can persuade apache to start is to comment out the 'Include hosts.conf' line in httpd.conf, start the server, allow the hosts.conf to be included once again, and restart. [...]
Why is xinetd listening on port 80? Are both trying to listen to port 80 on a particular IP address?
What is in hosts.conf? What does netstat show when apache is running? What does it show if xinetd is stopped and apache is restarted?
I've recently had problems with bind ignoring the IP address it was told to listen on and dumbly refusing to listen on any if the primary address was taken. Has something changed in recent kernels or libc? Also, anyone got a recommendation for a better-behaving slave DNSd?
More question than answers,
On 07/05/07, MJ Ray mjr@phonecoop.coop wrote:
"Jenny Hopkins" hopkins.jenny@gmail.com wrote: [...]
[crit] (98)Address already in use: make_sock: could not bind to port 80
netstat -t -l -n -p | grep 80 then shows only xinetd is listening on port 80.
The only way I can persuade apache to start is to comment out the 'Include hosts.conf' line in httpd.conf, start the server, allow the hosts.conf to be included once again, and restart. [...]
Why is xinetd listening on port 80? Are both trying to listen to port 80 on a particular IP address?
I think it must be from the svn entry in xinetd.conf: server_args = -i -r /home/balloon/svn/ --listen-host=balloonboard.org
What is in hosts.conf? What does netstat show when apache is running?
sudo netstat -t -l -n -p | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13823/apache
What does it show if xinetd is stopped and apache is restarted?
apache still won't start when xinetd is stopped. Same error [crit] (98)Address already in use: make_sock: could not bind to port 80 but now sudo netstat -t -l -n -p | grep 80 has no resulting output.
I'm ferreting through the different virtual hosts logs to see if any particular requests are sending a SIGTERM.
I've recently had problems with bind ignoring the IP address it was told to listen on and dumbly refusing to listen on any if the primary address was taken. Has something changed in recent kernels or libc? Also, anyone got a recommendation for a better-behaving slave DNSd?
This is a hosted machine with an old 2.4 kernel.
More question than answers,
No answers to your questions, sorry :-(
Many thanks,
Jenny
"Jenny Hopkins" hopkins.jenny@gmail.com wrote: [...]
What is in hosts.conf? What does netstat show when apache is running?
sudo netstat -t -l -n -p | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13823/apache
What is in hosts.conf? It sounds like there's a Listen 80 when it should be some Listen IP-address:80 forms. But...
What does it show if xinetd is stopped and apache is restarted?
apache still won't start when xinetd is stopped. Same error [crit] (98)Address already in use: make_sock: could not bind to port 80 but now sudo netstat -t -l -n -p | grep 80 has no resulting output.
That seems rather strange. Does xinetd listen on 0.0.0.0:80 or a particular IP address? If they both want 0.0.0.0:80, it won't work.
Regards,
On 08/05/07, MJ Ray mjr@phonecoop.coop wrote:
sudo netstat -t -l -n -p | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13823/apache
What is in hosts.conf? It sounds like there's a Listen 80 when it should be some Listen IP-address:80 forms. But...
The only Listen 80 is in the mod_ssl section, after Listen 443. No changes have been made to the hosts file since the upgrade, though, and it worked before, so it's probably not a config error.
What does it show if xinetd is stopped and apache is restarted?
apache still won't start when xinetd is stopped. Same error [crit] (98)Address already in use: make_sock: could not bind to port 80 but now sudo netstat -t -l -n -p | grep 80 has no resulting output.
That seems rather strange. Does xinetd listen on 0.0.0.0:80 or a particular IP address? If they both want 0.0.0.0:80, it won't work.
No, xinetd is on a different address. I'll ask the previous administrator about it when I next manage to catch up with him (he's very elusive).
Many thanks, Jenny
On Tue, May 08, 2007 at 12:25:22PM +0100, Jenny Hopkins wrote:
On 08/05/07, MJ Ray mjr@phonecoop.coop wrote:
sudo netstat -t -l -n -p | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13823/apache
What is in hosts.conf? It sounds like there's a Listen 80 when it should be some Listen IP-address:80 forms. But...
The only Listen 80 is in the mod_ssl section, after Listen 443. No changes have been made to the hosts file since the upgrade, though, and it worked before, so it's probably not a config error.
Errrrrr, what's it doing in the mod_ssl section?! That seems a little odd... but, anyways...
What does it show if xinetd is stopped and apache is restarted?
apache still won't start when xinetd is stopped. Same error [crit] (98)Address already in use: make_sock: could not bind to port 80 but now sudo netstat -t -l -n -p | grep 80 has no resulting output.
That seems rather strange. Does xinetd listen on 0.0.0.0:80 or a particular IP address? If they both want 0.0.0.0:80, it won't work.
No, xinetd is on a different address. I'll ask the previous administrator about it when I next manage to catch up with him (he's very elusive).
I'm still thinking (as I said on IRC), drop the 2 entries for xinetd (you'll probably find that in both cases apache is configured to handle them), then restart xinetd, then restart apache. Then wait for someone to yell something is broken (if you don't know why it's there, then it probably shouldn't be there ;).
Slightly worried that your svn server and your main webserver are one and the same box, but hey :)
Cheers,
On 08/05/07, Brett Parker iDunno@sommitrealweird.co.uk wrote:
The only Listen 80 is in the mod_ssl section, after Listen 443. No changes have been made to the hosts file since the upgrade, though, and it worked before, so it's probably not a config error.
Errrrrr, what's it doing in the mod_ssl section?! That seems a little odd... but, anyways...
I'm sure there'll be a good reason as my predecessor knows much about most of debian. Not so good at leaving documentation though.
What does it show if xinetd is stopped and apache is restarted?
apache still won't start when xinetd is stopped. Same error [crit] (98)Address already in use: make_sock: could not bind to port 80 but now sudo netstat -t -l -n -p | grep 80 has no resulting output.
That seems rather strange. Does xinetd listen on 0.0.0.0:80 or a particular IP address? If they both want 0.0.0.0:80, it won't work.
No, xinetd is on a different address. I'll ask the previous administrator about it when I next manage to catch up with him (he's very elusive).
I'm still thinking (as I said on IRC), drop the 2 entries for xinetd (you'll probably find that in both cases apache is configured to handle them), then restart xinetd, then restart apache. Then wait for someone to yell something is broken (if you don't know why it's there, then it probably shouldn't be there ;).
Slightly worried that your svn server and your main webserver are one and the same box, but hey :)
Sorry - I'm not ignoring your suggestion,it's just that I'm very reluctant to start removing stuff that used to work fine, when I haven't sussed out what it all does and is for yet. The svn entry will be for balloonboard.org so I really don't want to stop that working.
Thanks,
Jenny
"Jenny Hopkins" hopkins.jenny@gmail.com wrote:
[...] The svn entry will be for balloonboard.org so I really don't want to stop that working.
I still suspect that both xinetd and apache are trying to claim 0.0.0.0:80 and so whatever is started second should fail. Does the apache Listen 80 line have an IP address in it? Does the service subversion section have a bind = .... line that only lists balloonboard.org's IP?
Note: to run apache and xinetd both on port 80, you have to divide the IP addresses of the machine between them: so that's bind lines in xinetd and Listen with IP addresses in apache.conf, with no address repeated. The hostname is only sent in the HTTP request, which is after something has accepted the connection. I'm pretty sure you can't point a xinetd-served balloonboard.org to the same IP address as an Apache-served web site.
Hope that helps,
On 06/05/07, Jenny Hopkins hopkins.jenny@gmail.com wrote:
Hello there,
I've just upgraded our debian server from sarge to etch.
Apache is now running at version 1.3.34-4.1. It keeps crashing. When sent a sighup it won't restart. The error log shows [crit] (98)Address already in use: make_sock: could not bind to port 80
follow-up to this: In the end we migrated to apache2, which solved our problem without ever knowing what the problem was. Also a profuse apology for wasting folks' time not diagnosing output correctly. xinetd was, of course, not running on port 80 at all. Nothing was.
Thanks for the help, Jenny