简体   繁体   中英

Unable to restart Rails 5 development Puma server on Nitrous.io

Nitrous.io is an awesome service and the uptime keeps getting better, but that also sometimes becomes problematic for me when I don't know the correct way to terminate my development servers. I just upgraded to Action Cable and thereby switched to using Puma, but I'm not sure how to kill the Puma server while on Nitrous.io

/home/nitrous/Academy/.bundle/gems/puma-3.4.0/lib/puma/binder.rb:255:in `initialize': Address already in use - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE)

After downgrading the gem version and bundling:

gem 'puma', '~> 3.6.2'

if problem still persists,then try to kill the running puma process first:

ps aux | grep puma

2598 2.4 3.5 1017520 141400 pts/16 Sl+ 15:57 0:04 puma 3.7.0 (tcp://0.0.0.0:3000) [rails-app]

Restart the app again and check puma processes

jaswind+ 2950 11.0 3.6 1020164 143996 pts/10 Sl+ 16:02 0:04 puma 3.6.2 (tcp://0.0.0.0:3000) [rails_app_copy]

jaswind+ 2976 18.1 3.6 1020880 144788 pts/16 Sl+ 16:02 0:04 puma 3.6.2 (tcp://0.0.0.0:3001) [rails_app]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM