Mongodb opsmanager应用程序无法连接到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显示以下错
netstat-nltp
显示127.0.0.1:27017运行mongod时
mongo.mongoUri
编辑为mongodb://db_instance_publicip:27017
在/opt/mongodb/mms/conf/conf mms.properties中
错误:等待连接时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,它开始工作了