Web Server Stability Isuse

Asked by Kevin Boots

I have recently set up a Ubuntu Server 7.04 and have chosen the standard LAMP option when installing. My issue is the stability of Apache. All was working well originally with the for the first couple of days and then I found that the Apache HTTPD was no longer running. When attempting to start the Apache again using "/usr/sbin/apache2ctl start" I get the following error message:

"(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs"

The weird thing is that if I change to the "Root" user and and use the same start command the Apache server starts up OK, but will only run for a around a day before falling over. I suspect that I need to change the file permissions, but am unsure what I need to look for to rectify the issue.

Any help will be greatly appreciated :)

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Simos Xenitellis  (simosx) said :
#1

In order to start/stop Apache, you need to have administrative privileges. This normally means to run the command as

sudo /usr/sbin/apache2ctl start

or as you did with sudo su - to connect as root for the whole session. Otherwise, Apache will display the error messages you show above.

Why does Apache crash? It's quite strange. You need to check the logs for any hints. The Apache logs are at /var/log/, in the httpd subdirectory. error.log should be helpful here.
It's not that common for Apache to crash. Most probably something else is at fault.

Revision history for this message
Kevin Boots (kevin-kjboots) said :
#2

The following is an outline of the recent errors stored in the error.log.1 log file. Please note that error.log itself was empty. (do not know if this is significant)

Error.log messages

[Thu Sep 27 14:29:47 2007] [notice] Apache/2.2.3 (Ubuntu) PHP/5.2.1 configured -- resuming normal operations
[Thu Sep 27 14:34:13 2007] [notice] SIGHUP received. Attempting to restart
apache2: Could not reliably determine the server's fully qualified domain name, using webserver.kjboots.com.au for ServerName
[Thu Sep 27 14:34:13 2007] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceedin$
[Thu Sep 27 14:34:13 2007] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceedin$
[Thu Sep 27 14:34:13 2007] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Sep 27 14:34:13 2007] [notice] Apache/2.2.3 (Ubuntu) PHP/5.2.1 configured -- resuming normal operations
[Thu Sep 27 15:25:34 2007] [notice] SIGHUP received. Attempting to restart
apache2: Could not reliably determine the server's fully qualified domain name, using webserver.kjboots.com.au for ServerName
[Thu Sep 27 15:25:34 2007] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Sep 27 15:25:34 2007] [notice] Apache/2.2.3 (Ubuntu) PHP/5.2.1 configured -- resuming normal operations
[Thu Sep 27 15:48:19 2007] [notice] SIGHUP received. Attempting to restart
apache2: Could not reliably determine the server's fully qualified domain name, using webserver.kjboots.com.au for ServerName
[Thu Sep 27 15:48:19 2007] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceedin$
[Thu Sep 27 15:48:19 2007] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceedin$
[Thu Sep 27 15:48:19 2007] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Sep 27 15:48:19 2007] [notice] Apache/2.2.3 (Ubuntu) PHP/5.2.1 configured -- resuming normal operations
[Thu Sep 27 15:49:39 2007] [error] [client 192.168.0.113] File does not exist: /var/www/kjboots/favicon.ico
[Thu Sep 27 15:49:39 2007] [error] [client 192.168.0.113] File does not exist: /var/www/kjboots/favicon.ico
[Thu Sep 27 16:38:59 2007] [error] [client 192.168.0.113] File does not exist: /var/www/kjboots/Index.html, referer: http://intranet.kjboots.com$
[Fri Sep 28 06:25:10 2007] [notice] caught SIGTERM, shutting down

The issues reported to regarding to Virtual Hosts I have discounted as being the cause, as I have commented (#) out of the apache.conf file but still get the stability issue of the server being unresponsive after a period of time

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell

Revision history for this message
Simos Xenitellis  (simosx) said :
#3

There is the line

[Fri Sep 28 06:25:10 2007] [notice] caught SIGTERM, shutting down

Where you working on Apache at 6:25am or did it crash?

It's very difficult to diagnose the issue with the current information. It's good to clean up the configuration file from any warnings, then check what options are available to produce more logging data. So that when a crash takes place, there will be hints as to what has happened.

Revision history for this message
Mark Fuller (mark-nurse) said :
#4

Getting the same problem. Did you get anywhere with this?

Can you help with this problem?

Provide an answer of your own, or ask Kevin Boots for more information if necessary.

To post a message you must log in.