Error: queryTxt ESERVFAIL

i keep getting this error:
Error: queryTxt ESERVFAIL cluster0.3jphw9e.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17) {
errno: undefined,
code: ‘ESERVFAIL’,
syscall: ‘queryTxt’,
hostname: ‘cluster0.3jphw9e.mongodb.net
}
the same code was working this morning and i did not perform any changes.
please help i tried everything i found on the web .

Looks good for me at this time:

# dig +short any  cluster0.3jphw9e.mongodb.net
"authSource=admin&replicaSet=atlas-neawe5-shard-0"
0 0 27017 ac-swgseua-shard-00-00.3jphw9e.mongodb.net.
0 0 27017 ac-swgseua-shard-00-01.3jphw9e.mongodb.net.
0 0 27017 ac-swgseua-shard-00-02.3jphw9e.mongodb.net.

Try a different set of dns servers perhaps.

i dont quiet understand you idea,i am using a m1 mac , i dont know how to change or try different set of dns servers
thanks

The error is DNS related. Changing the DNS servers you are using may allow the application to connect.

I’m not familiar with changing dns servers on a mac either, but a quick google should show you.

2 Likes

i changed my dns servers on my mac (i used google dns 8.8.8.8 8.8.4.4) and also tried opendns but it didn’t work.
when i tested the command you mentioned earlier it says :;; connection timed out; no servers could be reached