Nginx Error: Job for nginx.service failed because the control process exited with error code

Job for nginx.service failed because the control process exited with error code

View Status

systemctl status nginx.service

nginx.service – The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-01-15 20:18:19 CST; 2min 1s ago
Process: 439 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
Process: 437 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 436 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

Jan 15 20:18:18 iZ2zehly2ejxq9dlkzklw9Z nginx[439]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jan 15 20:18:18 iZ2zehly2ejxq9dlkzklw9Z nginx[439]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Jan 15 20:18:18 iZ2zehly2ejxq9dlkzklw9Z nginx[439]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jan 15 20:18:18 iZ2zehly2ejxq9dlkzklw9Z nginx[439]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Jan 15 20:18:19 iZ2zehly2ejxq9dlkzklw9Z nginx[439]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jan 15 20:18:19 iZ2zehly2ejxq9dlkzklw9Z nginx[439]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Jan 15 20:18:19 iZ2zehly2ejxq9dlkzklw9Z nginx[439]: nginx: [emerg] still could not bind()
Jan 15 20:18:19 iZ2zehly2ejxq9dlkzklw9Z systemd[1]: nginx.service: Control process exited, code=exited status=1
Jan 15 20:18:19 iZ2zehly2ejxq9dlkzklw9Z systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jan 15 20:18:19 iZ2zehly2ejxq9dlkzklw9Z systemd[1]: Failed to start The nginx HTTP and reverse proxy server.

Problem

nginx: [emerg] bind() to 0.0.0.0:80 failed

 

Checking port 80 is occupied
kill pid

 

Restart nginx

systemctl start nginx.service

Similar Posts: