MongoDB on Vagrant via Port Forwarding issue

大憨熊 提交于 2019-12-01 00:15:58

TCP port numbers are 16-bit unsigned, which mean the max value is 65535 (2^16), and you're trying with 127017.

You will need to set the mongod bind_ip to 0.0.0.0 instead of 127.0.0.1 (which is the loopback address) so that all interfaces can access it.

Can you connect to the mongo server from vagrant ssh? If not, you might want to make sure that mongod is running.

Do you have an ip_bind set up in your mongodb.conf or mongod startup script? (If you do, you might want to unset it--not exactly sure how vagrant's port forwarding works, but this might be what's causing the problem.)

ttanai

bind_ip to 0.0.0.0 does not work. Try bind_ip=127.0.0.1,10.0.0.25, that worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!