Hello,
I have a free shared database running on Atlas.
I am trying to set up MongoDB integration on Stitch to see if I can get the MongoDB data in Stitch where my data from other sources live.
In the connection step on Stitch, if I provide the hostname from the connection string that I get from Atlas (xxx.4yz03lr.mongodb.net), I get the error:
No address associated with hostname
As an alternative, I tried providing the address of the primary instance (xxx-shard-00-00.4yz03lr.mongodb.net), and with that, I get the error:
Exit status is: Discovery failed with code 1 and error message: “connection closed, Timeout: 30s, Topology Description: <TopologyDescription id: 636b89204afdfaf2c89a85cc, topology_type: Single, servers: [<ServerDescription (‘ac-v5vp8h9-shard-00-02.4yz03lr.mongodb.net’, 27017) server_type: Unknown, rtt: None, error=AutoReconnect(‘connection closed’,)>]>”.
Is there something that I missing in order to make the connection?
Their connection page accepts only a hostname, and no protocol, so I cannot use mongodb:// or srv://.
However, keeping Stitch aside, when I try to resolve the hostname that I get from Atlas from my terminal, it is not able to resolve it. It resolves the individual ones for the 3 instances.
Never mind, I just managed to make it work by providing the hostname of one of the secondary instances.
Also, was passing the wrong authentication database in the config.