5

I'm having some problems with apache2 on Xubuntu 14.04. This all happened after a complete bios failure on the motherboard (now flashed to latest version - so far so good) though it may not be related.

If I reboot the system apache no longer autostarts. If I manually start the service I get this message:

 * Starting web server apache2                                                                                                                                          [Thu Sep 18 15:17:56.311536 2014]                                                                                        
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:8                                                                                      0
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.                                                                                        0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
 *
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems

After doing some research I've found that I have one pid number running for apache2 on boot (after running pidof apache2). If I run killall apache2 the live pid disappears. I then can then start apache and it works fine with no errors, and indeed stop. I can keep stopping and starting forever more. It seems that whenever the system is rebooted apache kind of half starts up with one pid and begins listening on port 80 (blocking it), but not properly. So at the moment after a reboot I have to run killall apache2 then start the service manually.

If after a reboot I run the command sudo service apache2 restart (because it should already be running at boot) I get this message -

 * Restarting web server apache2                                         [fail]
 * There are processes named 'apache2' running which do not match your pid file which are left untouched in the name of safety, Please review the situation by hand.

Does anyone have any ideas? I'd be very pleased.

It may be worth noting I've recently enabled SSL on the server and that was working fine for a good week before problems arose.

Logs -

[Thu Sep 18 14:54:50.454133 2014] [mpm_prefork:notice] [pid 3005] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.4 OpenSSL/1.0.1f configured -- resuming normal operations    
[Thu Sep 18 14:54:50.454758 2014] [core:notice] [pid 3005] AH00094: Command line: '/usr/sbin/apache2'    
[Thu Sep 18 14:55:09.625943 2014] [mpm_prefork:notice] [pid 3005] AH00169: caught SIGTERM, shutting down    
[Thu Sep 18 14:55:16.061357 2014] [mpm_prefork:notice] [pid 3212] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.4 OpenSSL/1.0.1f configured -- resuming normal operations    
[Thu Sep 18 14:55:16.061455 2014] [core:notice] [pid 3212] AH00094: Command line: '/usr/sbin/apache2'    
[Thu Sep 18 14:58:39.984917 2014] [mpm_prefork:notice] [pid 3212] AH00169: caught SIGTERM, shutting down

If I run the killall apache2 command before starting - these are the log entries,

[Mon Sep 22 09:38:14.689608 2014] [mpm_prefork:notice] [pid 2624] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.4 OpenSSL/1.0.1f configured -- resuming normal operations    
[Mon Sep 22 09:38:14.689695 2014] [core:notice] [pid 2624] AH00094: Command line: '/usr/sbin/apache2'

Many thanks.

P.S - I'm relatively new to linux and servers generally, though I'm very much enjoying learning linux and setting up my own home server.

7
  • Could you post apache log relative to boot startup?
    – Lety
    Sep 18, 2014 at 20:28
  • Just added, apologies for the delay, I was away. Thanks Sep 22, 2014 at 8:49
  • have you installed another webserver such as nginx beside apache2?
    – kenn
    Sep 22, 2014 at 9:42
  • 1
    It was indeed the PEM passphrase on my private SSL key that was causing the problem. Apache needs it entering on startup, so it was hanging, kind of half running. I've taken the encryption off of the key and now it boots up fine. Thank you very much!!! Sep 23, 2014 at 20:01

1 Answer 1

1

It was indeed the PEM passphrase on my private SSL key that was causing the problem. Apache needs it entering on startup, so it was hanging, kind of half running. I've taken the encryption off of the key and now it boots up fine. Thank you very much!!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .