启动gitlab上的fleximanage项目的时候启动失败,报错信息如下:
(node:676369) UnhandledPromiseRejectionWarning: MongoError: no primary found in replicaset or invalid replica set name
at /root/src/flexiwan/fleximanage/backend/node_modules/mongo-express/node_modules/mongodb/lib/core/topologies/replset.js:624:11
at done (/root/src/flexiwan/fleximanage/backend/node_modules/mongo-express/node_modules/mongodb/lib/core/topologies/replset.js:290:7)
at Server.<anonymous> (/root/src/flexiwan/fleximanage/backend/node_modules/mongo-express/node_modules/mongodb/lib/core/topologies/replset.js:340:7)
at Object.onceWrapper (events.js:422:26)
at Server.emit (events.js:315:20)
at Pool.<anonymous> (/root/src/flexiwan/fleximanage/backend/node_modules/mongo-express/node_modules/mongodb/lib/core/topologies/server.js:384:12)
at Pool.emit (events.js:315:20)
环境信息如下:
mongodb集群信息:
{
"_id" : "rs0",
"version" : 1,
"protocolVersion" : NumberLong(1),
"writeConcernMajorityJournalDefault" : true,
"members" : [
{
"_id" : 0,
"host" : "172.26.218.169:27017",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 1,
"host" : "172.26.218.169:27018",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 2,
"host" : "172.26.218.169:27019",
"arbiterOnly" : true,
"buildIndexes" : true,
"hidden" : false,
"priority" : 0,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
}
],
"settings" : {
"chainingAllowed" : true,
"heartbeatIntervalMillis" : 2000,
"heartbeatTimeoutSecs" : 10,
"electionTimeoutMillis" : 10000,
"catchUpTimeoutMillis" : -1,
"catchUpTakeoverDelayMillis" : 30000,
"getLastErrorModes" : {
},
"getLastErrorDefaults" : {
"w" : 1,
"wtimeout" : 0
},
"replicaSetId" : ObjectId("617f98c76948c437519a94d7")
}
}
4. mongodb连接串`mongodb://root:root@172.26.218.169:27017,172.26.218.169:27018,172.26.218.169:27019/flexiwan?replicaSet=rs0&authSource=admin`
5. mongodb连接设置` {
useNewUrlParser: true,
useCreateIndex: true
}`
请问有没有大神有思路帮忙看一下?多谢!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。