Thank you for the link. this is what I get when I try to connect to mongo shell from the instance where mongod is running.
MongoDB shell version: 3.0.4
connecting to: test
2022-12-01T15:55:08.719+0000 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2022-12-01T15:55:08.720+0000 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed.
Here is our set uo :
1. mongos server
/opt/mongo/bin/mongos --configdb m1.qa..com:27019,m2.qa..com:27019,m3.qa..com:27019
2. 3 mongod servers
/opt/mongo/bin/mongod --dbpath /mongodb/configdb --port 27019 --storageEngine wiredTiger
/opt/mongo/bin/mongod --dbpath /mongodb/sharddb --port 27018 --storageEngine wiredTiger