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

MongoClient constructor throws exception if one of the seed endpoints in MongoURI is not resolved by DNS

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.11.3
    • Component/s: API
    • Labels:
      None
    • Environment:
      mongo-java-driver: 2.11.3

      If one of the seed endpoints in mongo URI is not DNS resolvable MongoClient throws exception, even though there are other valid endpoints in the URI (the client is trying to connect to a replica set).

      I believe it's a bug and the exception should not be thrown in this case.

       -- -- -- --caused by: phx7b01c-14c5-8.stratus.phx.ebay.com
        -- -- -- -- -- java.net.InetAddress.getAllByName0(InetAddress.java:1250)
        -- -- -- -- -- java.net.InetAddress.getAllByName(InetAddress.java:1162)
        -- -- -- -- -- java.net.InetAddress.getAllByName(InetAddress.java:1098)
        -- -- -- -- -- java.net.InetAddress.getByName(InetAddress.java:1048)
        -- -- -- -- -- com.mongodb.ServerAddress.updateInetAddress(ServerAddress.java:204)
        -- -- -- -- -- com.mongodb.ServerAddress.<init>(ServerAddress.java:73)
        -- -- -- -- -- com.mongodb.ServerAddress.<init>(ServerAddress.java:46)
        -- -- -- -- -- com.mongodb.Mongo.getMongoAuthorityFromURI(Mongo.java:628)
        -- -- -- -- -- com.mongodb.Mongo.<init>(Mongo.java:318)
        -- -- -- -- -- com.mongodb.MongoClient.<init>(MongoClient.java:269)
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            yfinkelstein Yuri Finkelstein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: