문제

I've recently installed mongodb on my CentOS 6 VM running on Vagrant.

I added port forwarding to Vagrantfile to forward the mongo port

config.vm.forward_port 27017, 127017

I configured mongod to start automatically when the server starts and have confirmed that the service starts as intended.

however when i run mongo localhost:127017 from my host machine (not vagrant) i get the following error

MongoDB shell version: 1.8.2
connecting to: localhost:127017/test
Fri Jan 20 13:58:28 getaddrinfo("127.0.0.1") failed: nodename nor servname provided, or not known
Fri Jan 20 13:58:28 Error shell/mongo.js:81
exception: connect failed

any ideas?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top