Configuring First Shard in Mongos

vagrant@m103:~$ validate_lab_shard_collection

Mongos not configured correctly - make sure you have added the replica set m103-repl as
your first shard.

Seems to be configuration issues
Please check your setup again
Check rs.status() and sh.status()
You should see both replicasets in sh.status() output
Make sure 3 mongods are running
3 config servers are up
and mongos is up
And necessary user creation and authentication

@Simon_39939

Hey guys!

Mongos does not want to start for me. Do i need a log file for mongoS? Here’s the command i’m running:

vagrant@m103:/var/mongodb$ mongo --port 26000 --username m103-admin --password m103-pass --authenticationDatabase admin

MongoDB shell version v3.6.12

connecting to: mongodb://127.0.0.1:26000/?authSource=admin&gssapiServiceName=mongodb

2019-07-02T22:48:24.299+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:26000, in(checking socket for error after poll), reason: Connection refused

2019-07-02T22:48:24.300+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:26000, connection attempt failed :

connect@src/mongo/shell/mongo.js:263:13

@(connect):1:6

exception: connect failed 


The process is not running: 

vagrant@m103:/var/mongodb$ ps -ef | grep -i mongo
vagrant  23336     1  0 15:12 ?        00:03:20 mongod -f mongod-repl-2.conf
vagrant  23760     1  0 15:27 ?        00:03:16 mongod -f mongod-repl-3.conf
vagrant  24180     1  0 16:03 ?        00:03:08 mongod -f mongod-repl-1.conf
vagrant  28450     1  0 22:25 ?        00:00:08 mongod -f csrs_1.conf
vagrant  28486     1  0 22:26 ?        00:00:08 mongod -f csrs_2.conf
vagrant  28521     1  0 22:26 ?        00:00:07 mongod -f csrs_3.conf
vagrant  28816 21217  0 22:43 pts/0    00:00:00 grep --color=auto -i mongo


vagrant@m103:/var/mongodb$ mongos -f mongos.conf

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

forked process: 29001

ERROR: child process failed, exited with error number 1

To see additional information in this output, start without the "--fork" option.

vagrant@m103:/var/mongodb$

PLEASE HELP!!! lol

Did you try to run mongos without --fork as suggested?
It will throw errors on your screen
From there you can debug

that helped and worked thanks!