Я пытаюсь добавить члена в кластер в mongdb 4.0 в Ubuntu. 18.04
Я добавляю правила в брандмауэр с
sudo ufw allow 27017
Я пытаюсь соединиться с этим кодом:
root@localhost:~# mongo prueba2:27017
MongoDB shell version v4.0.10
connecting to: mongodb://prueba2:27017/test?gssapiServiceName=mongodb
2019-07-07T03:18:04.857+0000 E QUERY [js] Error: couldn't connect to server prueba2:27017, connection attempt failed: SocketException: Error connecting to prueba2:27017 (192.168.132.51:27017) :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:344:17
@(connect):2:6
exception: connect failed
, но при попытке добавить участника не работает
> rs.initiate( { _id: "configReplSet", configsvr: true, members: [ { _id: 0, host : "prueba1:27019" }, { _id: 1, host : "prueba2:27019" } ] } )
{
"operationTime" : Timestamp(0, 0),
"ok" : 0,
"errmsg" : "replSetInitiate quorum check failed because not all proposed set members responded affirmatively: prueba2:27019 failed with Error connecting to prueba2:27019 (192.168.132.51:27019) :: caused by :: Connection refused",
"code" : 74,
"codeName" : "NodeNotFound",
"$gleStats" : {
"lastOpTime" : Timestamp(0, 0),
"electionId" : ObjectId("000000000000000000000000")
},
"lastCommittedOpTime" : Timestamp(0, 0),
"$clusterTime" : {
"clusterTime" : Timestamp(0, 0),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
}
}
Мне нужно настроить брандмауэр ???