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.

ターミナル上でローカルサーバーを動かせなくなったとき

Posted at

rubyメモ

Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)
というポート3000がすでに使われているというエラーがターミナル上で出現した。

原因はよくわかっていない。

%lsof -i:3000
でポート3000を使用しているプロセスを発見。

ruby 61207 nakagawasoma 11u IPv6 0x16e108863b855d9d 0t0 TCP localhost:hbci (LISTEN) ruby 61207 nakagawasoma 12u IPv4 0x16e108864520de8d 0t0 TCP localhost:hbci (LISTEN) ruby 61207 nakagawasoma 17u IPv6 0x16e10886446ae3fd 0t0 TCP localhost:hbci->localhost:61780 (CLOSE_WAIT) ruby 61207 nakagawasoma 18u IPv6 0x16e10886446af0bd 0t0 TCP localhost:hbci->localhost:61778 (CLOSE_WAIT)
killコマンドを使い実行中のプロセスを削除

%kill -9 61207
lsof -i:3000でもう一度確認し、完了。

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?