Error-log

spring) java.net.BindException: Address already in use

jjingle 2022. 2. 4. 21:30

์ƒˆ ํ”„๋กœ์ ํŠธ ๋งŒ๋“ค๊ณ  ์„œ๋ฒ„ ๊ธฐ๋™ํ•˜๋ ค๋Š”๋ฐ ๊ฐ‘์ž๊ธฐ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค.

java.net.BindException: Address already in use (์‚ฌ์šฉํ•˜๋ ค๋Š” ํฌํŠธ๋ฒˆํ˜ธ๊ฐ€ ์ด๋ฏธ ์‚ฌ์šฉ์ค‘)

ํ„ฐ๋ฏธ๋„์„ ์ด์šฉํ•ด์„œ ํ•ด๋‹น ํฌํŠธ๋ฒˆํ˜ธ์˜ ์‚ฌ์šฉ์ค‘์ธ ํ”„๋กœ๊ทธ๋žจ์„ ์ข…๋ฃŒ์‹œ์ผœ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•˜๊ฒŒ๋” ํ•ด๋ณด๊ฒ ๋‹ค.

 

(mac os)

 

1. ์ œ๊ฑฐํ•˜๋ ค๋Š” ํฌํŠธ๋ฒˆํ˜ธ ํŒŒ์•…

2. ํ•ด๋‹น ํฌํŠธ๋ฒˆํ˜ธ์˜ ์•„์ด๋”” ๊ฒ€์ƒ‰ :  $ lsof -i :ํฌํŠธ๋ฒˆํ˜ธ 

3. ์•„์ด๋””๋ฅผ ์ด์šฉํ•˜์—ฌ ์‚ฌ์šฉ์ค‘์ธ ํ”„๋กœ๊ทธ๋žจ๊ณผ ํฌํŠธ๋ฒˆํ˜ธ์˜ ์—ฐ๊ฒฐ ๋Š๊ธฐ : $ kill -9 ํฌํŠธ๋ฒˆํ˜ธ์˜์•„์ด๋””