Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I try to start apache I get the following error

root@server11362:~# sudo /etc/init.d/apache2 restart

Restarting web server apache2 (98)Address already in use: 
   make_sock: could not bind to address 111.90.150.93:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information. 

In fact the apache log contains no more information.

netstat -tulpn returns the following

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1098/mysqld     
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      1414/redis-server
tcp        0      0 111.90.150.93:53        0.0.0.0:*               LISTEN      1068/named      
tcp        0      0 111.90.150.92:53        0.0.0.0:*               LISTEN      1068/named      
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1068/named      
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1194/postgres   
tcp        0      0 0.0.0.0:44888           0.0.0.0:*               LISTEN      845/sshd        
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1395/master     
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1068/named      
tcp        0      0 0.0.0.0:6081            0.0.0.0:*               LISTEN      1435/varnishd   
tcp        0      0 127.0.0.1:6082          0.0.0.0:*               LISTEN      1434/varnishd   
tcp6       0      0 :::53                   :::*                    LISTEN      1068/named      
tcp6       0      0 :::44888                :::*                    LISTEN      845/sshd        
tcp6       0      0 :::25                   :::*                    LISTEN      1395/master     
tcp6       0      0 ::1:953                 :::*                    LISTEN      1068/named      
tcp6       0      0 :::6081                 :::*                    LISTEN      1435/varnishd   
udp        0      0 111.90.150.93:53        0.0.0.0:*                           1068/named      
udp        0      0 111.90.150.92:53        0.0.0.0:*                           1068/named      
udp        0      0 127.0.0.1:53            0.0.0.0:*                           1068/named      
udp6       0      0 :::53

There is nothing on port 80 but I still cannot restart

share|improve this question

1 Answer 1

There is possibly more broken, because you also get

Unable to open logs

First of all, enable more logging

LogLevel debug

in your /etc/apache2/apache2.conf.

Check your file permissions in /var/log/apache2.

I use often following command to debug:

strace -f apache2ctl start 2>&1|grep -v " ENOENT " | grep -Ee " E[A-Z]+"

It shows you excactly which calls are failed.

[Edit]

Another reason could produce overlapping listen adresses like:

Listen *:80
Listen 1.2.3.4:80

So you listen to all interfaces and the 2nd listen line tried to open an already opened port. Like described here.

share|improve this answer
    
file permissions /var/log/ are 755 and 640 –  user259920 Mar 23 at 21:44
    
And you log file? –  user224465 Mar 23 at 22:13
    
640 This is /etc/apache2/sites-availab/courseworkbank.info –  user259920 Mar 24 at 9:15
    
I meant, have looked also in /var/log/apache2/error.log? –  user224465 Mar 24 at 13:19
    
respecting your other posts you should check your configs for the Listen keyword first. –  user224465 Mar 24 at 17:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.