Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

AH00015: Unable to open logs Action 'start' failed. in ubuntu 14.04

Writer Andrew Mclaughlin

I am trying install apache2,i faced this problem.Give me some solutions

Restarting web server apache2 gives the error:

 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(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.
[fail] * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
3

8 Answers

Run

sudo netstat -tulpn | grep :80

and you will get output something like

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1066/lighttpd

note the pid of the process listening to the port, in my case it was 1066. Then run

sudo kill -9 1066

Remember to change the pid to the one that is listening to the port, It might not be the same as 1066

What type of server are you running this on?

To resolve the first error

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

You will need to edit httpd.conf file, add this line:

ServerName localhost

To resolve the other errors you should make sure that you are trying to run Apache with root privileges.

sudo /usr/sbin/apachectl start
3

Like many server applications, you can't bind to a port already bound to by another application (in this case, port 80, for http). The cause of your error is that Apache can't bind to port 80 because something else is already listening there.

Run sudo netstat -tulpn | grep :80 and look for the name of the process that's listening on port 80. Then, either reconfigure or remove that program.

I have this same problem.

I tried to install LAMP on WSL by following this blog: LAMP on WSL but when I issued this command :

/etc/init.d/apache2 start 

I got this same error:

 * Starting Apache httpd web server apache2
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: 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.
*

I had previously tried to install Nginx on Windows proper and failed but I remembered I had bound Nginx to port 80. Problem is I am no Linux expert and I could not see in apache2 conf file the area to bind to a port.

I tried running:

sudo netstat -tulpn | grep :80

and got nothing. I had also forwarded the port in my router so I could not understand how to solve the error.

I know Nginx was not running so port 80 should have been fine except for chrome which I assume was also running on port 80 So in frustration not knowing what will happen I proceeded the command with sudo like this:

sudo /etc/init.d/apache2 start 

and I got:

 * Starting Apache httpd web server apache2 *

By proceeding the start command with sudo, Apache2 has authority to run. This is a short-term solution because it is not advisable to run Apache2 with root privileges (so we are informed) so the solution is still out there but for now, I can at least proceed with my tests.

If anyone knows the solution do please let us know.

4

You may installed a new web server or anything reserve the port 80 check your services and what you have newly installed

In my case this was not a problem with logs, but actually with the Listen directive - it was set to Listen on an IP that did not exists (as I moved my laptop to another network).

This only surfaced after I uninstalled the service, reinstalled it and it said:

(OS 10049) The requested address is not valid in its context. : AH00072: make_sock: could not bind to address 0.0.0.0:80 AH00015: Unable to open logs

So I just commented out the offending Listen directive (and kept others) an voila.

I know the Q is about Ubuntu, but some other people might land here encountering the problem.

In my case, there was a ssl.conf which was under the conf.d directory which was causing the problem. If you have defined the Listen flag on your main httpd.conf file, you can rename the ssl.conf file to something

Tried

But the program kept creating new processes as I killed an old one.

A simple restart of the server did the trick for me.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy