2 years ago

#60872

test-img

Jette

Ubuntu server: Apache status show old failure information, and is running fine

I am a bit puzzled about this... Apache status is showing information from 12 days ago. It's running fine and website is working. Is the status command not supposed to show current state of Apache?

# systemctl status apache2
ā— apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2022-01-05 05:19:24 CET; 1 weeks 5 days ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 514 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Jan 05 05:19:24 serverX systemd[1]: Starting The Apache HTTP Server...
Jan 05 05:19:24 serverX apachectl[532]: AH00112: Warning: DocumentRoot [/some/dir] does not exist
Jan 05 05:19:24 serverX apachectl[532]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address 10.42.24.6:80
Jan 05 05:19:24 serverX apachectl[532]: no listening sockets available, shutting down
Jan 05 05:19:24 serverX apachectl[532]: AH00015: Unable to open logs
Jan 05 05:19:24 serverX apachectl[514]: Action 'start' failed.
Jan 05 05:19:24 serverX apachectl[514]: The Apache error log may have more information.
Jan 05 05:19:24 serverX systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jan 05 05:19:24 serverX systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 05 05:19:24 serverX systemd[1]: Failed to start The Apache HTTP Server.

OS: Ubuntu 20

netstat shows that port 80 is actually listening on 10.42.24.6

# netstat -tulpn | grep apache
tcp        0      0 10.42.24.6:80           0.0.0.0:*               LISTEN      1557/apache2        
tcp        0      0 10.42.24.6:443          0.0.0.0:*               LISTEN      1557/apache2  

Also Apache is logging requests to the access logs

I noticed this problem, because I am using systemctl status apache2 to check apache status in a new shell script I wrote... But the way this command is working, makes it useless.

apache

server

status

systemctl

0 Answers

Your Answer

Accepted video resources