[SERVER-68524] LDAP name resolution will ignore host in /etc/hosts Created: 02/Aug/22  Updated: 02/Sep/22  Resolved: 02/Sep/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sergey Galtsev (Inactive) Assignee: Sergey Galtsev (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

1. Add following line to /etc/hosts:

1.1.1.1  ldaptest2.10gen.cc

2. use ldaptest2.10gen.cc as an LDAP server by supplying --ldapServers=ldaptest.10gen.cc,ldaptest2.10gen.cc parameter

Receive:

"id":20575,
"ctx":"main",
"msg":"Error creating service context",
"attr":{"error":"DNSHostNotFound: Can't connect to the specified LDAP servers, error: LDAP Host: ldaptest2.10gen.cc was NOT successfully resolved."}

Sprint: Security 2022-08-22, Security 2022-09-05
Participants:

 Description   

LDAP resolver cache mechanism seems to ignore hosts in /etc/hosts



 Comments   
Comment by Sergey Galtsev (Inactive) [ 02/Sep/22 ]

Name resolution seems to work as intended. Tested using following code:

https://github.com/10gen/mongo-enterprise-modules/commit/f98d979c45be3288695210c2409ecc85c25cf607

Generated at Thu Feb 08 06:11:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.