Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mongodb opsmanager应用程序无法连接到opsmanager数据库_Mongodb_Amazon Web Services_Amazon Ec2 - Fatal编程技术网

Mongodb opsmanager应用程序无法连接到opsmanager数据库

Mongodb opsmanager应用程序无法连接到opsmanager数据库,mongodb,amazon-web-services,amazon-ec2,Mongodb,Amazon Web Services,Amazon Ec2,我在一个实例中安装了opsmanager数据库,在另一个实例中安装了应用程序 从链接中获取点 在应用程序数据库服务器中,当inetstat-nltp显示127.0.0.1:27017运行mongod时 在其他实例中安装应用程序后,我将mongo.mongoUri编辑为mongodb://db_instance_publicip:27017在/opt/mongodb/mms/conf/conf mms.properties中 当我启动sudo服务时,mongodb mms start显示以下错

我在一个实例中安装了opsmanager数据库,在另一个实例中安装了应用程序 从链接中获取点

  • 在应用程序数据库服务器中,当i
    netstat-nltp
    显示127.0.0.1:27017运行mongod时

  • 在其他实例中安装应用程序后,我将
    mongo.mongoUri
    编辑为
    mongodb://db_instance_publicip:27017
    /opt/mongodb/mms/conf/conf mms.properties中

  • 当我启动sudo服务时,mongodb mms start显示以下错误

    uri=mongodb://db_instance_publicip:27017/?maxPoolSize=150}错误:等待连接时30000毫秒后超时


  • 错误:等待连接时30000毫秒后超时。群集状态的客户端视图为{type=UNKNOWN,servers=[{address=db_instance\u publicip:27017,type=UNKNOWN,state=CONNECTING,exception={com.mongodb.mongoscocketopenexception:exception opening socket},由{java.net.ConnectException:Connection-densed(Connection densed)}引起]

    也面临同样的问题。我的问题是,由于/etc/mongod.conf中的这一行,我的Mongo DB仅绑定到本地主机:

    bindIp: 127.0.0.1  # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.
    

    正如同一行中的注释部分所示,我必须将“127.0.0.1”替换为“0.0.0.0”,然后重新启动Mongo DB,它开始工作!

    也面临同样的问题。我的问题是,由于/etc/mongod.conf中的这一行,我的Mongo DB只绑定到本地主机:

    bindIp: 127.0.0.1  # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.
    
    正如同一行中的注释部分所示,我必须将“127.0.0.1”替换为“0.0.0.0”,然后重新启动Mongo DB,它开始工作了