Lab: Deploy a Sharded Cluster, cannot start mongos after failed attempt

Hello! I’m experiencing some issues trying to complete the “Deploy a Sharded Cluster” lab. I’ve already tried searching for a similar case in these forums but nothing I found seemed to help. Here’s my situation:

I started the lab and I edited the incomplete mongos.conf file. I then started the mongos instance by running mongos -f mongos.conf, it worked and it looked cool. I entered the instance and I tried adding the shards, I hit the “Run Tests” button but it failed on the second step (the mongos running step was successfull).

I then had to leave or something and I closed the browser I was working on. When I came back the running mongos instance wasn’t there. I decided to restart the workspace, but that’s where the problems began. Since I ran the test for the first time and failed, I cannot start the mongos instance again.

When I run mongos -f mongos.conf it got stuck on:

about to fork child process, waiting until server is ready for connections.
forked process: 829

but it never gave me an error message. After restarting my computer and workspace once again, I got this message:

about to fork child process, waiting until server is ready for connections.
forked process: 829
ERROR: child process failed, exited with error number 48
To see additional information in this output, start without the "--fork" option.

Looking around the forums I found out that apparently this error means the instance is already running? But I still could not connect to it. So, I tried to do as the message said and I set the processManagement to false on the mongos.conf file to get more info, but when I ran mongos -f mongos.conf again, there was no new message or anything, it just skipped to a new line on the console, nothing at all.

So, I’m stuck. I don’t know if it is a problem with the environment or something, but I have literally completed everything else on the M103 course except for this lab.

Here’s my mongos.conf file. I don’t’ know if it is still the same one I used originally because I’ve changed it so many times thinking it was something wrong with the config file. Also, I can connect successfully to the other instances on ports 27004/5/6

  configDB: csrs/localhost:27004,localhost:27005,localhost:27006
  keyFile: /var/mongodb/pki/m103-keyfile
  bindIp: localhost,
  port: 26000
  destination: file
  path: /var/mongodb/db/mongos.log
  logAppend: true
  fork: true

I would appreciate any help. Thank you guys in advance!

Hi @Alfredo_Medina_Palacios,

Welcome to the MongoDB Community forums :sparkles:

You are facing this error because the mongos instance is already running. I will suggest you click on the Reset Workspace button and then refresh the page and then again Launch the IDE, and try to execute the command. It will work as expected.

In case of any doubts please feel free to reach out.


1 Like

Hey @Kushagra_Kesav , thanks your of the reply!

Unfortunately, I have tried just that several times already (today just before this comment once again), but still no luck. I reset the workspace, the browser’s page, launched the IDE, and I still get the exact same error. I’ve already tried resetting my computer, and opening the exercise in a incognito window. Any other ideas?

Is not a valid IP address for the IDE. Verify the labs requirements.


@steevej Thank you so much! I don’t know how I missed it, but removing that ip form the bindIp parameter did the trick. I feel so dumb for not noticing it before. Thank you again!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.