MongoDB Replica Set Log Warnings

Hiya;

I have a new replica set configured and it’s seeming to synchronize from Primary to the Secondaries fine, however I’ve noticed these log entries:

2022-02-03T13:21:04.331-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:04.833-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:05.334-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:05.836-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:06.337-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:06.838-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:07.340-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:07.841-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:08.343-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:08.844-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:09.346-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:09.847-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:10.348-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:10.850-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:11.351-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:11.853-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:12.356-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:12.857-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:13.358-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:13.860-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:14.361-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:14.863-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:15.364-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:15.866-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:16.367-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:16.868-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:17.370-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:17.871-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:18.372-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:18.874-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:19.375-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:19.877-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:20.378-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:20.880-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:21.383-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:21.884-0700 W NETWORK  [LogicalSessionCacheRefresh] Unable to reach primary for set rs0
2022-02-03T13:21:22.386-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:22.887-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:23.389-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:23.890-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:24.391-0700 W NETWORK  [LogicalSessionCacheReap] Unable to reach primary for set rs0
2022-02-03T13:21:24.392-0700 I CONTROL  [LogicalSessionCacheReap] Sessions collection is not set up; waiting until next sessions reap interval: Could not find host matching read preference { mode: "primary" } for set rs0
2022-02-03T13:21:24.392-0700 I CONTROL  [LogicalSessionCacheRefresh] Sessions collection is not set up; waiting until next sessions refresh interval: Could not find host matching read preference { mode: "primary" } for set rs0

They show up every 5 minutes exactly.

None of the nodes have ufw active or running, so firewall rules are moot.

Are there any particular configuration variables I can check to see why this is happening?

Any advice appreciated.

Thanks!

I’d like to add that I have the correct net.bindIP variables set to only IP addresses, not hostnames, for all (currently) 3 nodes, and the rs.status() shows they are all connected and reachable.

This is fixed. I was using the Ubuntu-managed version of MongoDB and swapped over / upgraded to 4.0 to begin the upgrade path to 5.0, and the error messages are gone.

All good!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.