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

Undocumented TCP/IP binding change #2596

Closed
DSpeichert opened this issue Sep 16, 2014 · 15 comments
Closed

Undocumented TCP/IP binding change #2596

DSpeichert opened this issue Sep 16, 2014 · 15 comments

Comments

@DSpeichert
Copy link

@DSpeichert DSpeichert commented Sep 16, 2014

It seems that somewhere between versions 0.9-0.9.2 Meteor started to bind to 127.0.0.1 by default instead of 0.0.0.0.
While it is a good change, it seemed to have passed through without any notice or message (meteor run also doesn't say what it's binding to, it only displays ROOT_URL).

It has caused me quite a headache when my development app stopped responding for no obvious reason. I suggest putting a notice or better visible information about default binding and displaying IP:Port on startup in dev mode.

@n1mmy
Copy link
Member

@n1mmy n1mmy commented Sep 16, 2014

Thanks for the report, @DSpeichert. This was an unintentional change. I've tracked it down to 7140234 and will continue to investigate.

@n1mmy
Copy link
Member

@n1mmy n1mmy commented Sep 16, 2014

In the mean time you can work around this by passing -p 0.0.0.0:3000 to meteor run

estark37 pushed a commit that referenced this issue Sep 16, 2014
We still use localhost as DDP_DEFAULT_CONNECTION_URL for mobile builds
if another host isn't provided; we just don't want localhost to
overwrite an unspecified host for the proxy to bind to.

Fixes #2596.
@DSpeichert
Copy link
Author

@DSpeichert DSpeichert commented Sep 16, 2014

I've started using -p with 0.0.0.0:3000 per documentation.
I don't think it needs to be reverted, it might be a better practice to bind to localhost by default since it's a development mode.

@garrilla
Copy link

@garrilla garrilla commented Sep 16, 2014

@DSpeichert meteor -p 0.0.0.0:3000 works OK for me on 0.9.2.1

@DSpeichert
Copy link
Author

@DSpeichert DSpeichert commented Sep 16, 2014

I'm not saying it doesn't work, it works for me too :)

@garrilla
Copy link

@garrilla garrilla commented Sep 16, 2014

Sorry, my mis-reading... its been one of those days... [sorry for adding spam to the issue thread too]

@zeineath
Copy link

@zeineath zeineath commented Sep 16, 2014

but.. all tutorials (especially the meteor quick start) just says:

  1. $ curl https://install.meteor.com | /bin/sh
  2. $ meteor create myapp
  3. $ cd myapp
    $ meteor
    => Meteor server running on: http://localhost:3000/

which could really frustrate new users (*and fairly old ones) to conclude that meteor is not working to spend time learning...

@DSpeichert
Copy link
Author

@DSpeichert DSpeichert commented Sep 16, 2014

Actually, Meteor server running on: http://localhost:3000/ implies that it's listening on 127.0.0.1.

I think the message should go like this:
Meteor server running on BOUND_IP:BOUND_PORT with URL base ROOT_URL.

estark37 pushed a commit that referenced this issue Sep 16, 2014
We still use localhost as DDP_DEFAULT_CONNECTION_URL for mobile builds
if another host isn't provided; we just don't want localhost to
overwrite an unspecified host for the proxy to bind to.

Fixes #2596.
@garrilla
Copy link

@garrilla garrilla commented Sep 16, 2014

I agree that the default address binding implies 127.0.0.1, however it should work on any address, 0.0.0.0, because druing the development phase it should be availble to sources external to the the server machine. Re-limiting it to a single address can then be acheived with the ROOT_URL env-variable.

@estark37 estark37 closed this in 0ac1855 Sep 17, 2014
@estark37
Copy link
Contributor

@estark37 estark37 commented Sep 17, 2014

We have a fix for this on devel. It'll be out either in a patch release in the next couple days, or in an 0.9.3 RC.

@corentin-branquet
Copy link

@corentin-branquet corentin-branquet commented Sep 17, 2014

I encounter the same problem and meteor -p 0.0.0.0:3000 works for me too

@lirbank
Copy link

@lirbank lirbank commented Sep 18, 2014

Not sure if this is obvious but Facebook logins does not work with meteor -p 0.0.0.0:3000.

I have a Test FB app with Site URL set to http://localhost:3000/ which works if I launch Meteor with meteor but I have to use meteor -p 0.0.0.0:3000 to be able to dev/test my Meteor app on a mobile device (not Cordova, just as a web app in IOS safari) via the local network.

So there seem to be no way of logging into the Meteor app via FB on a mobile device on the local network (that was a long list of criteria) currently (unless I set up a hosted staging site), unless I am missing something?

estark37 pushed a commit that referenced this issue Sep 18, 2014
We still use localhost as DDP_DEFAULT_CONNECTION_URL for mobile builds
if another host isn't provided; we just don't want localhost to
overwrite an unspecified host for the proxy to bind to.

Fixes #2596.
@estark37
Copy link
Contributor

@estark37 estark37 commented Sep 18, 2014

This should be fixed in 0.9.2.2 (that is, the server should be listening on 0.0.0.0 by default now). Thanks for the reports!

@corentin-branquet
Copy link

@corentin-branquet corentin-branquet commented Sep 18, 2014

Problem fixed now, you have to meteor update and it should works.

@lirbank
Copy link

@lirbank lirbank commented Sep 18, 2014

Sweet, thanks @estark37 for the quick fix!

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.