Amazon web services 如何在Amazon MSK上运行Kafka Camel连接器

Amazon web services 如何在Amazon MSK上运行Kafka Camel连接器,amazon-web-services,apache-kafka,apache-camel,azure-eventhub,amazon-msk,Amazon Web Services,Apache Kafka,Apache Camel,Azure Eventhub,Amazon Msk,上下文: 我遵循这个链接,它的设置和工作正常。我能够通过两个单独的EC2实例发送和接收消息,这两个实例都使用相同的Kafka群集(我的MSK群集)。现在,我想建立一条从Eventhubs到AWS Firehose的数据管道,其形式如下: Azure Eventhub->Eventhub到卡夫卡骆驼式连接器->AWS MSK->卡夫卡到动弹消防栓骆驼式连接器->AWS动弹消防栓 我能够在没有使用MSK的情况下成功地做到这一点(通过普通的老卡夫卡),但由于未说明的原因,我现在需要使用MSK,我无法让

上下文: 我遵循这个链接,它的设置和工作正常。我能够通过两个单独的EC2实例发送和接收消息,这两个实例都使用相同的Kafka群集(我的MSK群集)。现在,我想建立一条从Eventhubs到AWS Firehose的数据管道,其形式如下:

Azure Eventhub->Eventhub到卡夫卡骆驼式连接器->AWS MSK->卡夫卡到动弹消防栓骆驼式连接器->AWS动弹消防栓

我能够在没有使用MSK的情况下成功地做到这一点(通过普通的老卡夫卡),但由于未说明的原因,我现在需要使用MSK,我无法让它工作

问题: 尝试启动AWS MSK和我正在使用的两个驼峰连接器之间的连接器时,出现以下错误:

这是有问题的两个连接器:

  • 目标:让这些连接器与MSK一起工作,就像他们直接与卡夫卡一起工作时没有MSK一样

    以下是消防水带的问题:

    Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:177)
    com.amazonaws.services.kinesisfirehose.model.AmazonKinesisFirehoseException: The security token included in the request is invalid
    
    下面是Azure的一个示例:

    [2021-05-04 14:09:56,848] WARN Load balancing for event processor failed - If you are using a StorageSharedKeyCredential, and the server returned an error message that says 'Signature did not match', you can compare the string to sign with the one generated by the SDK. To log the string to sign, pass in the context key value pair 'Azure-Storage-Log-String-To-Sign': true to the appropriate method call.
    If you are using a SAS token, and the server returned an error message that says 'Signature did not match', you can compare the string to sign with the one generated by the SDK. To log the string to sign, pass in the context key value pair 'Azure-Storage-Log-String-To-Sign': true to the appropriate generateSas method call.
    Please remember to disable 'Azure-Storage-Log-String-To-Sign' before going to production as this string can potentially contain PII.
    Status code 403, "<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthorizationFailure</Code><Message>This request is not authorized to perform this operation.
    Time:2021-05-04T14:09:56.7148317Z</Message></Error>" (com.azure.messaging.eventhubs.PartitionBasedLoadBalancer:344)
    [2021-05-04 14:09:56,858] Error was received while reading the incoming data. The connection will be closed. (reactor.netty.channel.ChannelOperationsHandler:319)
    java.lang.NoSuchMethodError: org.apache.camel.component.azure.eventhubs.EventHubsConsumer.createExchange(Z)Lorg/apache/camel/Exchange;
            at org.apache.camel.component.azure.eventhubs.EventHubsConsumer.createAzureEventHubExchange(EventHubsConsumer.java:93)
    

    MSK不提供卡夫卡连接服务。您需要在您自己的计算机或其他AWS计算资源上安装此软件。从这里开始,您需要安装Camel连接器插件

    Kafka Connect是一个与Kafka(MSK、开源或任何其他Kafka发行版)一起工作的框架。但是,它没有任何连接器。Kafka Connect与开源Kafka捆绑在一起

    作为最佳实践,切勿在与代理节点相同的服务器上运行kafka connect。因为它们共享二进制文件。调整代理可能会导致卡夫卡代理出现意外问题。此外,Kafka Connect应用程序是应用程序,您不能在同一节点上运行Kafka consumer或producer应用程序。因此,创建一个EC2实例并在那里部署kafka connect


    来到TLS—如果您正在启用客户端TLS身份验证—您需要查找boostrap_broker_TLS。

    谢谢。所以我感到困惑的是,我在文档中的步骤6#3中使用了--引导服务器BootstrapBrokerStringTls,在本地运行connect distributed,然后尝试运行Camel生产者和消费者连接器插件。但我在运行Camel连接器时不断出错。这是使用AmazonMSK运行Camel连接器插件的正确方法吗?没有太多文档可供帮助。Connect本身不使用
    --bootstrap server
    ,因此我不确定您在这里指的是什么,但只需要将MSK地址和任何相关证书放在Connect-distributed.properties文件中。然后在那里更新Camel JAR文件的
    plugin.path
    。关于问题中的错误,可能是版本问题,或者您丢失了一些其他JAR文件,但我从未使用过Camel,所以不能说,所以我找到了这个,这将有助于在MSK上启动Kafka Connect。但是,还有连接器不工作和抛出错误的问题。所有建议都不起作用。通常建议不要在代理本身上运行Connect。在任何情况下,您得到的错误都是Java/插件特有的,根本不是卡夫卡连接问题嘿,有什么故障排除建议吗?它看起来是与Kafka连接器相关的特定于Java的。我会使用另一个EC2系统来连接连接器吗?嗨,请粘贴实际的错误代码而不是它的图像。它提供了更好的可读性和搜索能力options@Ftisiot,添加了错误。谢谢你的提醒。