Mongodb authentication failed., code 18
The "authentication failed" error message is often the result of one of five conditions. Show
We recommend that you double-check the username and password, make sure the MongoDB user exists, verify the correct authentication database and make sure the authentication mechanism is supported by your MongoDB database. For further troubleshooting:
Problem: When attempting to rehome to a new MongoDB, it fails to authenticate. Sniffer capture shows it is not using the Relevant log excerpt:
… where I have connected to the same Mongo cluster with the same creds - though using the I did try changing some of the Spring Boot config relevant to this (e.g.: Is there something I’m missing here, or is the code hardwired to assume that the user lives in Hygieia’s DB, instead of SymptomWe installed the Workflow-Accelerator, but we get the following error message after we started the server: java, mechanismProperties={}}}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed" }}}] com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='signavio', source='admin', password=, mechanismProperties={}}}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed" }}}]]]> ResolutionThe system cannot connect to your MongoDB. Please check the following solutions:
INLINECustomer Support redred#ffe6e6INTERNAL TROUBLESHOOTING German translation: KeywordsKBA , BPI-SIG-PG-ONP , SAP Signavio Process Governance OnPremise , How To ProductSAP Signavio Process Governance all versions ; Workflow Accelerator by Signavio all versions How do I enable authentication in MongoDB?How to Enable Authentication in MongoDB. Create an administrator in the admin database with a userAdminAnyDatabase role. ... . Disconnect from the mongo shell ( Ctrl+D ).. Locate the following code in the mongod configuration file ( /etc/mongod. ... . Change authorization disabled to enabled and save the file.. What does authentication failed mean?If you receive this error message, that means that the username and/or password that you have entered is incorrect. The error message states “Authentication failed! Try again.” You may have locked your account after too many attempts and your account will need to be reset.
Why MongoDB compass is not connecting?This error often occurs when: You provide no hostname or an invalid hostname to the Compass connect dialog. The destination server rejects a connection on an incorrect port. Your MongoDB cluster or server has been shutdown or the server hostname has changed.
What is the default username and password for MongoDB?By default mongodb has no enabled access control, so there is no default user or password. To enable access control, use either the command line option --auth or security.
|