-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.7.3
-
Component/s: Connection Management
com.mongodb.DB.authenticate(username, password) fails often when invoked from multiple threads. Mongod console logs "auth: bad nonce received or getnonce not called. could be a driver bug or a security attack" whenever authentication fails.
Expected result:
authenticate method should return consistent results.
Steps to reproduce:
import https://gist.github.com/2882362 to your workspace and run or download the attached sample project, import it to your favourite IDE and run.
Additional information:
http://forum.springsource.org/showthread.php?127153-CannotGetMongoDbConnectionException-in-a-multithreaded-environment