Я пытаюсь создать моно go разъем дебезия ниже, но получаю ошибку аутентификации. Подробности см. Ниже
POST http://localhost: 8083 / разъемы
Полезная нагрузка:
{
"name": "mongodb-connector",
"config": {
"connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
"mongodb.hosts": "host1:27020,host2:27020",
"mongodb.name": "op_log",
"mongodb.user": "useradmin",
"mongodb.password":"userpassword",
"mongodb.authsource":"admin"
}
}
Сведения об ошибке
com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='useradmin', source='config', password=<hidden>, mechanismProperties={}}
at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:61)
at com.mongodb.connection.DefaultAuthenticator.authenticate(DefaultAuthenticator.java:32)
at com.mongodb.connection.InternalStreamConnectionInitializer.authenticateAll(InternalStreamConnectionInitializer.java:99)
at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:44)
at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:128)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server 10.51.19.113:27020. The full response is { "operationTime" : { "$timestamp" : { "t" : 1585508571, "i" : 1 } }, "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed", "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1585508571, "i" : 1 } }, "signature" : { "hash" : { "$binary" : "f5msklBnUsfygvd+lCDdJVj3/a4=", "$type" : "0" }, "keyId" : { "$numberLong" : "6784723618031992833" } } } }
at com.mongodb.connection.CommandHelper.createCommandFailureException(CommandHelper.java:170)
at com.mongodb.connection.CommandHelper.receiveCommandResult(CommandHelper.java:123)
at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32)
at com.mongodb.connection.SaslAuthenticator.sendSaslStart(SaslAuthenticator.java:95)
at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:45)
... 6 more
См. По ошибке, механизм приходит как ноль, и в mongodb я использую SCRAM-SHA-1 в качестве механизма аутентификации.