Error Messages:
Database connect error:
com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-1, userName=‘root’, source=‘gateway’, password=, mechanismProperties=} Command failed with error 18 (AuthenticationFailed): ‘Authentication failed.’ on server 192.168.81.13:27017. The full response is {“ok”: 0.0, “errmsg”: “Authentication failed.”, “code”: 18, “codeName”: “AuthenticationFailed”}.
Solution:
Connect URL
mongodb://user:password@host:port/dbname
Add parameter authsource
For example:
mongodb://user:password@host:port/dbname?authSource=admin
In general, authsource is admin and can be replaced as needed
Read More:
- [Solved] C# Access Mongodb Database Error: command find failed: Command find requires authentication
- [Solved] MongoDB Error: FaileError: dToParse: Password must be URL Encoded for mongodb:// URL:
- [Solved] Springboot Connect MongoDB Error: UncategorizedMongoDbException: Command failed with error 13 (Unauthorized)
- DB::Exception: test: Authentication failed: [How to Solve]
- [Solved] error: password authentication failed for user “postgres”
- Robo3T Remote Connect MongoDB Error: Failed to refresh ‘Collections‘. Error: ListCollections failed
- [Solved] mongodb Backup Error: Failed: error getting collections for database `admin`: error running `listCollections`
- [Solved] SecureCRT error: keyboard-interactive authentication with the ssh2 server failed
- Git pull code error fatal: authentication failed fo
- SourceTree Git Error: remote: HTTP Basic: Access denied fatal: Authentication failed
- [Solved] mongodb Startup Error: ERROR: child process failed, exited with error number 14
- [Solved] MongoDB Update User Error: Error: not authorized on admin to execute command
- Mongodb Crash Error: Too many open files [How to Solve]
- [Solved] Linux Install Xilinx_SDK but Failed to Login Error: Authentication error: Xilinx
- How to Solve SpringBoot MongoDB MongoAutoConfiguration Startup Error
- Support for password authentication was removed on August 13, 2021
- mongodb Error: IMKClient Stall detected [How to Solve]
- [Solved] MongoDB Error: TypeError: Object of type ObjectId is not JSON serializable
- Vagrant up Error: Warning: Authentication failure. Retrying…[How to Solve]
- [Solved] Redis executes the monitor command error: noauth authentication required