Home Work 1.3 - Result Set

Hello

After validating the result on Homework 1.3, I am not sure what to paste on the Answer space provided. Are we going to copy the whole JSON document or a part? My first attempt I did copy the whole JSON but it was marked as wrong. Please help.

Thank you in advance

IG

Hi innoxa_2005,

It looks like you haven’t successfully enabled authorization. It’s likely you’re missing an option on your mongod-s.

You can verify authorization by running rs.status() in the shell before authenticating - if you’ve enabled authentication then this will return an error - not the replica set status.

Hope this helps

David

Hi David
I am not sure what I am missing. I have put all the options to do with Authentication but at some stages mongo shell fails to detect my replica sets but mongod will be running. See the messages below maybe you can figure out what I am missing

2018-10-21T16:23:07.657+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:08.160+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:08.663+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:09.167+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:09.624+0000 W NETWORK [ReplicaSetMonitorWatcher] No primary detected for set MyRepl
2018-10-21T16:23:09.670+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:10.172+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:10.676+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:11.178+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:11.679+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:12.180+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:12.685+0000 W NETWORK [thread1] No primary detected for set MyRepl
2018-10-21T16:23:13.189+0000 W NETWORK [thread1] No primary detected for set MyRepl
^Cvagrant@database:~$ mongo --host MyRepl/database.m310.mongodb.university --port 31130
MongoDB shell version: 3.2.21
connecting to: MyRepl/database.m310.mongodb.university:31130/test
2018-10-21T16:23:44.786+0000 I NETWORK [thread1] Starting new replica set monitor for MyRepl/database.m310.mongodb.university:31130

Your help will be appreciated

Hi innoxa_2005,

Based on your submitted answer and your other post. It seemed you were just missing an option for the mongod(s).

I would review the enabling X.509 lecture. Notice Kirby makes a change to the mongod options.

You can always just delete the data directories and start over if you think you’ve gotten your cluster into a unfamiliar state.

David

Thanks David.

I have done that but I would want to try again. Please give me your mail so that I can send you my settings. You may see the mustake and direct me. I love this topic because it has challenged me. Now I have 1.5 parked because 1.3 need to be done right. That switch I am missing.

I did delete several times the data directories. I can send you the options I have tried.

The moment I have my cluster running it allows me to run rs.status () which is wrong because i should now create a user with the client.pem subject.

I will appreciate very much.

Anybody who can help guys who got it right?

Hi innoxa_2005,

I think if you review the lecture you should see what Kirby changed - that’s a big hint.

I believe (this forum is new - so this is a test!) you can send me a email by replying to the post - not the topic.

Anyway, from what I’ve seen - I know the issue - and really can’t give a bigger hint - sorry - I know it’s frustrating.

David

Great! I will revisit again now. Lets hope I don’t miss anything. I like the challenge in any case. I am revising the video by Kirby again. I will get it.

Thanks David

Innocent

Hi David

I am still curious. Let me know if we can still discuss this Homework 1.3 and 1.5 as it is a very critical area to know. Let me know if I can discuss this with you offline so that you see where I missed the point.

Hi Innoxa_2005,

There is a link to the detailed answer on the assignments pages. To enable authentication you need to supply the --auth or --clusterAuthMode x509 options.

David