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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.11.3
    • API
    • None
    • mongo-java-driver: 2.11.3

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: