Neha
Neha

Reputation: 305

Apache2 restart issue

I am using Ubuntu 14.04. I am trying to restart Apache on my terminal but its giving me the following error:

sneha@SCS-I82:~/work/sample_app(master)$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                                                                                (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
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

Also tried with the following command but still the same issue:

sneha@SCS-I82:~/work/sample_app(master)$ sudo service apache2 restart
 * Restarting web server apache2                                                                                                                (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
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

I had also added ServerName localhost to the bottom of /etc/apache2/apache2.conf file. Also I had changed the port to 8080 in /etc/apache2/ports.conf file.

Can someone please suggest some solution for the same.

Upvotes: 0

Views: 3560

Answers (1)

Hans Z.
Hans Z.

Reputation: 53928

Some other process is already listening on port 8080. You can find out which process by running something like:

sudo netstat -lnp | grep 8080

otherwise you may change the port from 8080 to something that is not in use.

Upvotes: 2

Related Questions