I have received this message after typing this in (sudo /etc/init.d/apache2 restart)
[…] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.
– The result is failed. Jan 08 13:54:00 raspberrypi systemd[1]: apache2.service: Unit entered failed state. Jan 08 13:54:00 raspberrypi systemd[1]: apache2.service: Failed with result ‘exit-code’. Jan 08 13:54:00 raspberrypi sudo[12907]: pam_unix(sudo:session): session closed for user root Jan 08 13:54:29 raspberrypi sudo[12967]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xe Jan 08 13:54:29 raspberrypi sudo[12967]: pam_unix(sudo:session): session opened for user root by (uid=0) Jan 08 13:55:01 raspberrypi CRON[12975]: pam_unix(cron:session): session opened for user pi by (uid=0) Jan 08 13:55:01 raspberrypi CRON[12979]: (pi) CMD (python /home/pi/insertDB.py) Jan 08 13:55:01 raspberrypi CRON[12975]: (CRON) info (No MTA installed, discarding output) Jan 08 13:55:01 raspberrypi CRON[12975]: pam_unix(cron:session): session closed for user pi Jan 08 13:57:50 raspberrypi sudo[12967]: pam_unix(sudo:session): session closed for user root Jan 08 13:57:58 raspberrypi sudo[12998]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xe Jan 08 13:57:58 raspberrypi sudo[12998]: pam_unix(sudo:session): session opened for user root by (uid=0) Jan 08 13:58:01 raspberrypi sudo[12998]: pam_unix(sudo:session): session closed for user root Jan 08 13:58:21 raspberrypi sudo[13018]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xe Jan 08 13:58:21 raspberrypi sudo[13018]: pam_unix(sudo:session): session opened for user root by (uid=0) Jan 08 13:58:24 raspberrypi sudo[13018]: pam_unix(sudo:session): session closed for user root Jan 08 13:58:34 raspberrypi sudo[13031]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xe Jan 08 13:58:34 raspberrypi sudo[13031]: pam_unix(sudo:session): session opened for user root by (uid=0)
Can anyone teach me how to solve this issue? Thank You
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi Jarland,
Thanks for the information
Hey friend,
I propose that the meaningful error line is this one:
Jan 08 13:54:00 raspberrypi apachectl[12922]: (98)Address already in use: AH00072: makesock: could not bind to address [::]:80
This would suggest to me that something is already listening on port 80. Check what that is like this:
sudo netstat -tulpn | grep ":80"
The service you find listening there, if you disable that then Apache will likely start fine afterward.
Jarland