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

3.5.7 now binds to localhost-only by default #180

Closed
tianon opened this issue May 15, 2017 · 3 comments
Closed

3.5.7 now binds to localhost-only by default #180

tianon opened this issue May 15, 2017 · 3 comments
Assignees

Comments

@tianon
Copy link
Member

tianon commented May 15, 2017

We need to figure out a good way to handle https://jira.mongodb.org/browse/SERVER-28229 -- MongoDB as of 3.5.7 now binds to localhost-only (see also mongodb/mongo@60636b4).

There is a new --bind_ip_all flag, but it does pose complications similar to what we've got with our new initdb behavior around configuration files. 😞

@tianon
Copy link
Member Author

tianon commented May 15, 2017

It might be that we simply add --bind_ip_all to CMD, and leave this choice up to our users to make?

@yosifkit
Copy link
Member

CMD seems fine, but gets annoying if I just want to add a flag:

$ docker run -d --name mongo mongo:3.5 --newflag
$ # can't connect :'(

Though it should be in the logs:

If no explicit bind_ip has been provided, print a startup warning indicating that the server is not responding to external connections, which describes how to fix the problem.

2017-05-18T21:07:13.857+0000 I CONTROL  [initandlisten] ** ATTENTION: The server is bound to localhost.
2017-05-18T21:07:13.857+0000 I CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server. 
2017-05-18T21:07:13.857+0000 I CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP addresses it
2017-05-18T21:07:13.857+0000 I CONTROL  [initandlisten] **          should serve responses from, or with --bind_ip_all to bind to all interfaces.

@tianon
Copy link
Member Author

tianon commented May 22, 2017

Yeah, I guess the best we can do there is to update our docs once 3.6 officially drops to explicitly include --bind_ip_all in the couple places we add flags?

IMO it'll be easier for us to handle users doing that if we decide to push this logic into the docker-entrypoint.sh, since we'll have to handle that case regardless (given that users tend to do things we don't expect 😄).

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