当前位置: 首页 > 知识库问答 >
问题:

部署ElasticsearchSinkConnector后任务为空

梁嘉祥
2023-03-14

我尝试通过以下方式部署ElasticsearchSinkConnector

POST/连接器

{
    "name": "elasticsearch-sink",
    "config": {
        "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
        "type.name": "_doc",
        "tasks.max": "1",
        "topics": "my_db_server.public.my_table",
        "connection.url": "https://my-elasticsearch.com:9200",
        "connection.username": "xxx",
        "connection.password": "xxx",
        "key.ignore": "true",
        "schema.ignore": "true",
        "elastic.security.protocol": "SSL",
        "elastic.https.ssl.keystore.location": "path/to/keystore.jks",
        "elastic.https.ssl.keystore.password": "xxx",
        "elastic.https.ssl.key.password": "xxx",
        "elastic.https.ssl.keystore.type": "JKS",
        "elastic.https.ssl.truststore.location": "path/to/truststore.jks",
        "elastic.https.ssl.truststore.password": "xxx",
        "elastic.https.ssl.truststore.type": "JKS",
        "elastic.https.ssl.protocol": "TLS"
    }
}

但是,当我通过以下方式检查状态时,它成功部署了

得到 /connectors/elasticsearch-sink/status

任务是空数组[]

{
    "name": "elasticsearch-sink",
    "connector": {
        "state": "RUNNING",
        "worker_id": "10.xxx.xxx.xxx:8083"
    },
    "tasks": [],
    "type": "sink"
}

我找到了这个 Kafka 连接:没有为连接器创建任何任务

但是,我在里面尝试了这两个答案,都更改了名称,并删除了ElasticsearchSinkConnector然后多次重新部署对我不起作用。

此外,Kafka Connect pod中没有日志。

知道吗?谢谢!

共有1个答案

柳奇思
2023-03-14

将这两个添加到ElasticsearchSinkConnector配置后

        "errors.log.include.messages": "true",
        "errors.log.enable": "true"

在配置中如此相似

POST/连接器

{
    "name": "elasticsearch-sink",
    "config": {
        "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
        "type.name": "_doc",
        "tasks.max": "1",
        "topics": "my_db_server.public.my_table",
        "connection.url": "https://my-elasticsearch.com:9200",
        "connection.username": "xxx",
        "connection.password": "xxx",
        "key.ignore": "true",
        "schema.ignore": "true",
        "elastic.security.protocol": "SSL",
        "elastic.https.ssl.keystore.location": "path/to/keystore.jks",
        "elastic.https.ssl.keystore.password": "xxx",
        "elastic.https.ssl.key.password": "xxx",
        "elastic.https.ssl.keystore.type": "JKS",
        "elastic.https.ssl.truststore.location": "path/to/truststore.jks",
        "elastic.https.ssl.truststore.password": "xxx",
        "elastic.https.ssl.truststore.type": "JKS",
        "elastic.https.ssl.protocol": "TLS",
        "errors.log.include.messages": "true",
        "errors.log.enable": "true"
    }
}

这次当我检查状态时

得到 /connectors/elasticsearch-sink/status

任务现在显示错误:

{
    "name": "elasticsearch-sink",
    "connector": {
        "state": "RUNNING",
        "worker_id": "10.xxx.xxx.xxx:8083"
    },
    "tasks": [
        {
            "id": 0,
            "state": "FAILED",
            "worker_id": "10.xxx.xxx.xxx:8083",
            "trace": "org.apache.kafka.common.errors.GroupAuthorizationException: Not authorized to access group: connect-elasticsearch-sink\n"
        }
    ],
    "type": "sink"
}

现在只需要解决权限问题。

另外,我找到了一篇关于如何调试的好文章:https://www.confluent.io/blog/kafka-connect-deep-dive-error-handling-dead-letter-queues/

 类似资料:
  • 问题内容: 我有一个Java EE应用程序,该应用程序在部署后应该与外部系统启动一次同步过程。 我该如何执行此要求? 问题答案: 我测试了使用和注释的建议解决方案。事实证明,Glassfish不会在完成所有带有注释的方法之前完成应用程序的部署。因此,就我而言,部署将需要几分钟到一个小时。 但是我想出了一种实现我想要的东西的不同方法。最好的解决方案似乎是计时器回调方法,该方法在执行后取消其计时器。

  • 配置keepalived服务 在每个seafile后端节点上安装和配置 keepalived 来实现浮动 IP 地址。 CentOS 7: yum install keepalived -y 假设配置了两个seafile后台任务节点:background1、background2 在background1上修改 keepalived 配置文件(/etc/keepalived/keepalived.

  • 问题内容: 如果您曾经参与过Salesforce项目的部署或为SF项目设置持续集成,那么您应该知道,在部署元数据组件(类,页面等)之后,您通常还需要执行一些手动任务,例如填充自定义设置值或设置配置文件的字段级安全性。有很多这样无聊的动作。 在我当前的项目中,我再次面对它,我正在寻找如何最大程度地自动化它的方法。为了将项目部署到Org,我们使用Jenkins + Git。因此,我希望例如在每次部署后

  • 有几天,我试图在服务器上部署我的web应用程序。我遵循了这个程序,一切都很顺利,除了一旦开始,当我输入我的网站地址时,什么都没有出现。 我的程序: > 我用“dist”创建了一个zip 我将其解压缩到服务器的“public_html”文件中 我从“bin”启动了应用程序,如下所示: myapp/bin/myapp-Dplay.http.secret.key='密钥 我得到以下回应: 〔信息〕pla

  • 部署服务 我们使用 docker service 命令来管理 Swarm 集群中的服务,该命令只能在管理节点运行。 新建服务 现在我们在上一节创建的 Swarm 集群中运行一个名为 nginx 服务。 $ docker service create --replicas 3 -p 80:80 --name nginx nginx:1.13.7-alpine 现在我们使用浏览器,输入任意节点 IP

  • 在生产环境(例如使用Docker Swarm或Kubernetes)中部署Hyperledger Composer REST服务器时,应将REST服务器配置为高度可用。这意味着你必须部署多个REST服务器实例,并且应该配置这些实例以共享数据。例如,应共享连接配置文件,区块链身份和REST API身份认证设置等数据,以便REST API客户端可以向任何实例发出请求,而无需重新进行身份认证。 业务网络