Windows DNS SRV records not working as expected.

289 views
Skip to first unread message

Matt Loretitsch

unread,
Dec 26, 2017, 4:32:29 PM12/26/17
to mongodb-user
Hello all!  I am working with 3.6.0 and now 3.6.1.  Having trouble using mongo.exe to connect to a replica set.  It says it's getting back incorrect record format for my SRV records.  I tried adding a TXT record etc. but mongo.exe always gives me the same error.  Hopefully someone notices my mistake.  server name changed to protect the innocent

PS C:\Program Files\MongoDB\Server\3.6\bin> .\mongo.exe "mongodb+srv://example.test.com/?ssl=false"
DNSProtocolError: Incorrect record format for "": expected SRV record, found something else
try 'C:\Program Files\MongoDB\Server\3.6\bin\mongo.exe --help' for more information



I can use the traditional format with all of the hosts and it connects fine.  DNS returns all the right records as shown in a wireshark trace.



;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;_mongodb._tcp.example.test.com. IN SRV
;; ANSWER SECTION:
_mongodb._tcp.example.test.com. 3600 IN SRV 0 5 27017 srv1.test.com
_mongodb._tcp.example.test.com. 3600 IN SRV 0 5 27017 srv2.test.com.
_mongodb._tcp.example.test.com. 3600 IN SRV 0 5 27017 srv3.test.com.

ADAM Martin

unread,
Dec 29, 2017, 4:42:28 PM12/29/17
to mongodb-user
Hi Matt.  I am looking into what might be going on here, but I need more information.  To help you diagnose this, I'd need the actual server name to see the actual DNS configuration and try to replicate this on our end.  If you're not comfortable revealing the server name publically, you can send me an email at: adam....@mongodb.com.  If you want to protect the server name more strongly, feel free to ask me for my PGP public key.
Reply all
Reply to author
Forward
0 new messages