Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Debian / Linux Mint - eventmachine error #380

Open
lacostenycoder opened this issue May 19, 2021 · 1 comment
Open

Not working on Debian / Linux Mint - eventmachine error #380

lacostenycoder opened this issue May 19, 2021 · 1 comment

Comments

@lacostenycoder
Copy link

in Gemfile we have

group :development do
  gem 'thin', require: false
end

When I start rails server I get eventmachine errors

rails s -b lvh.me -p 3000
=> Booting Thin
=> Rails 5.2.5 application starting in development on http://lvh.me:3000
=> Run `rails server -h` for more startup options
05/19/2021 9:12AM Thin web server (v1.8.0 codename Possessed Pickle)
05/19/2021 9:12AM Maximum connections set to 1024
05/19/2021 9:12AM Listening on lvh.me:3000, CTRL+C to stop
Exiting
Traceback (most recent call last):
	21: from bin/rails:9:in `<main>'
	20: from bin/rails:9:in `require'
	19: from /home/lance/.gem/ruby/2.6.6/gems/railties-5.2.5/lib/rails/commands.rb:18:in `<top (required)>'
	18: from /home/lance/.gem/ruby/2.6.6/gems/railties-5.2.5/lib/rails/command.rb:46:in `invoke'
	17: from /home/lance/.gem/ruby/2.6.6/gems/railties-5.2.5/lib/rails/command/base.rb:69:in `perform'
	16: from /home/lance/.gem/ruby/2.6.6/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	15: from /home/lance/.gem/ruby/2.6.6/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	14: from /home/lance/.gem/ruby/2.6.6/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	13: from /home/lance/.gem/ruby/2.6.6/gems/railties-5.2.5/lib/rails/commands/server/server_command.rb:142:in `perform'
	12: from /home/lance/.gem/ruby/2.6.6/gems/railties-5.2.5/lib/rails/commands/server/server_command.rb:142:in `tap'
	11: from /home/lance/.gem/ruby/2.6.6/gems/railties-5.2.5/lib/rails/commands/server/server_command.rb:147:in `block in perform'
	10: from /home/lance/.gem/ruby/2.6.6/gems/railties-5.2.5/lib/rails/commands/server/server_command.rb:53:in `start'
	 9: from /home/lance/.gem/ruby/2.6.6/gems/rack-2.2.3/lib/rack/server.rb:327:in `start'
	 8: from /home/lance/.gem/ruby/2.6.6/gems/thin-1.8.0/lib/rack/handler/thin.rb:22:in `run'
	 7: from /home/lance/.gem/ruby/2.6.6/gems/thin-1.8.0/lib/thin/server.rb:162:in `start'
	 6: from /home/lance/.gem/ruby/2.6.6/gems/thin-1.8.0/lib/thin/backends/base.rb:75:in `start'
	 5: from /home/lance/.gem/ruby/2.6.6/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
	 4: from /home/lance/.gem/ruby/2.6.6/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
	 3: from /home/lance/.gem/ruby/2.6.6/gems/thin-1.8.0/lib/thin/backends/base.rb:65:in `block in start'
	 2: from /home/lance/.gem/ruby/2.6.6/gems/thin-1.8.0/lib/thin/backends/tcp_server.rb:16:in `connect'
	 1: from /home/lance/.gem/ruby/2.6.6/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_server'
/home/lance/.gem/ruby/3.6.6/gems/eventmachine-1.2.7/lib/eventmachine.rb:531:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)

Not sure if this is related to eventmachine/eventmachine#154

I only started to experience this after installing my dependencies in a Linux based setup using Linux Mint 20.1

I tried to see if anything was running on port 3000 and both of there return null

netstat -a | grep 3000
lsof -i :3000         

My only solution was to switch back to rails default webrick server

@lacostenycoder lacostenycoder changed the title Not working on Debian / Linux Mint Not working on Debian / Linux Mint - eventmachine error May 19, 2021
@ioquatix
Copy link
Collaborator

That's a bit weird.

port is in use or requires root privileges

Are you trying to bind twice to the same port?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants