[SERVER-33140] mongodb+srv URI support broken on shell v3.6.2 for Windows Created: 06/Feb/18  Updated: 29/Oct/23  Resolved: 09/Feb/18

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 3.6.0, 3.6.1, 3.6.2
Fix Version/s: 3.6.3, 3.7.2

Type: Bug Priority: Critical - P2
Reporter: Luke Prochazka Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Backports
Related
is related to SERVER-32486 Windows builds of the shell should re... Closed
is related to TOOLS-1827 Implement Initial DNS Seedlist discov... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Steps To Reproduce:

This is confirmed with two tests against Atlas:

mongo "mongodb+srv://cluster0-*****.mongodb.net/test" --username ******

resulting in the consistent error:

DNSHostNotFound: Failed to look up service "":DNS name does not exist.

Sprint: Platforms 2018-02-12
Participants:
Case:

 Description   

It appears the new SRV style connection URI feature is faulty in the Windows build of the mongo shell v3.6.1 and v3.6.2.



 Comments   
Comment by Githook User [ 09/Feb/18 ]

Author:

{'email': 'adam.martin@10gen.com', 'name': 'ADAM David Alan Martin', 'username': 'adamlsd'}

Message: SERVER-33140 DNS must disregard irrelevant records

DNS Queries can return superfluous records of non-requested type in
Windows DNSApi calls. Windows implementations will now ignore
records of those types.

(cherry picked from commit bf33c24ff0cf4018dfa94e3a349421ace28d1fac)
Branch: v3.6
https://github.com/mongodb/mongo/commit/9820063b4a88f685704385c13f4ee34aed31c1cd

Comment by Githook User [ 09/Feb/18 ]

Author:

{'email': 'adam.martin@10gen.com', 'name': 'ADAM David Alan Martin', 'username': 'adamlsd'}

Message: SERVER-33140 DNS must disregard irrelevant records

DNS Queries can return superfluous records of non-requested type in
Windows DNSApi calls. Windows implementations will now ignore
records of those types.
Branch: master
https://github.com/mongodb/mongo/commit/bf33c24ff0cf4018dfa94e3a349421ace28d1fac

Comment by ADAM Martin (Inactive) [ 06/Feb/18 ]

It appears that AWS's DNS servers and other DNS providers' servers are returning spurious non-SRV records intermingled with SRV records. Our testing DNS servers do not exhibit this behavior, thus we did not see this earlier.

Comment by Luke Prochazka [ 06/Feb/18 ]

A comparative test using the Linux version of the mongo shell connects successfully. Indicating this is unrelated to M0 instances.

Comment by Luke Prochazka [ 06/Feb/18 ]

Additional info:

>mongo --version
MongoDB shell version v3.6.2
git version: 489d177dbd0f0420a8ca04d39fd78d0a2c539420
OpenSSL version: OpenSSL 1.0.1u-fips  22 Sep 2016
allocator: tcmalloc
modules: none
build environment:
    distmod: 2008plus-ssl
    distarch: x86_64
    target_arch: x86_64

Atlas deployment is M0 running mongod v3.4.10

Generated at Thu Feb 08 04:32:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.