By ZJ
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.