× nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-12-22 04:53:44 UTC; 3s ago
Docs: man:nginx(8)
Process: 9431 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 9432 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 23ms
Dec 22 04:53:43 ip-172-31-15-250 nginx[9432]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
Dec 22 04:53:43 ip-172-31-15-250 nginx[9432]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
Dec 22 04:53:43 ip-172-31-15-250 nginx[9432]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
Dec 22 04:53:43 ip-172-31-15-250 nginx[9432]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
Dec 22 04:53:44 ip-172-31-15-250 nginx[9432]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
Dec 22 04:53:44 ip-172-31-15-250 nginx[9432]: nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
Dec 22 04:53:44 ip-172-31-15-250 nginx[9432]: nginx: [emerg] still could not bind()
Dec 22 04:53:44 ip-172-31-15-250 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Dec 22 04:53:44 ip-172-31-15-250 systemd[1]: nginx.service: Failed with result 'exit-code'.
Dec 22 04:53:44 ip-172-31-15-250 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
80번 포트 바인딩 실패시 나오는 에러
# 현재 사용중인 포트 확인
sudo lsof -i :[포트번호]
sudo lsof -i :80 // nginx 경우
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 6465 root 6u IPv4 46748 0t0 TCP *:http (LISTEN)
nginx 6465 root 7u IPv6 46749 0t0 TCP *:http (LISTEN)
nginx 6466 www-data 6u IPv4 46748 0t0 TCP *:http (LISTEN)
nginx 6466 www-data 7u IPv6 46749 0t0 TCP *:http (LISTEN)
4개가 켜진것을 확인
# 프로세스 죽이기
sudo kill -9 [PID]
# 예시
sudo kill -9 6465
sudo kill -9 6466
다시 실행
'Error' 카테고리의 다른 글
AMQP connection 에러 (0) | 2024.01.04 |
---|---|
AWS EC2 - NGINX 403 에러 (1) | 2023.12.29 |
React , JS 파일 에러 - $ is not defined (0) | 2023.12.19 |
JQuery에러 - react 활용시 $ is not defined 에러 (0) | 2023.11.03 |
TypeScript - Error - Cannot read properties of null (reading 'tagName') (0) | 2023.11.03 |