session closed for user pi when restarting apache2 server

When restarting the apache server with this command sudo service apache2 restart I get an error

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
journalctl | tail
Apr 02 11:43:34 raspberrypi sudo[11952]: pam_unix(sudo:session): session closed for user pi
Apr 02 11:43:46 raspberrypi sudo[11965]: root : PWD=/usr/share/piwiz ; USER=pi ; ENV=XDG_RUNTIME_DIR=/run/user/1000 ; COMMAND=/usr/bin/
Apr 02 11:43:46 raspberrypi sudo[11965]: pam_unix(sudo:session): session opened for user pi(uid=1000) by (uid=0)
Apr 02 11:43:49 raspberrypi sudo[11965]: pam_unix(sudo:session): session closed for user pi
Apr 02 11:44:01 raspberrypi sudo[11979]: root : PWD=/usr/share/piwiz ; USER=pi ; ENV=XDG_RUNTIME_DIR=/run/user/1000 ; COMMAND=/usr/bin/
Apr 02 11:44:01 raspberrypi sudo[11979]: pam_unix(sudo:session): session opened for user pi(uid=1000) by (uid=0)
Apr 02 11:44:04 raspberrypi sudo[11979]: pam_unix(sudo:session): session closed for user pi
Apr 02 11:44:16 raspberrypi sudo[11992]: root : PWD=/usr/share/piwiz ; USER=pi ; ENV=XDG_RUNTIME_DIR=/run/user/1000 ; COMMAND=/usr/bin/
Apr 02 11:44:16 raspberrypi sudo[11992]: pam_unix(sudo:session): session opened for user pi(uid=1000) by (uid=0)
Apr 02 11:44:19 raspberrypi sudo[11992]: pam_unix(sudo:session): session closed for user pi
systemctl status apache2.service
apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2022-04-02 11:42:38 CEST; 5min ago Docs: Process: 11891 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) CPU: 87ms
Apr 02 11:42:38 raspberrypi apachectl[11894]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, usi>
Apr 02 11:42:38 raspberrypi apachectl[11894]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Apr 02 11:42:38 raspberrypi apachectl[11894]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Apr 02 11:42:38 raspberrypi apachectl[11894]: no listening sockets available, shutting down
Apr 02 11:42:38 raspberrypi apachectl[11894]: AH00015: Unable to open logs
Apr 02 11:42:38 raspberrypi apachectl[11891]: Action 'start' failed.
Apr 02 11:42:38 raspberrypi apachectl[11891]: The Apache error log may have more information.
Apr 02 11:42:38 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Apr 02 11:42:38 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Apr 02 11:42:38 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
3 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like