[SERVER-53522] Sharding: Could not find host matching read preference { mode: "primary" } for set clockwork Created: 24/Dec/20  Updated: 21/May/21  Resolved: 21/May/21

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

Type: Bug Priority: Major - P3
Reporter: monika yadav Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

ongo shard, balancer not running, getting below error:
Could not find host matching read preference { mode: "primary" } for set clockwork
Notes
1. When mongo cluster was running with authentication and authorization, I was getting error for second shard.
2. Then I disabled authentication and authorization and restarted entire cluster, I started getting error for first cluster named clockwork.
3. Shard state is retruned true.

I am getting nowhere from last 3 days, kindly help here.



 Comments   
Comment by Eric Sedor [ 21/May/21 ]

Hi monika.1234yadav@gmail.com,

I am closing this ticket, but if you are able to provide the information I requested here we would be happy to reopen.

Sincerely,
Eric

Comment by Eric Sedor [ 15/Mar/21 ]

Hi,

We still need additional information to diagnose the problem. If this is still an issue for you, can you please provide the logs, diagnostic data, and timestamps we've requested?

Thanks,
Eric

Comment by Eric Sedor [ 04/Jan/21 ]

Hi monika.1234yadav@gmail.com,

Sorry for the delay and thanks for your patience! Are you still experiencing this issue?

If so, we'd like to collect more information to help determine if we suspect a bug is involved. I've created a support uploader support uploader portal for you. Files uploaded to this portal are visible only to MongoDB employees and are routinely deleted after some time.

For the mongos, and any shard prompting the error you see, can you please upload an archive (tar or zip) the mongod.log files and the $dbpath/diagnostic.data directory (the contents are described here)?

Since some time has passed it will also help if you can provide some recent timestamps of errors.

Gratefully,
Eric

Comment by monika yadav [ 24/Dec/20 ]

On Mongos I am getting below error:

2020-12-24T13:14:48.312+0000 I CONTROL  [LogicalSessionCacheReap] Sessions collection is not set up; waiting until next sessions reap interval: No chunks were found for the collection

2020-12-24T13:08:50.306+0000 I NETWORK  [ReplicaSetMonitor-TaskExecutor] Successfully connected to <cluster-shard1-primary-node> (1 connections now open to 10.5.11.131:27017 with a 5 second timeout)

2020-12-24T13:08:50.307+0000 W NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set <cluster-shard-1>

Generated at Thu Feb 08 05:31:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.