gpt4 book ai didi

spring-boot - Spring Boot 和 Kafka : Failed to send SSL Close message

转载 作者:行者123 更新时间:2023-12-04 17:45:30 29 4
gpt4 key购买 nike

我正在将 Spring Boot 与 Kafka 一起使用,并想收听有关现有和工作代理和主题的消息。
application.yml配置如下:

spring:
kafka:
topic:
boot: my_topic
bootstrap-servers: hostname:9092
properties:
security.protocol: SSL
consumer:
auto-offset-reset: earliest
group-id: my_group
enable-auto-commit: false
fetch-max-wait: 500
max-poll-records: 1

正在抛出以下错误:
2018-02-11 11:36:34.302  WARN 1676 --- [ntainer#0-0-C-1] o.a.k.common.network.SslTransportLayer   : Failed to send SSL Close message 

java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[na:1.8.0_20]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51) ~[na:1.8.0_20]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[na:1.8.0_20]
at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_20]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:470) ~[na:1.8.0_20]
at org.apache.kafka.common.network.SslTransportLayer.flush(SslTransportLayer.java:195) ~[kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.common.network.SslTransportLayer.close(SslTransportLayer.java:163) ~[kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.common.utils.Utils.closeAll(Utils.java:690) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.common.network.KafkaChannel.close(KafkaChannel.java:47) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.common.network.Selector.close(Selector.java:487) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:368) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.common.network.Selector.poll(Selector.java:291) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:260) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:232) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:209) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.awaitMetadataUpdate(ConsumerNetworkClient.java:148) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.awaitMetadataUpdate(ConsumerNetworkClient.java:136) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:197) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:248) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1013) [kafka-clients-0.10.1.1.jar:na]
at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:979) [kafka-clients-0.10.1.1.jar:na]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:556) [spring-kafka-1.1.7.RELEASE.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_20]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_20]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]

无法更改 kafka 代理和生产者的配置。 Spring Boot 中的客户端 kafka 配置中是否缺少可以添加以解决此问题的任何内容?

谢谢

最佳答案

您的代理似乎未配置 SSL;如果我在客户端上设置 SSL,我会得到同样的错误;我的经纪人不使用 SSL...

[2018-02-12 11:04:45,700] WARN Unexpected error from /127.0.0.1; closing connection (org.apache.kafka.common.network.Selector) org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 369296128 larger than 104857600)

关于spring-boot - Spring Boot 和 Kafka : Failed to send SSL Close message,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48730790/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com