我试图使用本文从云9杀死我的rails服务器。
我使用的是gem thin,每次我尝试运行云服务器命令时都会收到这个错误
rails s -b $IP -p $PORT
=> Booting Thin
=> Rails 4.2.6 application starting in development on http://0.0.0.0:8080
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:8080, CTRL+C to stop
Exiting
/usr/local/rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:530:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
from /usr/local/rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:530:in `start_server'
from /usr/local/rvm/gems/ruby-2.3.0/gems/thin-1.6.4/lib/thin/backends/tcp_server.rb:16:in `connect'
from /usr/local/rvm/gems/ruby-2.3.0/gems/thin-全误差
发布于 2016-04-21 14:13:27
似乎端口8080正在使用,要找到使用端口的PID,请运行:
netstat -tulpn | grep :8080然后你就可以kill -9 <PID>了
发布于 2016-04-20 13:06:13
此错误表示,8080端口已在使用,您可能需要为您的应用程序使用不同的端口。
更新
试图扼杀现有的进程。使用此命令ps -ef | grep thin查找端口号,然后杀死它kill -9 <port>。现在试着运行你的应用程序。
https://stackoverflow.com/questions/36740812
复制相似问题