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

How to prevent nailgun from being started or use a different port #4089

Closed
estolfo opened this issue Jul 3, 2017 · 3 comments
Closed

How to prevent nailgun from being started or use a different port #4089

estolfo opened this issue Jul 3, 2017 · 3 comments

Comments

@estolfo
Copy link

estolfo commented Jul 3, 2017

Description

Hello,

I'm having issues in my continuous integration testing environment with nailgun automatically being started after rvm use jruby is called. Namely, there is something already running on the port the nailgun server is attempted to be started on. What solution do you recommend?

I've done some research and some people suggest editing the hook script. I thought I could also do one of the following:

  1. stop the nailgun server
  2. prevent it from being started
  3. start it on another port

I was wondering if there was a way I could achieve one of the above from a bash script, as my tests run on different operating systems and depending on knowing where the hook script is located would be a fragile solution.

Thank you in advance
Emily

@mpapis
Copy link
Member

mpapis commented Sep 3, 2017

starting of nailgun is controlled with https://github.com/rvm/rvm/blob/master/hooks/after_use_jruby it can be disabled with:

chmod -x $rvm_path/hooks/after_use_jruby

If you would like this script (and https://github.com/rvm/rvm/blob/master/scripts/functions/hooks/jruby) can be modified to support the port flag

@mpapis
Copy link
Member

mpapis commented Sep 17, 2017

Closing as there was no feedback in over 2 weeks, please feel free to reopen when you can provide the requested information.

@mpapis mpapis closed this as completed Sep 17, 2017
@pkuczynski pkuczynski added this to the rvm-1.29.4 milestone Sep 19, 2017
BrianHawley added a commit to BrianHawley/rvm that referenced this issue Jun 23, 2018
The class name changed, so check for both.

[Fixes rvm#4089]
BrianHawley added a commit to BrianHawley/rvm that referenced this issue Jun 23, 2018
JRuby 9+ runs nailgun with an org.jruby.main.NailServerMain wrapper.
JRuby 1.7.x calls com.martiansoftware.nailgun.NGServer directly.
Check for both when attemting to see if nailgun is running.

Fixes rvm#4089
@BrianHawley
Copy link
Contributor

@mpapis the problem was detection of the running server. See #4412.

BrianHawley added a commit to BrianHawley/rvm that referenced this issue Jun 25, 2018
JRuby 9+ runs nailgun with an org.jruby.main.NailServerMain wrapper.
JRuby 1.7.x calls com.martiansoftware.nailgun.NGServer directly.
Check for both when attempting to see if nailgun is running.

Fixes rvm#4089.
mpapis pushed a commit that referenced this issue Jul 1, 2018
JRuby 9+ runs nailgun with an org.jruby.main.NailServerMain wrapper.
JRuby 1.7.x calls com.martiansoftware.nailgun.NGServer directly.
Check for both when attempting to see if nailgun is running.

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

No branches or pull requests

4 participants