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

XMLWordPrintableJSON

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

      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
            Reporter:
            Yuri Finkelstein
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: