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

Allow the test command to run on a specific interface with --port IP:PORT #6961

Closed
julienrott opened this Issue May 3, 2016 · 11 comments

Comments

Projects
None yet
3 participants
@julienrott

julienrott commented May 3, 2016

When launching meteor test --driver-package practicalmeteor:mocha --port=$IP:$PORT on c9.io workspace I get the following error

[[[[[ Tests ]]]]]                             

=> Started proxy.                             
Unexpected mongo exit code 48. Restarting.    
Unexpected mongo exit code 48. Restarting.    
Unexpected mongo exit code 48. Restarting.    
Can't start Mongo server.                     
MongoDB exited because its port was closed, or was already
taken by a previous instance of MongoDB

Check for other processes listening on port 1
or other Meteor instances running in the same project.

It would be nice to be able to specify the interface like with the meteor run --port=$IP:$PORT command.

@abernix

This comment has been minimized.

Member

abernix commented May 3, 2016

I'll take a look at this.

abernix added a commit to abernix/meteor that referenced this issue May 3, 2016

Allow --port in "test" to allow a bindaddr, same as non-test
The `test` mode wasn't passing the proper proxyHost and proxyPort values to runAll.  This changes the behaviour to work the same as the regular `run` mode and also adds tests for both modes to test the bindaddr (localAddress) is taking effect properly.

Fixes meteor#6961
@abernix

This comment has been minimized.

Member

abernix commented May 3, 2016

PR #6964 provides a fix for this. Good pointing this out @julienrott.

@julienrott

This comment has been minimized.

julienrott commented May 3, 2016

Thank you for the quick fix !
Any idea when it will be available in a meteor release ?

@tmeasday

This comment has been minimized.

Contributor

tmeasday commented May 3, 2016

This will be in 1.3.3, probably released in the next month.

@julienrott

This comment has been minimized.

julienrott commented May 4, 2016

OK, thank you very much.
Is it possible to use a nightly build until then ?

@abernix

This comment has been minimized.

Member

abernix commented May 4, 2016

@julienrott Absolutely! See this section of the Meteor Repo README – and report back if you find any problems. 😺

@julienrott

This comment has been minimized.

julienrott commented May 4, 2016

It's working great, I can run my tests on c9.io !
Thank you !

@abernix

This comment has been minimized.

Member

abernix commented May 21, 2016

@julienrott The first 1.3.3 beta is out which contains this fix. If you'd like to try – you can use meteor update --release 1.3.3-beta.0

@julienrott

This comment has been minimized.

julienrott commented May 24, 2016

@abernix It's working perfect, thank you !

@julienrott

This comment has been minimized.

julienrott commented Jun 3, 2016

Hi @abernix @tmeasday ,

Still on a c9.io workspace, it seems that when running meteor run --port=$IP:$PORT --debug-port 8082 the $PORT variable is not taken into account. Or it is, but the debug port is not accessible from the browser.
Would it be possible to specify the interface to the debug-port option ? Like --debug-port $IP:$PORT

@abernix

This comment has been minimized.

Member

abernix commented Jun 3, 2016

@julienrott The --port you're using here (outside of test mode) wasn't modified in this fix (it already worked) and --debug-port is again, something different. --debug-port is actually just proxied to node-inspector, but currently there is no support for the --web-host flag which node-inspector provides so it's defaulting to listening on 127.0.0.1.

If this is something you need, please consider opening a feature request (with separate issue number) per the guidelines for feature requests. Though, I wouldn't expect this request to gain much attention/traction anytime soon.

As a work around, I would suggest researching SSH port forwarding (or any port forwarding that c9.io might already offer to expose that 8080 port). Or, if that doesn't work out, you could probably run your own node-inspector (using its own flags/options) and start meteor with NODE_OPTIONS='--debug-brk' meteor run .... Meteor should then connect to your instance of node-inspector. I wouldn't be able to provide support/guidance for either of these scenarios – but they should theoretically work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment