Question & Answer
Question
Authentication Error 18 when running Guardium grdapi load_mongodb
Cause
grdapi load_mongodb command is used to load data files into mongodb from Guardium for "mongodb as a sniffer repository" functionality.
When running the grdapi an error appears in the Guardium Job Queue report and jobqueue.log file (available in app_issues must gather)
Answer
Example:
Error while loading mongoDB file.
com.mongodb.MongoTimeoutException:Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=<ip>:xxxxx, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'auth failed' on server <ip>:xxxxx. The full response is { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18,"codeName" : "AuthenticationFailed" }}}] ERROR'
The authentication details provided in the grdapi are correct and can be verified from another mongodb client. Guardium v10.1.2 uses MONGODB-CR authentication method. Later versions of Mongodb use SCRAM-SHA-1 by default. The incorrect authentication method creates this error.
Remediation
There is no product fix for this.
Workaround - Change the mongodb settings to accept connections using MONGODB-CR method.
Was this topic helpful?
Document Information
Modified date:
21 June 2018
UID
swg22017465