Search code examples
ruby-on-railscloud9-idethin

Can't Start Rails Development,Cloud 9


I've tried to kill my rails server using this article from cloud 9.

I'm using the gem thin and everytime I try to run cloud server command I recieve this error

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-

full error


Solution

  • It seems the port 8080 is in use, to find the PID using the port, run :

    netstat -tulpn | grep :8080
    

    Then you can kill -9 <PID>