[英]Address already in use for puma-dev
Whenever I try to run每当我尝试跑步时
bundle exec puma -C config/puma.rb --port 5000
I keep getting我不断得到
bundler: failed to load command: puma (/Users/ogirginc/.asdf/installs/ruby/2.7.2/bin/puma)
Errno::EADDRINUSE: Address already in use - bind(2) for "0.0.0.0" port 5000
I have tried anything I can think of or read.我已经尝试了任何我能想到或读到的东西。 Here is the list:
这是清单:
1. Good old restart the mac. 1. 老好重启mac。
2. Find PID and kill. 2.找到PID并杀死。
lsof -wni tcp:5000
lsof -wni tcp:5000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ControlCe 6071 ogirginc 20u IPv4 0x1deaf49fde14659 0t0 TCP *:commplex-main (LISTEN)
ControlCe 6071 ogirginc 21u IPv6 0x1deaf49ec4c9741 0t0 TCP *:commplex-main (LISTEN)
Kill with sudo kill -9 6071
.用
sudo kill -9 6071
。
When I kill it, it is restarted with a new PID.当我杀死它时,它会以新的 PID 重新启动。
> lsof -wni tcp:5000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ControlCe 6071 ogirginc 20u IPv4 0x1deaf49fde14659 0t0 TCP *:commplex-main (LISTEN)
ControlCe 6071 ogirginc 21u IPv6 0x1deaf49ec4c9741 0t0 TCP *:commplex-main (LISTEN)
3. Use HTOP to find & kill 3. 使用HTOP来找杀
puma
.puma
过滤。PID USER PRI NI VIRT RES S CPU% MEM% TIME+ Command
661 ogirginc 17 0 390G 6704 ? 0.0 0.0 0:00.00 /opt/homebrew/bin/puma-dev -launchd -dir ~/.puma-dev -d localhost -timeout 15m0s -no-serve-public-paths
sudo kill -9 661
.sudo kill -9 661
杀死它。 Additional Info附加信息
5.2.6
. 5.2.6
。4.3.8
.4.3.8
。0.16.2
. 0.16.2
。2021/10/26 09:48:14 Existing valid puma-dev CA keypair found. Assuming previously trusted.
* Directory for apps: /Users/ogirginc/.puma-dev
* Domains: localhost
* DNS Server port: 9253
* HTTP Server port: inherited from launchd
* HTTPS Server port: inherited from launchd
! Puma dev running...
It feels like I am missing something obvious.感觉就像我错过了一些明显的东西。 Probably, due to lack of understanding some critical & lower parts of
puma-dev
.可能是由于缺乏对
puma-dev
一些关键和较低部分的了解。 I would really appreciate, if this is solved with some simple explanation.如果通过一些简单的解释来解决这个问题,我将不胜感激。 Thanks in advance!
提前致谢! :)
:)
Well, this is interesting.嗯,这很有趣。 It did not think of searching for
lsof
's the COMMAND
column, before.它之前没有想到要搜索
lsof
的COMMAND
列。
Turns out, ControlCe
is "Control Center" and with Monterey, macOS does listen ports 5000
& 7000
on default.事实证明,
ControlCe
是“控制中心”,对于 Monterey,macOS 会默认监听5000
和7000
端口。
AirPlay Receiver
.AirPlay Receiver
。puma
as usual.puma
。 Source: https://developer.apple.com/forums/thread/682332来源: https : //developer.apple.com/forums/thread/682332
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.