I have installed MongoDB on EC2 Amazon Linux instance. I have set the security group in the way the port SSH 22 and TCP 27017 are opened. Unfortunately when I try to connect executing the command from the ssh console
mongo <public-dns-name>:27107/test
I get the following error
connecting to: <public-dns-name>:27017/test
2014-08-09T15:25:07.966+0000 warning: Failed to connect to xxx.xx.xx.xx:27017, reason: errno:111 Connection refused
2014-08-09T15:25:07.967+0000 Error: couldn't connect to server <public-dns-name>:27017 (172.31.19.26), connection attempt failed at src/mongo/shell/mongo.js:148
exception: connect failed
您可能需要使用nginx的流模块,因为默认情况下,nginx设置为http。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.