codestates / codestates/UptoDoor

[๐ŸŒช Error Handling] address already in use / 2021-09-20

Open
#195 0 comments 0 reactions 1 assignee Claimed by @xxrang View on GitHub
complete error
Dominant language
JavaScript
Stars
1
Forks
4
PR merge metrics
No merged PRs in 30d

Description

### ์–ด๋–ค ์—๋Ÿฌ์ธ๊ฐ€์š”?
- aws codepipeline ์ž๋™ ๋ฐฐํฌ์‹œ ๊ฐ„ํ—์ ์œผ๋กœ pm2 list ํ™•์ธํ•  ๊ฒฝ์šฐ pm2 start failed ๋ฐœ์ƒ

### ์—๋Ÿฌ ๋ฉ”์‹œ์ง€
![แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2021-09-27 แ„‹แ…ฉแ„’แ…ฎ 7 59 38](https://user-images.githubusercontent.com/81936905/134896576-eba814d4-8159-40d0-8457-feb26f8e8ec6.png)

### ์—๋Ÿฌ ํ•ธ๋“ค๋ง ๋ฐฉ๋ฒ•

- 2์ฃผ ํ”„๋กœ์ ํŠธ์‹œ์—๋Š” ๊ฐ„๋‹จํ•˜๊ฒŒ 80 port๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์„œ๋น„์Šคํ•˜์˜€์œผ๋‚˜ ๋ž˜ํผ๋Ÿฐ์Šค๋ฅผ ๋” ์ฐพ์•„๋ณธ ๊ฒฐ๊ณผ
๋ฐฐํฌ ํ›„ shell script pm2 start node index.js ์‹œ ์„œ๋ฒ„ ์ฝ”๋“œ์— ์—๋Ÿฌ๊ฐ€ ์žˆ์œผ๋ฉด ์—๋Ÿฌ ์ฝ”๋“œ ์ˆ˜์ •ํ•˜์—ฌ๋„ pm2๋กœ ์‹œ์ž‘์ด ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋ฐœ์ƒ
- pm2 start ํ–ˆ์„ ๊ฒฝ์šฐ ํ•ด๋‹น ํ”„๋กœ์„ธ์Šค(๋กœ์ปฌํฌํŠธ)๊ฐ€ ๋น„์ •์ƒ ์ข…๋ฃŒ ๋ฌ์„ ๊ฒฝ์šฐ ๋‚˜ํƒ€๋‚˜๋Š” ์ฆ์ƒ์ด๋ฏ€๋กœ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์—ฌ ์žฌ๋ฐฐํฌํ•˜๊ฑฐ๋‚˜ ์ˆ˜๋™์œผ๋กœ
ec2 ๋‚ด์—์„œ ๋‹ค๋ฅธ ํฌํŠธ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ node ์žฌ์‹œ์ž‘ ํ›„ ๋‹ค์‹œ ์„œ๋น„์Šค ํ•˜๋ ค๋Š” ํฌํŠธ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ pm2 start ํ•˜์˜€์Œ

### ์—๋Ÿฌ ํ•ธ๋“ค๋ง์„ ์œ„ํ•ด ์ฐธ๊ณ ํ•œ ๋ ˆํผ๋Ÿฐ์Šค ๋งํฌ

[๋งํฌ] https://jootc.com/p/201912253249
[๋งํฌ] https://velog.io/@nomadhash/TIL-%EC%97%90%EB%9F%AC%EB%85%B8%ED%8A%B8-Node-js-address-already-in-use

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.