MongoDB shared cluster connection to Stitch

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?

Hi @Prerak_Sola ,

What is stitch exactly? Does it support latest MongoDB driver?

It looks like you used an srv string type from atlas , can you try using the regular mongodb://... type?

Ty
Pavel

Hi Pavel,

Thanks for getting back.

Stitch is a data warehouse platform (https://www.stitchdata.com/).

From what I can find, they use PyMongo 3.12.3 (MongoDB Integration Changelog | Stitch Documentation)

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.

ping meta-creator-data.4yz03lr.mongodb.net      
ping: cannot resolve meta-creator-data.4yz03lr.mongodb.net: Unknown host

nslookup meta-creator-data.4yz03lr.mongodb.net
Server:		1.1.1.1
Address:	1.1.1.1#53

Non-authoritative answer:
*** Can't find meta-creator-data.4yz03lr.mongodb.net: No answer

So, is there a way to get a common resolvable hostname/IP for the 3 instances?

Thanks once again.
Prerak

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.

You should be able to take the hoatnames and use them from the monitoring page.

When you click your primary you should see that name.

Have you whitelisted access for this service, I suspect you have to add 0.0.0.0/0 unfortunately.

Thanks
Pavel