๋ฐ˜์‘ํ˜•

์žฅ๊ณ  (Django) Error 1

[Python] ์žฅ๊ณ  (Django) Error: That port is already in use ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

Intro ptyhon API Server ์‚ฌ์šฉ ์ค‘ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. Error: That port is already in use. Why? 1. ์ด๋ฏธ ๋„์–ด๋†“์€ ์„œ๋ฒ„๊ฐ€ ์ข…๋ฃŒ๋˜์ง€ ์•Š์•„์„œ ๊ฐ™์€ ํฌํŠธ์— ๋„์–ด ๋†“์„ ์ˆ˜ ์—†์„ ๋•Œ ํ•ด๋‹น ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. 2. ๋™์ผํ•œ ํฌํŠธ๋กœ ๋‹ค๋ฅธ ์„œ๋น„์Šค๊ฐ€ ์‚ฌ์šฉ ์ค‘์ผ ๋•Œ ํ•ด๋‹น ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. How to solve the problem ์ €์˜ ๊ฒฝ์šฐ 1๋ฒˆ ์ผ€์ด์Šค์˜€๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์šฉ ์ค‘์ด์˜€๋˜ 8000 ํฌํŠธ์™€ ๊ด€๋ จ๋œ ๋ชจ๋“  ํ”„๋กœ์„ธ์Šค๋ฅผ ์ข…๋ฃŒํ•˜๊ณ  ๋‹ค์‹œ ์‹คํ–‰์‹œ์ผœ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•˜์‹œ๋ฉด ํ•ด๋‹น ์—๋Ÿฌ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค :) sudo lsof -t -i tcp:8000 | xargs kill -9

Programming/Python 2023.02.13
๋ฐ˜์‘ํ˜•