2

Unable to connect to mongo db Atlas sharded cluster or via SSH

This is a show stopper for us. It's fairly standard to have Mongo running as a cluster, and ssh is basic security. It seems like a lot of effort building a Mongo connector has been wasted due to a lack of support for best practices. 

 

Please add this!

6 comments

  • 1
    Avatar
    Fabio Henrique Santos

    I have the same issue, hours and hours and I can't connect with mongoDB Atlas.

    Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=tribeca-mongo-shard-00-00-c8cuo.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]
      Finish
  • 1
    Avatar
    Jonathan Dodson

    Did anyone make any progress on this?  Is it caused by the SCRAM auth?  And yes, using a SRV record for the cluster would be ideal.

  • 1
    Avatar
    Dan Selman

    Also a showstopper for me. This is the one feature I really needed from Klipfolio.

  • 1
    Avatar
    Jonathan Dodson

    I solved this problem by using MongoDB Stitch and creating a service and webhook to allow running queries and returning json.

    https://www.mongodb.com/cloud/stitch

    Note: You create users for the Stitch application that have access to specific collections etc and can authenticate with APIkey or other methods.

     

  • 0
    Avatar
    Adam Wamai Egesa

    Getting the same error:

    Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=<REDACTED_DOMAIN>.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: <REDACTED_DOMAIN>.mongodb.net}, caused by {java.net.UnknownHostException: <REDACTED_DOMAIN>.mongodb.net}}]

    As has been described above, MongoDB Atlas is merely following best practises and would I setup a MongoDB database on my own I'd definitely opt to use a very similar configuration. Not at all specific to MongoDB Atlas.

    As this is such a critical limitation I would not really consider MongoDB to be a fully implemented datasource.

    @JonathanDodson
    Nice work-around with MongoDB Stitch. It seems quite a bit more cumbersome than actually integrating directly with the database but nice to have a way to do it nonetheless.

  • 0
    Avatar
    Stas Manevich

    I get same error. Trying to connect to Mongodb free version 4.2
    If I configure connection without any encryption then everything works fine. 
    When I add TLS to Mongo then the klipfolio get following error:

    Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=klf.mst.io:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]

    The TLS certificates are officially generated from WildCard. Supplier is:

    CN = Sectigo RSA Domain Validation Secure Server CA

    Then I checked same configuration with other client (NoSQLBooster) and it connecting and reading collections without any problem. 
    Please try solve it ASAP or advice us any workaround for this critical issue.   

Please sign in to leave a comment.