Ariyun’s ubuntu server configured the files when deploying mongodb, but still could not connect remotely.

  mongodb, question

The server that rented Aliyun wants to deploy a blog, but my own computer (the computer I use is not a server) can be connected remotely to Mongodb if it cannot be connected locally to the server.

Cloud server system: Ubuntu 16.04 64-bit

Conf code

dbpath=/data/MongoDB/blog
 logpath=/data/MongoDB/log/mongodb.log
 logappend = true
 port=27017
 fork=true
 #bind_ip=127.0.0.1

Remote connection error message

connecting to: mongodb://xx.xxx.xxx.x:27017/blog
 2018-12-28T10:43:34.335+0800 E QUERY    [js] Error: couldn't connect to server xx.xxx.xx.x:27017,   connection attempt failed: NetworkTimeout: Error connecting to xx.xxx.xx.x:27017 :: caused by :: Socket operation timed out :
 connect@src/mongo/shell/mongo.js:257:13
 @(connect):1:6
 exception: connect failed

I have seen many methods of remote connection on the Internet and have tried them, but only local connections can be made. The configuration file service has also been restarted.

bind_ip=0.0.0.0

Try it. then I remember ariyun, the default is that most ports are not open, so the security team should set it up by itself.