Could not start mongos

vagrant@m103:~$ mongos --config mongos-config.conf
2019-10-04T16:34:54.680+0000 W SHARDING [main] Running a sharded cluster with fewer than 3 config servers should only be done for testing purposes and is not recommended for production.
about to fork child process, waiting until server is ready for connections.
forked process: 5915
ERROR: child process failed, exited with error number 48
To see additional information in this output, start without the "--fork" option.

ERROR: child process failed, exited with error number 48

Nice error message you’ve got there @jnvdasa :wink:

I am trying to complete lab for configuring a sharded cluster. I have started the configuration servers and then trying to run the mongos process. It exits with error number 48.

Run the ps code we talked about on your last query.

Tried it already. mongos process is not running.

vagrant@m103:~$ ps -ef | grep mongod
vagrant   3711     1  2 14:31 ?        00:04:57 mongod --config shard-config-2.conf
vagrant   4041     1  2 14:47 ?        00:04:35 mongod --config shard-config-1.conf
vagrant   4187     1  2 14:52 ?        00:04:03 mongod --config mongod-repl-2.conf
vagrant   4298     1  2 14:54 ?        00:04:05 mongod --config mongod-repl-3.conf
vagrant   4665     1  2 15:01 ?        00:03:49 mongod --config mongod-repl-1.conf
vagrant   5780     1  3 16:31 ?        00:01:34 mongod --config shard-config-3.conf
vagrant   6309  3687  0 17:20 pts/2    00:00:00 grep --color=auto mongod

mongo instead of mongod.

Thanks… the process was already running and hence the error. I did not notice the mongod in the grep command and assuming that mongos is not started.

Yep, I figured that it was probably already running that was why I mentioned checking the processes. :+1:

1 Like