-2

if I run my flask server on localhost:5000, when I stop it and restart appear some error: socket.error: [Errno 48] Address already in use. For to restart the server I must change the port and run (app.run(debug=True, port=65013)). How I can resolve this problem? Thanks

1
  • Some other process is using the port. Possibly an existing flask server. Commented May 18, 2016 at 18:08

1 Answer 1

1

You can search a pid using this port and kill'it, so open your terminal and write :

# ps ax | grep 5000     // or # ps ax | grep name_of_service 

This command will appear a pid of process using this port (ex:3750),then kill this process

# kill 3750            // or # killall name_of_service
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.