Admin user created, still "there are no users authenticated"

Homework 1.2.

I can’t figure this out. Seems like everything works as expected, yet submission indicates and error.

Steps I took

  1. invoke ./setup-hw-1.2.sh and the replica set is initialized.

  2. db.shutdownSever() on all 3 mongod, starting with secondaries.

  3. created keyfile, and chmod
    openssl rand -base64 741 > /var/mongodb/pki/m103-keyfile
    chmod 600 /var/mongodb/pki/m103-keyfile

  4. started all 3 mongod with key file.

  5. create user

  6. invoke validation

{ unauthorizedStatus: {“operationTime”:{"$timestamp":{“t”:1580188807,“i”:1}},“ok”:0,“errmsg”:“there are no users authenticated”,“code”:13,"$clusterTime":{“clusterTime”:{"$timestamp":{“t”:1580188807,“i”:1}},“signature”:{“hash”:{"$binary":“G5kpEIwPmnfbmqu/waSpZBIbsMk=”,"$type":“00”},“keyId”:{"$numberLong":“6786856176668639234”}}}}, memberStatuses: [“PRIMARY”,“SECONDARY”,“SECONDARY”] }

the “./validate-hw-1.2.sh” doesnt’t authenticate before invoking the rs.status(). I would expect the output to be correct. I must be missing something.

Thanks
-Dave

You upgraded MongoDB to a version that doesn’t come with the provisioned environment. See here. Suggest you re-provision the machine back to its defaults and redo the lab.

Fyi, it’s against forum guidelines to post possible answers to labs so I’d suggest that you edit your post and remove all the steps you posted.

Welcome!