为什么我的Mac上的端口5000总是运行某些东西
我是一个开发人员,我需要在5000端口上运行Ruby应用程序,但是我始终尝试运行我的应用程序:
Address already in use - bind(2) (Errno::EADDRINUSE)
我知道解决此问题的最简单方法;只是更改我正在运行应用程序的端口,但我想知道会发生什么,因为每次执行lsof -i tcp:5000
并杀死该过程时,都会自动开始一个新的过程在该端口中运行。
我正在使用Macos Monterrey使用MacBook Pro,其中版本为12.0.1
I am a developer and I need to run my ruby app at port 5000, but always I try to run my app I get:
Address already in use - bind(2) (Errno::EADDRINUSE)
I know that the easiest way for solving this; is just change the port that I am using for running my app, but I want to know what happens, because every time I execute lsof -i tcp:5000
and kill the process, automatically a new process starts running in that port.
I am using a macbook pro with MacOs Monterrey with version 12.0.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
之所以发生这种情况,是因为蒙特雷的控制中心收听端口5000和端口7000。
要解决此问题,您需要关闭
系统设置>一般>气流& Handoff> AirPlay接收器
。更多信息
This happens because Control Center on Monterey listening to port 5000 and port 7000.
For fixing this you need to turn off
System Settings > General > AirDrop & Handoff > AirPlay Receiver
.More info
goto 系统设置>一般> Airplay接收器>禁用AirPlay接收器选项。
Goto System Settings > General > AirPlay Receiver > Disable AirPlay Receiver option.
将端口号更改为5001,然后尝试
change the port number to 5001 and try