Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3103

Do not monitor the arbiters

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Cluster Management
    • None
    • Fully Compatible

      In cluster mode, the driver monitors all hosts - actives, passives and arbiters.

      In fact it is not necessary to monitor the arbiters since the driver never connects to them.

       

      In our infra, the arbiters are firewalled and so we always get these messages:

      Exception in monitor thread while connecting to server arbiterhost:27025com.mongodb.MongoSocketOpenException: Exception opening socket
             at com.mongodb.connection.SocketStream.open(SocketStream.java:62)
             at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:126)
             at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:114)
             at java.lang.Thread.run(Thread.java:748)
      Caused by: java.net.SocketTimeoutException: connect timed out
             at java.net.PlainSocketImpl.socketConnect(Native Method)
             at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
             at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
             at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
             at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
             at java.net.Socket.connect(Socket.java:589)
             at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:59)
             at com.mongodb.connection.SocketStream.open(SocketStream.java:57)
       

       

      The solution I think is to remove addNewHosts(description.getArbiters()) from MultiServerCluster.ensureServers()

       

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            rustyx Rustam Abdullaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: