com.mongodb.MongoException: host and port should be specified in host:port format

JIRA | Ibrahim Ahmed | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    MongoClient Instantiation using IPV6 address throws "MongoException: host and port should be specified in host:port format"

    Stack Overflow | 9 months ago | abe
    com.mongodb.MongoException: host and port should be specified in host:port format

    Root Cause Analysis

    1. com.mongodb.MongoException

      host and port should be specified in host:port format

      at com.mongodb.ServerAddress.<init>()
    2. MongoDB Java Driver
      MongoClient.<init>
      1. com.mongodb.ServerAddress.<init>(ServerAddress.java:122)
      2. com.mongodb.connection.ClusterSettings$Builder.hosts(ClusterSettings.java:102)
      3. com.mongodb.Mongo.createCluster(Mongo.java:670)
      4. com.mongodb.Mongo.<init>(Mongo.java:281)
      5. com.mongodb.Mongo.<init>(Mongo.java:277)
      6. com.mongodb.MongoClient.<init>(MongoClient.java:174)
      7. com.mongodb.MongoClient.<init>(MongoClient.java:151)
      8. com.mongodb.MongoClient.<init>(MongoClient.java:121)
      8 frames