<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't connect to Atlas in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/can-t-connect-to-atlas/m-p/120140#M2078</link>
    <description>&lt;P&gt;hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/165752"&gt;@attie_bc&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I guess you are using All-pourpouse cluster, have you tried&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl https://www.google.com&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;Maybe your cluster doesn’t have internet access? If that’s the case, DNS resolution for your MongoDB Atlas SRV connection string will fail, which would explain the “server lookup failure” you’re seeing.&lt;BR /&gt;&lt;BR /&gt;If the curl fails too, then your cluster likely doesn’t have outbound internet access, which is required to resolve SRV records like *.mongodb.net.&lt;BR /&gt;&lt;BR /&gt;Also, two other things worth checking:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;MongoDB Atlas IP Access List&lt;/STRONG&gt;&lt;BR /&gt;Even if DNS resolves correctly, Atlas will block the connection unless your Databricks cluster’s IP is whitelisted in the Network Access section. &lt;A href="https://www.mongodb.com/docs/atlas/troubleshoot-private-endpoints/" target="_self"&gt;Docs&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;SRV Connection String Dependency on DNS&lt;/STRONG&gt;&lt;BR /&gt;The SRV connection string (mongodb+srv://...) depends on resolving DNS SRV records. In some restricted environments (like private VPCs), this won’t work without proper DNS forwarding.&amp;nbsp;&lt;A href="https://www.mongodb.com/docs/atlas/reference/faq/networking/#why-can%E2%80%99t-my-application-resolve-the-%60mongodb+srv%60-connection-string?" target="_self"&gt;Docs&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Isi&lt;/P&gt;</description>
    <pubDate>Sat, 24 May 2025 09:56:14 GMT</pubDate>
    <dc:creator>Isi</dc:creator>
    <dc:date>2025-05-24T09:56:14Z</dc:date>
    <item>
      <title>Can't connect to Atlas</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/can-t-connect-to-atlas/m-p/120118#M2076</link>
      <description>&lt;P&gt;I have this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;connectionString='mongodb+srv://user:pw@something.jghu.mongodb.net/?retryWrites=true&amp;amp;w=majority&amp;amp;appName=dbricks&amp;amp;tls=true'
database='dealflow'
collection='activities'

frame = spark.read.format("mongodb") \
    .option("spark.mongodb.read.connection.uri", connectionString) \
    .option("spark.mongodb.read.database", database) \
    .option("spark.mongodb.read.collection", collection) \
    .option("spark.mongodb.read.readPreference.name", "primaryPreferred") \
    .load()

display(frame)&lt;/LI-CODE&gt;&lt;P&gt;that times out.&lt;/P&gt;&lt;P&gt;When I telnet I get a "server lookup failure". This only happens on Databricks.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 23:06:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/can-t-connect-to-atlas/m-p/120118#M2076</guid>
      <dc:creator>attie_bc</dc:creator>
      <dc:date>2025-05-23T23:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can't connect to Atlas</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/can-t-connect-to-atlas/m-p/120140#M2078</link>
      <description>&lt;P&gt;hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/165752"&gt;@attie_bc&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I guess you are using All-pourpouse cluster, have you tried&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl https://www.google.com&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;Maybe your cluster doesn’t have internet access? If that’s the case, DNS resolution for your MongoDB Atlas SRV connection string will fail, which would explain the “server lookup failure” you’re seeing.&lt;BR /&gt;&lt;BR /&gt;If the curl fails too, then your cluster likely doesn’t have outbound internet access, which is required to resolve SRV records like *.mongodb.net.&lt;BR /&gt;&lt;BR /&gt;Also, two other things worth checking:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;MongoDB Atlas IP Access List&lt;/STRONG&gt;&lt;BR /&gt;Even if DNS resolves correctly, Atlas will block the connection unless your Databricks cluster’s IP is whitelisted in the Network Access section. &lt;A href="https://www.mongodb.com/docs/atlas/troubleshoot-private-endpoints/" target="_self"&gt;Docs&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;SRV Connection String Dependency on DNS&lt;/STRONG&gt;&lt;BR /&gt;The SRV connection string (mongodb+srv://...) depends on resolving DNS SRV records. In some restricted environments (like private VPCs), this won’t work without proper DNS forwarding.&amp;nbsp;&lt;A href="https://www.mongodb.com/docs/atlas/reference/faq/networking/#why-can%E2%80%99t-my-application-resolve-the-%60mongodb+srv%60-connection-string?" target="_self"&gt;Docs&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Isi&lt;/P&gt;</description>
      <pubDate>Sat, 24 May 2025 09:56:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/can-t-connect-to-atlas/m-p/120140#M2078</guid>
      <dc:creator>Isi</dc:creator>
      <dc:date>2025-05-24T09:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can't connect to Atlas</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/can-t-connect-to-atlas/m-p/120717#M2087</link>
      <description>&lt;P&gt;Thank you. The issue in the end was that Amazon VPC blocked the 27017 port. I had to add an outbound rule on a Security Group to allow access. That solved it.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 13:19:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/can-t-connect-to-atlas/m-p/120717#M2087</guid>
      <dc:creator>attie_bc</dc:creator>
      <dc:date>2025-06-02T13:19:36Z</dc:date>
    </item>
  </channel>
</rss>

