0

Quickly I giving the details, I have 4 Linux VMs with MongoDB installation. 1. Mongodb is for config so in Mongod.conf file enabled replication with shading like below

replication: replSetName: "config"

sharding: clusterRole: configsvr

and also initiated replication and it's a primary similar did for 2 vm for 2 nodes of shading then

1 separate VM there so I stopped the Mongod and try to start the Mongos but getting an error so please find the long error message and it not stop i pressed control+c and stopped

and added 27017 MongoDB default port in all nodes firewall** ```

Please find the below error:

```**mangos --configdb config/IP_address:27017**```



2023-11-05T11:15:24.562+0530 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.
2023-11-05T11:15:24.595+0530 I  CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2023-11-05T11:15:24.598+0530 I  CONTROL  [main]
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] ** WARNING: Access control is not enabled for the database.
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] **          Read and write access to data and configuration is unrestricted.
2023-11-05T11:15:24.598+0530 I  CONTROL  [main]
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] ** WARNING: This server is bound to localhost.
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] **          Remote systems will be unable to connect to this server.
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] **          Start the server with --bind_ip <address> to specify which IP
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] **          addresses it should serve responses from, or with --bind_ip_all to
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] **          bind to all interfaces. If this behavior is desired, start the
2023-11-05T11:15:24.598+0530 I  CONTROL  [main] **          server with --bind_ip 127.0.0.1 to disable this warning.
2023-11-05T11:15:24.598+0530 I  CONTROL  [main]
2023-11-05T11:15:24.615+0530 I  SHARDING [mongosMain] mongos version v4.2.24
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain] db version v4.2.24
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain] git version: 5e4ec1d24431fcdd28b579a024c5c801b8cde4e2
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain] allocator: tcmalloc
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain] modules: none
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain] build environment:
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain]     distmod: rhel70
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain]     distarch: x86_64
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain]     target_arch: x86_64
2023-11-05T11:15:24.615+0530 I  CONTROL  [mongosMain] options: { sharding: { configDB: "config/172.25.122.151:27017" } }
2023-11-05T11:15:24.618+0530 I  NETWORK  [mongosMain] Starting new replica set monitor for config/172.25.122.151:27017
2023-11-05T11:15:24.637+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 172.25.122.151:27017
2023-11-05T11:15:24.638+0530 I  SHARDING [thread1] creating distributed lock ping thread for process localhost.localdomain:27017:1699163124:-4073906567926768333 (sleeping for 30000ms)
2023-11-05T11:15:24.694+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Confirmed replica set for config is config/127.0.0.1:27017
2023-11-05T11:15:24.694+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:15:24.694+0530 I  SHARDING [Sharding-Fixed-0] Updating sharding state with confirmed set config/127.0.0.1:27017
2023-11-05T11:15:24.694+0530 I  SHARDING [Sharding-Fixed-0] Updating ShardRegistry connection string for shard config from: config/172.25.122.151:27017 to: config/127.0.0.1:27017
2023-11-05T11:15:25.118+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:25.118+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2023-11-05T11:15:25.618+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:25.618+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2023-11-05T11:15:26.118+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:15:26.118+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:26.118+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.
2023-11-05T11:15:26.618+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:26.618+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 4 checks in a row.
2023-11-05T11:15:27.118+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:27.118+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 5 checks in a row.
2023-11-05T11:15:27.618+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:15:27.619+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:27.619+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 6 checks in a row.
2023-11-05T11:15:28.118+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:28.118+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 7 checks in a row.
2023-11-05T11:15:28.618+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:28.618+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 8 checks in a row.
2023-11-05T11:15:28.694+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:15:29.118+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:29.118+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 9 checks in a row.
2023-11-05T11:15:29.618+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:29.618+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 10 checks in a row.
2023-11-05T11:15:30.118+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:15:30.118+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:30.118+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 11 checks in a row.
2023-11-05T11:15:30.618+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:31.118+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:15:31.618+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:15:31.618+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
^C2023-11-05T11:15:31.704+0530 I  CONTROL  [signalProcessingThread] got signal 2 (Interrupt), will terminate after current cmd ends
2023-11-05T11:15:31.704+0530 I  NETWORK  [signalProcessingThread] shutdown: going to close all sockets...
2023-11-05T11:15:31.705+0530 I  ASIO     [ReplicaSetMonitor-TaskExecutor] Killing all outstanding egress activity.
2023-11-05T11:15:31.705+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Dropping all pooled connections to 172.25.122.151:27017 due to ShutdownInProgress: Shutting down the connection pool
2023-11-05T11:15:31.706+0530 W  SHARDING [mongosMain] Error initializing sharding state, sleeping for 2 seconds and trying again :: caused by :: InterruptedAtShutdown: Error loading clusterID :: caused by :: interrupted at shutdown
2023-11-05T11:15:31.707+0530 I  SHARDING [shard-registry-reload] Periodic reload of shard registry failed  :: caused by :: InterruptedAtShutdown: could not get updated shard list from config server :: caused by :: interrupted at shutdown; will retry after 30s
2023-11-05T11:15:31.707+0530 W  SHARDING [replSetDistLockPinger] pinging failed for distributed lock pinger :: caused by :: InterruptedAtShutdown: interrupted at shutdown
2023-11-05T11:15:31.707+0530 I  ASIO     [ShardRegistry] Killing all outstanding egress activity.
2023-11-05T11:15:31.707+0530 I  ASIO     [TaskExecutorPool-0] Killing all outstanding egress activity.
2023-11-05T11:15:31.708+0530 W  SHARDING [signalProcessingThread] error encountered while cleaning up distributed ping entry for localhost.localdomain:27017:1699163124:-4073906567926768333 :: caused by :: ShutdownInProgress: Server is shutting down
2023-11-05T11:15:31.708+0530 W  SHARDING [shard-registry-reload] cant reload ShardRegistry  :: caused by :: CallbackCanceled: Callback canceled
2023-11-05T11:15:31.708+0530 I  ASIO     [shard-registry-reload] Killing all outstanding egress activity.
2023-11-05T11:15:31.708+0530 I  CONTROL  [signalProcessingThread] shutting down with code:0
[geopits@localhost ~]$ mongos --configdb config/172.25.122.151:27017
2023-11-05T11:26:40.645+0530 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.
2023-11-05T11:26:40.648+0530 I  CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2023-11-05T11:26:40.676+0530 I  CONTROL  [main]
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] ** WARNING: Access control is not enabled for the database.
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] **          Read and write access to data and configuration is unrestricted.
2023-11-05T11:26:40.676+0530 I  CONTROL  [main]
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] ** WARNING: This server is bound to localhost.
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] **          Remote systems will be unable to connect to this server.
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] **          Start the server with --bind_ip <address> to specify which IP
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] **          addresses it should serve responses from, or with --bind_ip_all to
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] **          bind to all interfaces. If this behavior is desired, start the
2023-11-05T11:26:40.676+0530 I  CONTROL  [main] **          server with --bind_ip 127.0.0.1 to disable this warning.
2023-11-05T11:26:40.676+0530 I  CONTROL  [main]
2023-11-05T11:26:40.688+0530 I  SHARDING [mongosMain] mongos version v4.2.24
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain] db version v4.2.24
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain] git version: 5e4ec1d24431fcdd28b579a024c5c801b8cde4e2
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain] allocator: tcmalloc
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain] modules: none
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain] build environment:
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain]     distmod: rhel70
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain]     distarch: x86_64
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain]     target_arch: x86_64
2023-11-05T11:26:40.688+0530 I  CONTROL  [mongosMain] options: { sharding: { configDB: "config/172.25.122.151:27017" } }
2023-11-05T11:26:40.690+0530 I  NETWORK  [mongosMain] Starting new replica set monitor for config/172.25.122.151:27017
2023-11-05T11:26:40.702+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 172.25.122.151:27017
2023-11-05T11:26:40.703+0530 I  SHARDING [thread1] creating distributed lock ping thread for process localhost.localdomain:27017:1699163800:3189634207339164914 (sleeping for 30000ms)
2023-11-05T11:26:40.773+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Confirmed replica set for config is config/127.0.0.1:27017
2023-11-05T11:26:40.773+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:26:40.774+0530 I  SHARDING [Sharding-Fixed-0] Updating sharding state with confirmed set config/127.0.0.1:27017
2023-11-05T11:26:40.774+0530 I  SHARDING [Sharding-Fixed-0] Updating ShardRegistry connection string for shard config from: config/172.25.122.151:27017 to: config/127.0.0.1:27017
2023-11-05T11:26:41.191+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:41.191+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2023-11-05T11:26:41.691+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:41.691+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2023-11-05T11:26:41.779+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:26:42.191+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:42.191+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.
2023-11-05T11:26:42.691+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:42.691+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 4 checks in a row.
2023-11-05T11:26:42.782+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:26:43.191+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:43.191+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 5 checks in a row.
2023-11-05T11:26:43.691+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:43.691+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 6 checks in a row.
2023-11-05T11:26:44.191+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:26:44.191+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:44.191+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 7 checks in a row.
2023-11-05T11:26:44.691+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:44.691+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 8 checks in a row.
2023-11-05T11:26:45.192+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:45.192+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 9 checks in a row.
2023-11-05T11:26:45.691+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:26:45.691+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:45.691+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 10 checks in a row.
2023-11-05T11:26:46.191+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:46.191+0530 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set config. Please check network connectivity and the status of the set. This has happened for 11 checks in a row.
2023-11-05T11:26:46.691+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
2023-11-05T11:26:46.783+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to 127.0.0.1:27017
2023-11-05T11:26:47.192+0530 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set config
^C2023-11-05T11:26:47.284+0530 I  CONTROL  [signalProcessingThread] got signal 2 (Interrupt), will terminate after current cmd ends
2023-11-05T11:26:47.284+0530 I  NETWORK  [signalProcessingThread] shutdown: going to close all sockets...
2023-11-05T11:26:47.285+0530 I  ASIO     [ReplicaSetMonitor-TaskExecutor] Killing all outstanding egress activity.
2023-11-05T11:26:47.285+0530 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Dropping all pooled connections to 172.25.122.151:27017 due to ShutdownInProgress: Shutting down the connection pool
2023-11-05T11:26:47.286+0530 I  SHARDING [shard-registry-reload] Periodic reload of shard registry failed  :: caused by :: InterruptedAtShutdown: could not get updated shard list from config server :: caused by :: interrupted at shutdown; will retry after 30s
2023-11-05T11:26:47.287+0530 W  SHARDING [mongosMain] Error initializing sharding state, sleeping for 2 seconds and trying again :: caused by :: InterruptedAtShutdown: Error loading clusterID :: caused by :: interrupted at shutdown
2023-11-05T11:26:47.287+0530 W  SHARDING [replSetDistLockPinger] pinging failed for distributed lock pinger :: caused by :: InterruptedAtShutdown: interrupted at shutdown
2023-11-05T11:26:47.287+0530 I  ASIO     [ShardRegistry] Killing all outstanding egress activity.
2023-11-05T11:26:47.287+0530 I  ASIO     [TaskExecutorPool-0] Killing all outstanding egress activity.
2023-11-05T11:26:47.288+0530 W  SHARDING [signalProcessingThread] error encountered while cleaning up distributed ping entry for localhost.localdomain:27017:1699163800:3189634207339164914 :: caused by :: ShutdownInProgress: Server is shutting down
2023-11-05T11:26:47.288+0530 W  SHARDING [shard-registry-reload] cant reload ShardRegistry  :: caused by :: CallbackCanceled: Callback canceled
2023-11-05T11:26:47.288+0530 I  ASIO     [shard-registry-reload] Killing all outstanding egress activity.
2023-11-05T11:26:47.288+0530 I  CONTROL  [signalProcessingThread] shutting down with code:0
2
  • Why do run an old version 4.2 which is End-of-Life? Nov 5, 2023 at 20:29
  • You write, you created a config file Mongod.conf (please show us the file) but you start the mongos without specifying any config file, i.e. it is not use. Did you follow Deploy a Sharded Cluster? Nov 5, 2023 at 20:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.