OSError: [Errno 98] Address already in use Flask error

 

OSError: [Errno 98] Address already in use Flask error





image source

I am working on a small flask project.

I have been working within a virtual environment with python 2.7. So I migrated to version 3.7.

Every time I start the server, I run into this error,

OSError: [Errno 98] Address already in use

Here is the solution.

Enter the following commands in the terminal

| ps -fA | grep python

This will select and display all the processes with python matching pattern

Check the one with “flask” in the path and note down its PID(process ID). This should be the second column of the output.

Then enter this command

| kill -9 pid

Replace pid with the PID from the previous command

Then Restart your server

| flask run

And it works!!

Comments

Popular posts from this blog

simple inventory management system using Google Apps Script

sales forecasting ML model in retail using the Prophet algorithm from the Facebook Prophet library