【问题标题】:Authentication error while creating mongo debezium connector创建 mongo debezium 连接器时出现身份验证错误
【发布时间】:2020-07-10 04:01:09
【问题描述】:

我正在尝试在下面创建 mongo debezium 连接器,但出现身份验证错误。请在下面找到详细信息

发布 http://localhost:8083/connectors

有效载荷:

{
  "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

看到错误,机制为 null,在 mongodb 中我使用 SCRAM-SHA-1 作为身份验证机制。

【问题讨论】:

标签: mongodb authentication apache-kafka-connect debezium


【解决方案1】:

已经解决了。显然我使用的是旧版本的 mongodb 连接器罐子(1 个月大)。最新更新于 2020 年 3 月 24 日发布。

你可以在这里得到这些罐子 - https://debezium.io/documentation/reference/1.1/connectors/mongodb.html#mongodb-deploying-a-connector

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-06-18
    • 1970-01-01
    • 2017-02-05
    • 2019-06-22
    • 2016-10-15
    • 2020-09-18
    • 2015-07-10
    相关资源
    最近更新 更多