There is no official solution for the time being. You can see this mongodb issue SERVER-1889.
However, you can try a solution mentioned in this issue, which is to set hosts for replica-set and force the other server addresses of replica-set to be resolved to a different network card IP. This requires that all replica-sets be set with domain names (FQDN) instead of specific IPs, and domain names must also be used when accessing mongodb.
There is no official solution for the time being. You can see this mongodb issue SERVER-1889.
However, you can try a solution mentioned in this issue, which is to set hosts for replica-set and force the other server addresses of replica-set to be resolved to a different network card IP. This requires that all replica-sets be set with domain names (FQDN) instead of specific IPs, and domain names must also be used when accessing mongodb.