【问题标题】:Hazecast-Kubernetes Springboot application embedded cluster warningHazelcast-Kubernetes Spring Boot 应用嵌入式集群警告
【发布时间】:2021-02-12 00:44:01
【问题描述】:

我已经在 kubernetes 上部署了嵌入式 hazelcast 集群,但我得到了以下警告。禁用自动递增标志,portCount 仍然出错。

配置:

Config config = new Config();
config.setClusterName("cache-cluster");
JoinConfig joinConfig = config.getNetworkConfig().getJoin();
joinConfig.getMulticastConfig().setEnabled(false);
joinConfig.getTcpIpConfig().setEnabled(false);
joinConfig.getKubernetesConfig().setEnabled(true)
            .setProperty("namespace", "<Namespace>")
            .setProperty("service-name", "<Service-name>");

我已经在 kubernetes 中打开了容器端口。服务能够创建集群,但不断收到以下警告。


2020-10-29 14:04:40.092  WARN  [hz.silly_lalande.IO.thread-in-1    ]  c.h.i.n.t.TcpIpConnection                    - [22.249.47.234]:5701 [cache-cluster] [4.0.1] Connection[id=2, /22.249.47.234:5701->/22.249.5.1:52152, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Exception in Connection[id=2, /22.249.47.234:5701->/22.249.5.1:52152, qualifier=null, endpoint=null, alive=true, connectionType=NONE], thread=hz.silly_lalande.IO.thread-in-1 
java.lang.IllegalStateException: Unknown protocol: ?
    at com.hazelcast.internal.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:116)
    at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:137)
    at com.hazelcast.internal.networking.nio.NioPipeline.lambda$start$0(NioPipeline.java:127)
    at com.hazelcast.internal.networking.nio.NioThread.processTaskQueue(NioThread.java:354)
    at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:289)
    at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:248)
2020-10-29 14:13:10.038  WARN  [hz.silly_lalande.IO.thread-in-2    ]  c.h.i.n.t.TcpIpConnection                    - [22.249.47.234]:5701 [cache-cluster] [4.0.1] Connection[id=3, /22.249.47.234:5701->/22.249.55.1:52730, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Exception in Connection[id=3, /22.249.47.234:5701->/22.249.55.1:52730, qualifier=null, endpoint=null, alive=true, connectionType=NONE], thread=hz.silly_lalande.IO.thread-in-2 
java.lang.IllegalStateException: TLS handshake header detected, but plain protocol header was expected.
    at com.hazelcast.internal.nio.tcp.UnifiedProtocolDecoder.loadProtocol(UnifiedProtocolDecoder.java:134)
    at com.hazelcast.internal.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:90)
    at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:137)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:382)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:367)
    at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:293)
    at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:248)
2020-10-29 14:13:10.039  WARN  [hz.silly_lalande.IO.thread-in-0    ]  c.h.i.n.t.TcpIpConnection                    - [22.249.47.234]:5701 [cache-cluster] [4.0.1] Connection[id=4, /22.249.47.234:5701->/22.249.55.1:52736, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Exception in Connection[id=4, /22.249.47.234:5701->/22.249.55.1:52736, qualifier=null, endpoint=null, alive=true, connectionType=NONE], thread=hz.silly_lalande.IO.thread-in-0 
java.lang.IllegalStateException: TLS handshake header detected, but plain protocol header was expected.
    at com.hazelcast.internal.nio.tcp.UnifiedProtocolDecoder.loadProtocol(UnifiedProtocolDecoder.java:134)
    at com.hazelcast.internal.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:90)
    at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:137)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:382)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:367)
    at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:293)
    at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:248)

不知道为什么这里会发生连接

[22.249.47.234]:5701 [cache-cluster] [4.0.1] Connection[id=4, **/22.249.47.234:5701->/22.249.55.1:52736**, qualifier=null, endpoint=null, alive=false, connectionType=NONE] closed. Reason: Exception in Connection[id=4, **/22.249.47.234:5701->/22.249.55.1:52736**, qualifier=null, endpoint=null, alive=true, connectionType=NONE], thread=hz.silly_lalande.IO.thread-in-0 

是否缺少任何配置?

【问题讨论】:

  • 1.你使用什么 Hazelcast 版本? 2.你使用hazelcast-all依赖还是hazelcasthazelcast-kubernetes依赖?
  • 我使用的是hazelcast 4.0.1版本和hazelcast-kubernetes
  • hazelcast-kubernetes 的版本是什么?
  • hazelcast-kubernetes 2.0.1 版,我也在使用hazelcast-spring 4.0.1 版
  • 配置和版本看起来不错。您能否检查以下指南是否适合您? guides.hazelcast.org/hazelcast-embedded-springboot

标签: spring-boot kubernetes hazelcast spring-cache


【解决方案1】:

这看起来类似于https://github.com/hazelcast/hazelcast-kubernetes/issues/186containerPort: 5701 添加到您的 HZ 服务清单应该可以工作。

无论服务类型是 LoadBalancer 还是 ClusterIP,它都应该可以工作

您能否确认集群在出现警告的情况下也能正常工作?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-01-30
    • 2016-11-08
    • 2016-02-10
    • 1970-01-01
    • 2016-02-29
    • 2020-05-06
    • 2022-06-13
    相关资源
    最近更新 更多