I’m working through homework 1.3, and ran into an unusual problem: the servers are running, but rs.initiate() can’t find… itself?
Here’s what I’ve done.
Starting the instances:
mongod --replSet TO_BE_SECURED --sslMode requireSSL --clusterAuthMode x509 --sslClusterFile ~/shared
/certs/server.pem --sslPEMKeyFile ~/shared/certs/client.pem --sslCAFile ~/shared/certs/ca.pem --bind_ip localhost,databa
se.m310.mongodb.university --port 31130 --dbpath ~/M310-HW-1.3/r0 --logpath ~/M310-HW-1.3/r0/mongodb.log --fork
The only differences between them are the port, dbpath, and logpath, as in the spec.
Connecting to the primary:
mongo --host database.m310.mongodb.university --port 31130 --ssl --sslPEMKeyFile ./shared/certs/client.pem --sslCAFile ./shared/certs/ca.pem
All of the instances are up - I connected to each one to make sure. But the weirdest part is that even rs.initiate() without any parameters can’t connect to the server it’s been run on.
I’m probably missing something obvious here, but I truly don’t see it. Any help would be appreciated.