Comments (5)
sudo fuser -k 80/tcp (혹은 sudo fuser -k 8000/tcp) 사용해보실래요?
같은 에러 만났었는데, 이걸로 해결했던 것 같습니다.
https://happist.com/573788/%EC%9B%B9%EC%84%9C%EB%B2%84-%EC%97%90%EB%9F%AC-emerg-bind-to-443-failed-98-address-already-in-use#fuser_-k_80tcp_sayong
from seminar-2021.
또한 nginx를 종료하고 다시 시작하려고 sudo nginx -s stop을 실행해본 결과, nginx.pid 가 발견되지 않는 문제가 있었습니다.
해당 문제는 nginx가 읽어오는 .pid 경로랑 /run.. 경로랑 달라서 발생하는 것 같습니다. 링크 참고 부탁드립니다.
그래서 80번 포트의 사용을 검색해보았더니 nginx worker process가 실행중인 것 같았는데, 그러면 어떻게 nginx를 재시작할 수 있는지 궁금합니다.
이거도 위랑 관련이 있는데, nginx가 본인 worker pid를 제대로 파악하지 못해서 nginx worker가 포트 80을 점유하고 있음에도 다른 프로세스가 쓰는 것으로 인식하는 것 같습니다.
pkill, fuser 등 프로세스를 죽였을때는 80포트가 비게 되지만, restart를 하려할 때는 nginx로 하여금 해당 동작을 실행하려는 것이기 때문에 에러가 나는 것 같습니다.
pid 설정을 재조정하시면 됩니다.
** nginx -s reload 설정을 통해 재시작 없이 변경사항 반영하실 수 있습니다. 근데 이 명령어도 pid 경로 설정을 잘 해주어야 작동하긴 합니다.
from seminar-2021.
sudo fuser -k 80/tcp (혹은 sudo fuser -k 8000/tcp) 사용해보실래요? 같은 에러 만났었는데, 이걸로 해결했던 것 같습니다. https://happist.com/573788/%EC%9B%B9%EC%84%9C%EB%B2%84-%EC%97%90%EB%9F%AC-emerg-bind-to-443-failed-98-address-already-in-use#fuser_-k_80tcp_sayong
@esc5221 넵 가능하긴한데 pkill이랑 같은 방법인것같아서 다른 방법은 없는지 궁금했었습니다..ㅠ 그래도 답변 정말 감사합니다!
from seminar-2021.
@Jhvictor4 답변 감사합니다!
pid 관련해서 위 링크도 구글링하면서 봤던 것 같은데 nginx가 pid를 어디서 읽어오는지를 모르겠습니다..
확인해보니 읽어오는 위치와 지정된 위치는 동일한 것 같습니다. 그런데 find
로 nginx.pid
파일을 찾아봐도 전체 디렉토리 내에 존재하지 않는 것 같아 이게 문제일 것 같은데 맞을까요..?
from seminar-2021.
저도 비슷한 문제가 있었는데 그냥 ec2를 재시작했더니 해결 되었습니다.
from seminar-2021.
Related Issues (20)
- Nginx 배포 완료 후 서버가 작동하지 않는 문제
- 장고 과제4 서버 실행시 static file not found 에러 질문드립니다. HOT 11
- 안드로이드 과제4 Dagger Hilt로 만든 okhttpclient에서 logcat 출력 설정 방법 HOT 2
- local에서 Authorization Error HOT 2
- 백엔드 서버가 보낼 수 있는 여러 에러 응답 처리 관련 HOT 2
- 안드로이드 과제4 스펙 관련 HOT 2
- Django 과제4 RDS 데이터베이스 생성 요금?? HOT 3
- 안드로이드 과제4 에러 메시지 관련 HOT 3
- 장고 과제4 migration 관련 에러 질문 HOT 5
- RDS 생성 후 DATA GRIP 연동 부분에서 connection이 계속 fail합니다. HOT 1
- 장고 OperationalError: (1045, "Access denied for user 'waffle-backend'@'172.31.44.17') HOT 3
- nginx 502 bad gateway 에러 HOT 1
- 장고 과제 5 exception_handler을 찾지 못하는 문제 관련 HOT 4
- 장고 과제 4 Migration 관련 질의 HOT 1
- 장고 과제 5(2) 문제 의도 및 추가적인 질문 HOT 5
- 장고 과제 5(3) notebook 실행 오류 질문 HOT 8
- EC2에서 애플리케이션이 꺼지는 현상
- 안드로이드 과제 리뷰 관련하여 질문드립니다. HOT 1
- Can I set more than one constant of P control when using PID control for line tracing made with Arduino?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seminar-2021.