MongoDB shared cluster connection to Stitch

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 (, I get the error:

No address associated with hostname

As an alternative, I tried providing the address of the primary instance (, 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 (‘’, 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?


Hi Pavel,

Thanks for getting back.

Stitch is a data warehouse platform (

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: cannot resolve Unknown host


Non-authoritative answer:
*** Can't find No answer

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

Thanks once again.

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 unfortunately.