Homework 1.3 - Validation Error

Hi all,

I’m on my last attempt, I’m wondering where I’m going wrong with the validation step.

Steps:

  1. Successfully connect to Vagrant
  2. Run 3 mongod (forked)
  3. connect to 1st mongo
  4. rs.initiate()
  5. create user & auth user
  6. should I connect the replica set on this step? (rs.add)
  7. validate

After two attempts, I would like to know where I went wrong before failing this HW

Thanks!

After creating user, you need to log back in one of the host using the user id and password authenticating against admin. Once initiated, you can use rs.add() to add other members in the replica set. Use rs.status() to see the details of the replica set.

Thanks I have the replica set up and running, but I’m still having issues with validate.

( Failed global initialization: InvalidSSLConfiguration Can not set up PEM key file.
Failed global initialization: InvalidSSLConfiguration Can not set up PEM key file.)

any suggestions on what I may be doing wrong?

You must have got additional error messages
Are you able to connect with mongo using your client certificate?
Have you placed the certificates in the specified directory?

Full error msg:

Failed global initialization: InvalidSSLConfiguration Can not set up PEM key file.
Failed global initialization: InvalidSSLConfiguration Can not set up PEM key file.
{ unauthorizedStatus: 2020-12-08T10:34:02.819+0000 E NETWORK [main] cannot read certificate file: /home/vagrant/shared/certs/client.pem error:02001002:system library:fopen:No such file or directory, memberStatuses: 2020-12-08T10:34:02.830+0000 E NETWORK [main] cannot read certificate file: /home/vagrant/shared/certs/client.pem error:02001002:system library:fopen:No such file or directory }

1 of 3 mongod: mongod --replSet myReplSet --port 31130 --dbpath ~/M310-HW-1.3/r0 --logpath ~/M310-HW-1.3/r0/mongodb.log --fork --sslMode requireSSL --clusterAuthMode x509 --sslPEMKeyFile ~/shared/m310-certs/server.pem --sslCAFile ~/shared/m310-certs/ca.pem

1 of 3 mongo: mongo --ssl --sslPEMKeyFile ~/shared/m310-certs/client.pem --sslCAFile ~/shared/m310-certs/ca.pem --port 31130 --host database.m310.mongodb.university

I’m able to connect to my mongod with mongo. rs.initiate() all 3 at the same time. create user and auth user (db.getSiblingDB)

then when I validate I get the error message. which step am I missing?

Validation script expecting the certificate files under /home/vagrant/shared/certs/ but you placed it under ~/shared/m103-certs
That could be the issue
Please check your lab requirements again.I think they gave a tree structure how the certs should be placed

Thank you!!! that was the issue. I completed the homework. Thank you again!!