Multiple text records not allowed

Getting this error when trying to connect to Atlas

Make sure you replace <password> with your real password.

The error Multiple text records not allowed seems to indicate erroneous DNS information. However, according to:

;QUESTION
cluster0.apq2bmf.mongodb.net. IN ANY
;ANSWER
cluster0.apq2bmf.mongodb.net. 60 IN TXT "authSource=admin&replicaSet=atlas-geo4a7-shard-0"
cluster0.apq2bmf.mongodb.net. 60 IN SRV 0 0 27017 ac-zx4ig6e-shard-00-00.apq2bmf.mongodb.net.
cluster0.apq2bmf.mongodb.net. 60 IN SRV 0 0 27017 ac-zx4ig6e-shard-00-01.apq2bmf.mongodb.net.
cluster0.apq2bmf.mongodb.net. 60 IN SRV 0 0 27017 ac-zx4ig6e-shard-00-02.apq2bmf.mongodb.net.

it looks fine.

@Ananthan_Rajasekharan have you been able to resolve the issue? If not, could you please let me know which version of Compass you are using and what you are connecting to (sharded cluster, M0, etc.)?

Feel free to message me directly if you do not feel comfortable commenting these details publicly.

Sorry for the late reply.

I was not able to resolve the issue. The version I used is 1.32.6-win32-x64 and also 1.32.6-beta.4-win32-x64. Both showed the same error.

I kind of feels like its my internet connections problem (not sure though), I will tell after testing

Try using Google DNS 8.8.8.8

Tried the Google DNS, same result.

I tried using MongoDB Shell to connect via one of the instances I have on digital ocean, and when I tried there it works. Its not working on my computer. I have no clue as to why.

Make sure you allow access from anywhere in network access.

facing same issue, using google DNS 8888 and 8844, and facing this issue on sharded cluster, M0

I am facing the same issue while connecting cluster from compass. I am using 1.42.1 version of compass and trying to connect M0.

Hello! I have same problem here… did you fix it already?

Hi all, thank you for raising this issue. Occasionally network issues in local development can lead to DNS issues in SRV connection string resolution. This is due to Node’s dns.resolveTxt() function returning a result that MongoDB can’t parse. One workaround is to use the standard connection string format in your local testing when you encounter this issue. Read more here about this format: https://www.mongodb.com/docs/manual/reference/connection-string/#standard-connection-string-format
However, please note that we recommend using the SRV, DNS-constructed seed list connection string format for the majority of connections.

Hi everyone,

I believe the root cause was DNS interference. Here’s what I tried and how I fixed it:

  1. Changed my network DNS to Google (8.8.8.8) – no effect initially, this step should be done.
  2. Confirmed my Atlas IP whitelist was set to 0.0.0.0/0.
  3. Removed the +srv prefix from my URI – still couldn’t connect and got some different the getaddrinfo ENOTFOUND error.
  4. Discovered I was running Portmaster, which was intercepting/blocking network calls and forcing DNS to Cloudflare (1.1.1.1).
  5. Disabled and uninstalled Portmaster.
  6. Cleared the DNS cache (ipconfig /flushdns on Windows, or the equivalent on your OS).
  7. Rebooted the machine.
  8. Verified my network DNS was still set to Google (8.8.8.8) and hadn’t been overridden.

After that, DNS lookups resolved the Atlas hosts correctly and the connection succeeded with the full original string with +srv. If you see similar errors, check for any VPNs, proxies, firewall tools or DNS‑resolvers that might be overriding your DNS settings.

While trying to connect, I am on MongoDB Compass v1.45.4.