Homework 1.2 validation error

Hello, I already completed the assignment but when I run the validation script I get an error:

vagrant@database:~/shared$ ./validate-hw-1.2.sh
{ unauthorizedStatus: {“ok”:0,“errmsg”:“not authorized on admin to execute command { replSetGetStatus: 1.0 }”,“code”:13}, memberStatuses: [“PRIMARY”,“SECONDARY”,“SECONDARY”] }

I believe I did everything correctly, since I can authenticate to the admin database with the user that was specified.

vagrant@database:~/shared$ mongo --port 31120

MongoDB shell version: 3.2.22
connecting to:
MongoDB Enterprise TO_BE_SECURED:PRIMARY> use admin
switched to db admin
MongoDB Enterprise TO_BE_SECURED:PRIMARY> db.auth(‘admin’, ‘webscale’)

Also, I checked the validation script and the method that checks rs.status does the following:

“var status = rs.status();
delete status.codeName;
It never authenticates to the database (?)

Any help is appreciated,

I finally figured it out, I had the answer right in front of my face the whole time!

Hi, i am having the same issue. I can figure out what you mean with the remark you placed in update… Can you give me another clue? :slight_smile:

Yes sorry, hmmm found the answer .
Used to having some sort of output with a large verification number like the earlier courses so i think this is a strange way of telling ive done the homework correct…
Cost me about 2 hours or so… hope mongodb university will change this piece of homework for other course followers…

That question is actualy the solution.

Is not validate-hw-1.2.sh supposed to get “unauthenticated” error at first call and no error at second?

having exact same issue. Validation produces
{ unauthorizedStatus: {“operationTime”:{"$timestamp":{“t”:1571417757,“i”:1}},“ok”:0,“errmsg”:“there are no users authenticated”,“code”:13,"$clusterTime":{“clusterTime”:{"$timestamp":{“t”:1571417757,“i”:1}},“signature”:{“hash”:{"$binary":“T1IClfsILBWUI/jK4BzadNc1ZCY=”,"$type":“00”},“keyId”:{"$numberLong":“6749187187473907713”}}}}, memberStatuses: [“PRIMARY”,“SECONDARY”,“SECONDARY”] }
which is being rejected.
Should I just accept the failure? I know I did everything right, and rs.status looks stellar.

Slightly different error.

Suggest double checking your setup.

thanks, but I’ve been re-checking for hours. Plus, everything runs exactly as lab describes: replicas, keyfile, admin user…
In another thread, someone suggested installing mongo-enterprise of lower version (essentially re-provisioning and resetting the whole thing). But it’s too time-consuming and kinda stupid – current version is 4.2. Why go to something so much older that it’s not even relevant? sigh

The first part of the result of the validator executes rs.status() and the verbosity of this command in your version (guessing it’s 3.6, 4.0 or 4.2) is different from 3.2 that comes with the course. For example, clusterTime and operationTime fields are not outputs in the older version (3.2). I can see the difference because I have 4.0 on my local machine. So even if your setup is 100%, the string required to pass this lab will still be incorrectly formatted.

Some of the Curriculum Engineers have mentioned that all the courses are currently being updated to the newer version, so until then, we make do.

1 Like

thanks. So, I guess, I am going to accept the failure for this one.