GithubHelp home page GithubHelp logo

Comments (5)

esc5221 avatar esc5221 commented on June 13, 2024

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.

Jhvictor4 avatar Jhvictor4 commented on June 13, 2024

또한 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.

xxnpark avatar xxnpark commented on June 13, 2024

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.

xxnpark avatar xxnpark commented on June 13, 2024

@Jhvictor4 답변 감사합니다!
pid 관련해서 위 링크도 구글링하면서 봤던 것 같은데 nginx가 pid를 어디서 읽어오는지를 모르겠습니다..

확인해보니 읽어오는 위치와 지정된 위치는 동일한 것 같습니다. 그런데 findnginx.pid 파일을 찾아봐도 전체 디렉토리 내에 존재하지 않는 것 같아 이게 문제일 것 같은데 맞을까요..?

from seminar-2021.

minkyu97 avatar minkyu97 commented on June 13, 2024

저도 비슷한 문제가 있었는데 그냥 ec2를 재시작했더니 해결 되었습니다.

from seminar-2021.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.