Suddenly… my website happens timeout-error.
it seems not process does not work.
How should I restart the project…
php-fpm.conf
$ service apache2 restart
Redirecting to /bin/systemctl restart apache2.service
Failed to restart apache2.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status apache2.service' for details.
[ec2-user@ip-172-31-30-200 laravel6]$ systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Mon 2021-04-12 09:12:06 ; 1min 48s ago
Docs: man:httpd.service(8)
Process: 4123 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 4123 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
.ap-northeast-1.compute.internal systemd[1]: Starting The Apache HTTP Server...
.ap-northeast-1.compute.internal httpd[4123]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
.ap-northeast-1.compute.internal httpd[4123]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
.ap-northeast-1.compute.internal httpd[4123]: no listening sockets available, shutting down
.ap-northeast-1.compute.internal httpd[4123]: AH00015: Unable to open logs
.ap-northeast-1.compute.internal systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
.ap-northeast-1.compute.internal systemd[1]: Failed to start The Apache HTTP Server.
.ap-northeast-1.compute.internal systemd[1]: Unit httpd.service entered failed state.
.ap-northeast-1.compute.internal systemd[1]: httpd.service failed.
$ systemctl restart php7.0-fpm.service
Failed to restart php7.0-fpm.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status php7.0-fpm.service' for details.
$ systemctl stop httpd
Failed to stop httpd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status httpd.service' for details.
2
Answers
@nuzil answer here,
48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Please edit httpd.conf file.
And replace
with
Restart apache
Maybe you tried use same port in two configuration files, or 80 port used on other service like nginx. Try
sudo lsof -n -i :80 | grep LISTEN
to check process that using 80 port.Also, you missed the
sudo
command to executesystemctl
command. Maybe that is permission problem.