带CAR和W的WSO2 EI611卡夫卡连接器入站端点错误控制台

时间:2017-10-20 15:01:55

标签: wso2 apache-kafka wso2esb connector

https://docs.wso2.com/display/ESBCONNECTORS/Configuring+Kafka_2.12-0.11.0.0+Operations https://docs.wso2.com/display/ESBCONNECTORS/Configuring+Kafka+Inbound+Operations https://docs.wso2.com/display/ESBCONNECTORS/Kafka_2.12-0.11.0.0+Connector+and+Inbound+Endpoint

没有像上面文档链接中提到的那样的目录结构:

  

要配置Kafka入站端点,请复制以下客户端   库中的/ lib目录到   / repository / components / lib目录。

我在管理控制台上使用EI611配置了Kafka InboundEndpoint,并在日志中收到此错误:

  

org.apache.kafka.common.KafkaException:加载时出现异常   Zookeeper JAAS登录环境'客户' ......由以下原因引起:   java.lang.SecurityException:java.io.IOException:   C:\ WSO2EI~1.1 \ bin .. \ repository \ conf \ identity \ jaas.conf(没有这样的文件   或目录)

或者,我从工具开发了一个Inbound端点并部署了CAR文件,我收到以下错误:

  

[2017-10-20 18:15:11,138] []错误 - KAFKAPollingConsumer错误   创建Kafka Consumer Connector [2017-10-20 18:15:13,133] [] INFO -   KAFKAMessageListener创建Kafka Consumer Connector ... [2017-10-20   18:15:13,134] [] ERROR - KAFKAMessageListener创建Kafka时出错   Consumer Connector.requirement失败:应始终使用socket.timeout.ms   至少是fetch.wait.max.ms以防止不必要的套接字超时   java.lang.IllegalArgumentException:要求失败:   socket.timeout.ms应始终至少为fetch.wait.max.ms   防止不必要的套接字超时           在scala.Predef $ .require(Predef.scala:277)           在kafka.consumer.ConsumerConfig。(ConsumerConfig.scala:153)           在kafka.consumer.ConsumerConfig。(ConsumerConfig.scala:110)           at org.wso2.carbon.inbound.endpoint.protocol.kafka.KAFKAMessageListener.createKafkaConsumerConnector(KAFKAMessageListener.java:56)           在org.wso2.carbon.inbound.endpoint.protocol.kafka.KAFKAPollingConsumer.poll(KAFKAPollingConsumer.java:145)           在org.wso2.carbon.inbound.endpoint.protocol.kafka.KAFKAPollingConsumer.execute(KAFKAPollingConsumer.java:116)           at org.wso2.carbon.inbound.endpoint.protocol.kafka.KAFKATask.taskExecute(KAFKATask.java:48)           在org.wso2.carbon.inbound.endpoint.common.InboundTask.execute(InboundTask.java:45)           在org.wso2.carbon.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:98)           at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)           在org.quartz.core.JobRunShell.run(JobRunShell.java:213)           at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)           at java.util.concurrent.FutureTask.run(FutureTask.java:266)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)           在java.lang.Thread.run(Thread.java:748)

<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="KafkaReceiver" onError="ErrorKafkaSeq" protocol="kafka" sequence="InKafkaSeq" suspend="false" xmlns="http://ws.apache.org/ns/synapse">
    <parameters>
        <parameter name="interval">1000</parameter>
        <parameter name="sequential">true</parameter>
        <parameter name="coordination">true</parameter>
        <parameter name="zookeeper.connect">localhost:2181</parameter>
        <parameter name="group.id">sampleGroupID</parameter>
        <parameter name="content.type">application/xml</parameter>
        <parameter name="consumer.type">highlevel</parameter>
        <parameter name="topics">sampleTopic</parameter>
        <parameter name="socket.timeout.ms">0</parameter>
        <parameter name="auto.commit.enable">false</parameter>
        <parameter name="auto.offset.reset">smallest</parameter>
        <parameter name="exclude.internal.topics">false</parameter>
        <parameter name="partition.assignment.strategy">roundrobin</parameter>
        <parameter name="offsets.storage">zookeeper</parameter>
        <parameter name="dual.commit.enabled">false</parameter>
    </parameters>
</inboundEndpoint>

1 个答案:

答案 0 :(得分:0)

我希望上面的文档是基于WSO2 ESB编写的。如果您使用的是EI,请将所有相关的第三方库复制到/ lib。 请将jaas.conf [1]文件添加到目录(/ repository / conf / identity /)

[1] https://docs.oracle.com/javase/7/docs/jre/api/security/jaas/spec/com/sun/security/auth/module/Krb5LoginModule.html