0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【エラー】localhostに接続できなかったサーバーの重複

Posted at

特技はエラー生成・・・

localhost:3000にアクセスしたら急に読み込みが止まったままになってしまい、ターミナルを確認したところ
こんなような記述が(他略)

Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)

原因は、ローカルサーバー(rails s)を切らずに(control cをせずに)ターミナルのタブを消してしまっていたので接続が重複して飽和状態になっていたとのこと

lsof -i :3000
を入力してポート接続を確認→PIDの番号を確認

kill -QUIT <PIDの番号>

で、ポートを空けてあげると直りました。

こちらの記事を参考にしました
https://qiita.com/nagao_norihiro/items/aba40bd4e0eac9f9a92d#comments

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?