Sh.status() produces no output

I got the dataset imported, then mongos got the error code 48, which I remember means that the process is already running. But sh.status() produces no output:

The command sh.status must be run in the mongo shell when connected to mongos.

If I remember, the lab instructions indicate that mongos is already started.

The lab instructions do not explicitly say that. What they say is

“Two shards have already been added to your cluster, shard1 and shard2. For more information, run sh.status() on mongos.”

Prior to that it says

" * use mongos as the target for mongoimport - you can find the configuration details for this process in mongos.conf
*authenticate to mongos as m103-admin (with password m103-pass)"

And since do not see a mongo shell, but only the command prompt, that tells me that I need to start it first.

The lab instructions also do not explicitly say that you have to start one.

Any way, it is time to do the mongoimport.

I did the mongoimport. The sh.status() is after that step. That is why there is a terminal 0 – I did the mongoimport there.

They do not have to. I can see that there is only a bash command prompt and no mongo shell.

Please connect to mongos and run the sh.status()
It should be run at mongo prompt not os prompt

or show us the latest screenshot how you ran it after mongoimport

the command mongo starts a mo go shell

That is what I was trying to do when I got the error code 48.

Thank you, I will try that now.

Hi @Jason_Hernandez,

Were you able to resolve your issue ?

~ Shubham

Not yet. My new thread, unable to authenticate using mechanism “SCRAM-SHA-1”: is my attempt to get back to the point where I was when I asked this one. I have to resolve that one before I can resolve this one.

Okay. Used mongo --localhost:26000 -u m103-admin -p m103-pass and then the sh.status() succeeded. Thank you.

HI @Jason_Hernandez,

I’m glad your issue got resolved. Please feel free to get back to us if you face any other issue.

~ Shubham