0

The Java MongoDB driver documentation says creating mongoclient will perform authentication, but it will never happened.

Here's my sample code:

new MongoClient(serverAddr, 
                Arrays.asList(credential), 
                new MongoClientOptions.Builder()
                                     .socketKeepAlive(true)
                                     .socketTimeout(30000)
                                     .build());
4
  • Do you assign this to a MongoDB variable ? Commented May 15, 2014 at 9:21
  • 1
    Which type of authentication are you using? Commented May 15, 2014 at 9:21
  • I am using CR mechanism Commented May 15, 2014 at 9:23
  • Ideally MongoClient instantiation should authenticate the credentials. For some reason, It is not happening. Commented May 15, 2014 at 9:55

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.