Django Server Error: port is already in use

前端 未结 16 596
借酒劲吻你
借酒劲吻你 2020-12-04 04:34

Restarting the Django server displays the following error:

this port is already running....

This problem occurs specifically on Ubuntu and

16条回答
  •  不思量自难忘°
    2020-12-04 04:58

    For me, this happens because my API request in Postman is being intercepted by a debugger breakpoint in my app... leaving the request hanging. If I cancel the request in Postman before killing my app's server, the error does not happen in the first place.

    --> So try cancelling any open requests you are making in other programs.

    On macOS, I have been using sudo lsof -t -i tcp:8000 | xargs kill -9 when I forget to cancel the open http request in order to solve error = That port is already in use. This also, complete closes my Postman app, which is why my first solution is better.

提交回复
热议问题