Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationEventAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

【Python@Flask】エラー "OSError: [Errno 48] Address already in use" の回避策について

Flask で application.run('', 5000, debug=True) を実行したが、何もせずそのまま終了しました。次回、再度実行する時に、以下のエラーメッセージが表示されます。

"OSError: [Errno 48] Address already in use"


  1. 以下のいずれかのコマンドでプロセスIDを検索
    1. ps -fA | grep python
    2. lsof -i :5000 | grep python
  2. kill processID

ps: 現在動作しているプロセスを表示する
lsof: オープンしているファイルの情報を表示する(実行には root 権限が必要)


socket.error: [Errno 48] Address already in use
Need to close python socket / Find the current running server on my dev environment

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Help us understand the problem. What are the problem?