Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When starting rails server "Uncaught exception: no acceptor (port is in use or requires root privileges)"

I Updated the output to make it more readable. Still getting this error.

Noob question. Has anyone else seen this error? This error seems to be spreading. It now happens for port 3000 and 3001. If I change the code and debug settings to 3002 then I can continue debugging.

--------------------------------------------------------------

-------------------------------------------------------------

$: rails s -p 3000
=> Booting Thin
=> Rails 3.2.11 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> 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:3000, CTRL+C to stop
Exiting
/home/xxx/.rvm/gems/ruby-1.9.3-p551@ats/gems/eventmachine-1.0.8/lib/eventmachine.rb:534:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
like image 892
podzach Avatar asked Nov 27 '25 06:11

podzach


1 Answers

run

ps ax | grep rails

this will return the process number of the rails server currently running

then you can do kill -9 *process_numer*

this answer assumes that you accidentally quit rails server by pressing Ctrl+Z instead of Ctrl+C which did no dispose of the process properly and is now tying up the port.

like image 69
Kirka121 Avatar answered Nov 28 '25 22:11

Kirka121



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!