DEV Community

Indra Wahyu
Indra Wahyu

Posted on

Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port.

Problems

I accidentally pressed ctrl + z on the terminal so that the previously running flask stopped abnormally and the port was still used

problem

I can't run flask again because the port is being used

can't run flask

Solution

Check what ports are being used

sudo ss -tulpn
Enter fullscreen mode Exit fullscreen mode

used port

Kill pid from the port being used

kill -9 4837
Enter fullscreen mode Exit fullscreen mode

Try to run flask again

python3 app.py
Enter fullscreen mode Exit fullscreen mode

Top comments (0)