You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
3.6: When using --auth mongod binds to localhost only #222
Have you used setFeatureCompatibilityVersion in your mongod 3.4 server before upgrading it to 3.6? You need to use featureCompatibilityVersion in your mongod 3.4 server then you are allowed to use your data with a mongod 3.6 service.
# log in to your mongod 3.4 server
> db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
> exit
# migrate your data now
$ docker run -d --restart=always --name mongo -v mongo:/data/db -p 27017:27017 mongo:3.6 --auth --bind_ip_all
Yeah, this was discussed over in #180 when the change to MongoDB's default bind behavior was made in 3.5 (before the 3.6 GA); @yosifkit is having a big "told you so moment" right now. 😄 😞
@ozlerhakan: Yes, i did "db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )" and it was 3.4. But that's not the issue. From within the container i can connect without problems.
I'm not quite firm about bash but the docker-entrypoint.sh seems to ensure that "--bind_ip_all" gets removed.
Even though the Dockerfile has a "--bind_ip_all" in the CMD, it doesn't seem to work.
It should be either documented or ensured that "--bind_ip_all" is added everytime. Is there any case in which you don't want to bind to all ips in a docker container?
As far as I can see it was introduced to secure mongo to not be connectable from remote... But the port mapping to the host should be handled by docker.
Activity
ozlerhakan commentedon Dec 13, 2017
Have you used
setFeatureCompatibilityVersionin your mongod 3.4 server before upgrading it to 3.6? You need to usefeatureCompatibilityVersionin your mongod 3.4 server then you are allowed to use your data with a mongod 3.6 service.tianon commentedon Dec 14, 2017
Yeah, this was discussed over in #180 when the change to MongoDB's default bind behavior was made in 3.5 (before the 3.6 GA); @yosifkit is having a big "told you so moment" right now. 😄 😞
acuntex commentedon Dec 14, 2017
@ozlerhakan: Yes, i did "db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )" and it was 3.4. But that's not the issue. From within the container i can connect without problems.
I'm not quite firm about bash but the docker-entrypoint.sh seems to ensure that "--bind_ip_all" gets removed.
Even though the Dockerfile has a "--bind_ip_all" in the CMD, it doesn't seem to work.
It should be either documented or ensured that "--bind_ip_all" is added everytime. Is there any case in which you don't want to bind to all ips in a docker container?
As far as I can see it was introduced to secure mongo to not be connectable from remote... But the port mapping to the host should be handled by docker.