[SERVER-74736] Starting a mongos with --configdb pointing at another mongos hangs indefinitely Created: 10/Mar/23  Updated: 12/May/23  Resolved: 11/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Joanna Cheng Assignee: [DO NOT USE] Backlog - Sharding NYC
Resolution: Won't Fix Votes: 0
Labels: sharding-nyc-subteam2, skunkelodeon-odcs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding NYC
Participants:

 Description   

On 5.0.9 this at least gives an indication of what might be wrong

{"t":{"$date":"2023-03-09T17:47:36.318+11:00"},"s":"W",  "c":"SHARDING", "id":23834,   "ctx":"mongosMain","msg":"Error initializing sharding state, sleeping for 2 seconds and retrying","attr":{"error":{"code":72,"codeName":"InvalidOptions","errmsg":"Error loading clusterID :: caused by :: Surprised to discover that localhost:30100 does not believe it is a config server"}}}

On 7.0 it doesn't (there is no "initialising sharding state line" though)

{"t":{"$date":"2023-03-09T17:51:39.582+11:00"},"s":"I",  "c":"SHARDING", "id":22727,   "ctx":"ShardRegistryUpdater","msg":"Error running periodic reload of shard registry","attr":{"error":"FailedToSatisfyReadPreference: could not ge
t updated shard list from config server :: caused by :: Could not find host matching read preference { mode: \"nearest\" } for set configRepl","shardRegistryReloadIntervalSeconds":30}}
{"t":{"$date":"2023-03-09T17:51:39.583+11:00"},"s":"W",  "c":"SHARDING", "id":23834,   "ctx":"mongosMain","msg":"Error loading global settings from config server. Sleeping for 2 seconds and retrying","attr":{"error":{"code":133,"cod
eName":"FailedToSatisfyReadPreference","errmsg":"Error loading clusterID :: caused by :: Could not find host matching read preference { mode: \"nearest\" } for set configRepl"}}}

Either way, I think this should eventually time out or error or something along those lines, rather than hang forever

mongos --logpath ./bad-mongos-2.log --port 30210 --configdb configRepl/localhost:30100 --fork
{"t":{"$date":"2023-03-10T00:33:22.855Z"},"s":"W",  "c":"SHARDING", "id":24132,   "ctx":"-","msg":"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: 12587


Generated at Thu Feb 08 06:28:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.