Mongodb connection issu

Environment: centos7
mongodb version: v3.6.4
Server: Tencent Cloud

problem description: when the mongodb, started on the server can be connected, but the link command with non-localhost (or 127.0.0.1), the connection fails, and the IP is either the server"s private network Ip or the public network IP.
error prompt:

MongoDB shell version v3.6.4
connecting to: mongodb://ip:53082/
2018-06-07T07:28:14.837+0800 W NETWORK  [thread1] Failed to connect to ip:53082, in(checking socket for error after poll), reason: Connection refused
2018-06-07T07:28:14.837+0800 E QUERY    [thread1] Error: couldn"t connect to server ip:53082, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed

how to solve the problem of asking for help?

Mar.18,2021

later resolved the problem through other channels.
solved by adding bind_ip=0.0.0.0, to the settings file and then restarting mongodb,

Menu