"Could not find host matching read preference { mode: \"primary\" } for set"

Hi Team,

We are getting below error while adding shard to a cluster and suddenly primary config server going down.

numYields:0 ok:0 errMsg:“Could not find host matching read preference { mode: “primary” } for set replconfig02” errName:FailedToSatisfyReadPreference

It could be hostname to IP resolution issues
or
mongos process is not able to connect to primary
Any additional messages in mongos.log
Make sure all nodes are up and running
Can you connect to replicaset and individual nodes?
Does rs.status(),rs.conf() look fine
How was addShard run?With hostname or IP and the port you used

Is there any additional info in logs just before invariant failure
Like terminating instance…