[iyunv@puppet-agent1 bin]# ./mongo 192.168.0.123/test
MongoDB shell version: 3.0.7
connecting to: 192.168.0.123/test
2015-11-25T10:47:43.105+0800 W NETWORK Failed to connect to 192.168.0.123:27017 after 5000 milliseconds, giving up.
2015-11-25T10:47:43.109+0800 E QUERY Error: couldn't connect to server 192.168.0.123:27017 (192.168.0.123), connection attempt failed
at connect (src/mongo/shell/mongo.js:181:14)
at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed
服务端启动OK 也有监听27017端口
tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 5439/./mongod
本地是可以链接的 但在其他机器上就无法链接到这个mongodb
[iyunv@10-13 bin]# ./mongo localhost/test
MongoDB shell version: 3.0.7
connecting to: localhost/test
Server has startup warnings:
2015-11-25T10:47:08.953+0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2015-11-25T10:47:08.953+0800 I CONTROL [initandlisten]
>
bye