Restarting nodes after configuration

In the lab “Deploy a Shareded Cluster,” I’m attempting to add the shard1 cluster. Since the instructions state that only the mongos configuration file needs editing, I’m assuming the config files already have this line added:

sharding:
  clusterRole: shardsvr

So, I log into the replica set via mongo admin --port 27001 -u "m103-admin" -p "m103-pass" --authenticationDatabase "admin" switch to the admin db, and shut down the server via db.shutdownServer()

But, I can’t figure out how to restart the nodes. I’ve tried mongod -f node2.conf and mongod -f shard1/node2.conf but I keep getting a “No such file or directory” message. How do I restart these nodes successfully?

Terminating the mongod was not part of the requirements.

You have to reset the workspace.

As a side comment you could run

ps -ef | grep mongod > file && cat file

And check the output.

Hi @Eric_Kenney,

You shouldn’t be terminating the running nodes that has not been started by you as some of these are started in the backend when you load the IDE.

For this particular lab, the nodes has been started using command line options and not the configuration file.

~ Shubham