Spring boot with mongoDB connection tried to connect with Arbiter node

I have standard Spring boot with spring data mongo connection with mongo DB with below connection URL
URL: mongodb://mongoUs:mongoPs@server1@mongo,server2@mongo:27027/mgbd?authSource=mgdb&replicaSet=rc&ssl=true

As observed sometime application tried to connect with arbiter node and due to this application startup will be failed.
Error: Caused by: java.net.SocketTimeoutException: Connect timed out
Need help how I can avoid the application to connect with Arbiter node