0

我有 kafka 和 Open Distro Elastic Search 各自在 microk8s kubernetes 集群中独立工作(在我的 Windows 开发机器上托管的 vm 上),目前正在使用 kafka-connect 成功填充 mongo db(也在集群中)。但是,当尝试将 Elastic Sink Connector 插件添加到 kafka-connect 时,我收到如下错误:

java.util.concurrent.ExecutionException: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 3 error(s):
Could not connect to Elasticsearch. Error message: General SSLEngine problem
Could not authenticate the user. Check the 'connection.username' and 'connection.password'. Error message: General SSLEngine problem
Could not authenticate the user. Check the 'connection.username' and 'connection.password'. Error message: General SSLEngine problem

如果我移除弹性接收器连接器并重新部署,我可以进入 kafka-connect pod:

> kubectl exec --stdin --tty kafka-connect-fbcc9878-hnjrj  -- /bin/sh

然后我可以 curl 到客户端服务界面:

# curl -k -u admin:admin https://opendistro-es-client-service.default.svc.cluster.local:9200

因此,用户/通行证从运行 kafka-connect 的 pod 工作。我认为问题是我没有正确设置证书。所以: 有没有办法暂时忽略这一点(就像 curl 命令中的 -k 一样)。
我的目标是让它完全正常工作,然后配置安全性。使用的 connector.properties 是:

name=DarMongoDbSinkConnector
connector.class=io.confluent.connect.elasticsearch.ElasticsearchSinkConnector
tasks.max=1
topics=mytopics
key.ignore=false
connection.url=https://opendistro-es-client-service.default.svc.cluster.local:9200
connection.username=admin
connection.password=admin

type.name=kafka-connect

第二个问题:当这失败时,它最终会进入 Kubernetes 中的 CrashLoopBackoff。但是,正如我所说,我们有另一个用于 mongodb 的 kafka-connect 插件。我不会(必然)希望无法初始化一个连接来破坏任何其他连接。我是否需要为每个连接创建单独的部署以确保不会发生这种情况?

4

0 回答 0