question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Authentication fails

See original GitHub issue

I’m trying to connect to a database on my localhost. I can connect just fine from the command line, but when I try with the WebStorm plugin it’s not working. I enter the credentials and information like so: screenshot - 06162015 - 08 55 20 pm When I press “Test Connection” it says it’s successful. But when I save the configuration and try to connect to the database my IDE hangs for 30 seconds and I get this error:

8:54:42 PM MongoTimeoutException: Error when collecting Mongo databases: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'auth failed' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18 }}}]

Not sure why auth failed, I definitely have the right credentials. Any help?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rhhamburgcommented, Jul 27, 2015

The problem is the new authentication mechanism from mongoDB 3. MongoDB use now SCRAM-SHA-1 and no longer MONGODB-CR.

After I changed the authentication mechanism back to MONGODB-CR in my mongoDB the plugin works perfect.


Changed in version 3.0.

MongoDB supports multiple authentication mechanisms. MongoDB’s default authentication method is a challenge and response mechanism (SCRAM-SHA-1). Previously, MongoDB used MongoDB Challenge and Response (MONGODB-CR) as the default.

http://docs.mongodb.org/manual/core/authentication

0reactions
folkenginecommented, Oct 12, 2015

The SNAPSHOT version fixed the issue for me. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication Fails - an overview | ScienceDirect Topics
If user authentication fails (for any reason) the user will be prompted for credentials. ... In all of these cases authentication will fail...
Read more >
I get a message that says “Authentication failed”
This kind of error happens when your instant messaging service is not allowing you to connect because it does not recognize your username...
Read more >
"Authentication failed" error when you try to log on to Unified ...
Fixes a problem in which you receive an "Authentication failed" error message when you use the UPN format to log on to a...
Read more >
Authentication Failed - The Error Explained
When attempting to send an email, your email program may report an "Authentication Failed" error message. Authentication is the act of providing a...
Read more >
AUTHENTICATION-FAILED( ) method
Indicates that the identity asserted in the unsealed client-principal object cannot be authenticated. This authentication failure signifies that the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found