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

Starting rails server with a different port #1200

Closed
khpatel4991 opened this issue Jan 30, 2017 · 14 comments

Comments

Projects
None yet
@khpatel4991
Copy link

commented Jan 30, 2017

Steps to reproduce

  1. I have a simple rails 5 API app, and I updated puma to 3.7.0. I start my server on port 3090 with rails server -p 3090 as I have frontend app running on 3000.

Expected behavior

It should start listening on port 3090, not on the default 3000.

System configuration

Ruby version: RVM 2.3.3-p222
Rails version: 5.0.1

Logs:

rs -p 3090
=> Booting Puma
=> Rails 5.0.1 application starting in development on http://localhost:3090
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.7.0 (ruby 2.3.3-p222), codename: Snowy Sagebrush
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Exiting
~/.rvm/gems/ruby-2.3.3/gems/puma-3.7.0/lib/puma/binder.rb:269:in `initialize': Address already in use - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE)
@twalpole

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2017

This is basically the same as issue #1199

@richpeck

This comment has been minimized.

Copy link

commented Jan 30, 2017

+1

@michael-reeves

This comment has been minimized.

Copy link

commented Jan 30, 2017

Seeing the same thing trying to run port 3001.

@ayghor

This comment has been minimized.

Copy link

commented Jan 31, 2017

see 42bec46, it was tagged v3.6.2 and was NOT merged on v3.7.0 for some reason:

Revert "fix access priorities of each level in LeveledOptions"

This reverts commit 15f0847289d0815284f87eeea4625100b581c026.

See #1154, this commit unintentionally changed behavior regarding the
importance of command line options.

cant test reverting teh reversion right now

@ayghor

This comment has been minimized.

Copy link

commented Jan 31, 2017

v3.2.6 respect -p switch, v3.7.0 does not.

@andrew

This comment has been minimized.

Copy link

commented Jan 31, 2017

A similar thing happened back in November: #1154

@ivanovaleksey

This comment has been minimized.

Copy link

commented Feb 7, 2017

@ayghor Do you mean 3.6.2? Since 3.2.6 doesn't exist.
And with 3.6.2 it works fine.

@ayghor

This comment has been minimized.

Copy link

commented Feb 7, 2017

@ayghor Do you mean 3.6.2? Since 3.2.6 doesn't exist.
And with 3.6.2 it works fine.

yes, 3.6.2

@roeintense

This comment has been minimized.

Copy link

commented Feb 8, 2017

Same problem. Downgraded to 3.6.2, everything fat and sassy again.

acmetech added a commit to socializer/socializer_test that referenced this issue Feb 8, 2017

revert b6837fd
the issue is with puma 3.7.0. puma/puma#1200

run `env PORT=4000 bin/rails server` for the time being
@jaswinder97

This comment has been minimized.

Copy link

commented Feb 9, 2017

After updating 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]

and then restart the app again

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]
@nateberkopec

This comment has been minimized.

Copy link
Member

commented Feb 9, 2017

Yeah @ayghor got it right, for some reason I reverted on the 3.6.2 branch but never on master. My very, very bad. Fixed by above.

@nateberkopec

This comment has been minimized.

Copy link
Member

commented Feb 9, 2017

Gonna push out 3.7.1 with this fix ASAP.

@beccasaurus

This comment has been minimized.

Copy link

commented Feb 16, 2017

Is there an ETA for 3.7.1 going out with this fix?

@nateberkopec

This comment has been minimized.

Copy link
Member

commented Feb 18, 2017

@remi Yes, sorry! had to have a meeting with Evan last week to discuss how the release process works, working on a 3.7.1 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.