Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74736

Starting a mongos with --configdb pointing at another mongos hangs indefinitely

    • Sharding NYC

      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
      
      

            Assignee:
            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            Reporter:
            joanna.cheng@mongodb.com Joanna Cheng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: