Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airplay 켜진채로 토근발급 시 5000 port 이슈 공유 #19

Open
cozzin opened this issue Nov 28, 2021 · 1 comment
Open

Airplay 켜진채로 토근발급 시 5000 port 이슈 공유 #19

cozzin opened this issue Nov 28, 2021 · 1 comment

Comments

@cozzin
Copy link
Contributor

cozzin commented Nov 28, 2021

안녕하세요! 마크다운으로 티스토리 블로그 관리해보고 싶어서 사용하려고 하는데요ㅎㅎ
포트가 이미 사용되고 있다는 에러 메세지가 나와서 이슈 공유 차원에서 등록합니다.
readme에 간단히 추가해도 괜찮을 것 같아요

user@MacBook-Pro cozzin.tistory.com % markdown-tistory token
node:events:371
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::5000
    at Server.setupListenHandle [as _listen2] (node:net:1305:16)
    at listenInCluster (node:net:1353:12)
    at Server.listen (node:net:1440:7)
    at Function.listen (/usr/local/lib/node_modules/markdown-tistory/node_modules/express/lib/application.js:618:24)
    at startCallbackServer (/usr/local/lib/node_modules/markdown-tistory/lib/token-manager.js:100:9)
    at Object.exports.saveAccessToken (/usr/local/lib/node_modules/markdown-tistory/lib/token-manager.js:94:5)
    at /usr/local/lib/node_modules/markdown-tistory/lib/index.js:186:26
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1332:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRINUSE',
  errno: -48,
  syscall: 'listen',
  address: '::',
  port: 5000
}

5000 port를 점유하고 있는 해당 PID로 계속 kill 해봐도 다시 살아나고 있어서 문제가 되었습니다.

user@MacBook-Pro cozzin.tistory.com % sudo lsof -i :5000
COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ControlCe 479 user   20u  IPv4 0xfc5038e54f070395      0t0  TCP *:commplex-main (LISTEN)
ControlCe 479 user   21u  IPv6 0xfc5038e55424ad7d      0t0  TCP *:commplex-main (LISTEN)
ControlCe 479 user   37u  IPv6 0xfc5038e55e898b3d      0t0  TCP localhost:commplex-main->localhost:62339 (ESTABLISHED)
Whale\x20 783 user   38u  IPv6 0xfc5038e55424fffd      0t0  TCP localhost:62339->localhost:commplex-main (ESTABLISHED)
user@MacBook-Pro cozzin.tistory.com % sudo kill -9 479
user@MacBook-Pro cozzin.tistory.com % sudo lsof -i :5000
COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ControlCe 40193 user   20u  IPv4 0xfc5038e55d580e35      0t0  TCP *:commplex-main (LISTEN)
ControlCe 40193 user   21u  IPv6 0xfc5038e55424a69d      0t0  TCP *:commplex-main (LISTEN)
user@MacBook-Pro cozzin.tistory.com % sudo kill -9 783  
user@MacBook-Pro cozzin.tistory.com % sudo lsof -i :5000
COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ControlCe 40193 user   20u  IPv4 0xfc5038e55d580e35      0t0  TCP *:commplex-main (LISTEN)
ControlCe 40193 user   21u  IPv6 0xfc5038e55424a69d      0t0  TCP *:commplex-main (LISTEN)
user@MacBook-Pro cozzin.tistory.com % sudo kill -9 40193
user@MacBook-Pro cozzin.tistory.com % sudo lsof -i :5000
COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ControlCe 40399 user   20u  IPv4 0xfc5038e55c088e55      0t0  TCP *:commplex-main (LISTEN)
ControlCe 40399 user   21u  IPv6 0xfc5038e55424fffd      0t0  TCP *:commplex-main (LISTEN)

확인해보니 Monterey에서 Airplay 수신모드를 켜고 있으면 5000 포트를 점유하게 되네요ㅠ
https://stackoverflow.com/a/69718911

image

여기서 Airplay 수신모드를 해제하면 포트가 점유되는 이슈가 해결됩니다!

user@MacBook-Pro cozzin.tistory.com % sudo lsof -i :5000    
user@MacBook-Pro cozzin.tistory.com % markdown-tistory token
Access token issued.

큰 어려움은 아니지만 이슈 공유 차원에서 등록합니다!
어쩌면... 5000 말고 다른 포트를 사용하는 것도 좋을 것 같습니다.

@cozzin cozzin changed the title 토근발급 시 5000 port 이슈 공유 Airplay 켜진채로 토근발급 시 5000 port 이슈 공유 Nov 28, 2021
@violetbeach
Copy link
Contributor

감사합니다~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants