mongodb could not find host matching read preference { mode: \"primary\" } for set?
I faced the same issue then looked into Mongos log file and it was saying

can't authenticate to hostname as internal user, error: Authentication failed.

Please see here: internal user authentication and happens with SecKey file and auth- Enabled.
Resolution
I opened mongod.conf file and
security: authorization: enabled    
keyFile: /var/run/mongodb/secKey.key

was missing so I added that and restart the mongod. Then I created shard again from Mongos and it is working now.