Hazelcast Kubernetes 警告未知协议

Hazelcast Kubernetes Warning Unknown Protocol

我之前使用的是 Zookeeper Hazelcast 发现,但现在我已将其更改为 Hazelcast-Kubernetes。它似乎工作正常,但有时它会打印警告消息,如:

2020-10-16 13:45:27.434  WARN 1 --- [.IO.thread-in-1] com.hazelcast.nio.tcp.TcpIpConnection    : [10.131.6.73]:5701 [dev] [3.12.7] Connection[id=6, /10.131.6.73:5701->/10.131.6.1:58546, qualifier=null, endpoint=null, alive=false, type=NONE] closed. Reason: Exception in Connection[id=6, /10.131.6.73:5701->/10.131.6.1:58546, qualifier=null, endpoint=null, alive=true, type=NONE], thread=hz.switch-data-analytics.IO.thread-in-1

java.lang.IllegalStateException: Unknown protocol: OPT
             at com.hazelcast.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:107)
             at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:135)
             at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:369)
             at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:354)
             at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:280)
             at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:235)

2020-10-16 13:45:27.438  WARN 1 --- [.IO.thread-in-2] com.hazelcast.nio.tcp.TcpIpConnection    : [10.131.6.73]:5701 [dev] [3.12.7] Connection[id=7, /10.131.6.73:5701->/10.131.6.1:58548, qualifier=null, endpoint=null, alive=false, type=NONE] closed. Reason: Exception in Connection[id=7, /10.131.6.73:5701->/10.131.6.1:58548, qualifier=null, endpoint=null, alive=true, type=NONE], thread=hz.switch-data-analytics.IO.thread-in-2

java.lang.IllegalStateException: TLS handshake header detected, but plain protocol header was expected.
             at com.hazelcast.nio.tcp.UnifiedProtocolDecoder.loadProtocol(UnifiedProtocolDecoder.java:125)
             at com.hazelcast.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:87)
             at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:135)
             at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:369)
             at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:354)
             at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:280)
             at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:235)

我找不到任何协议用法,如 OPT 等

我应该怎么做才能清除此警告?

注:

我正在使用 openshift,并且我的 spring 启动应用程序在一个命名空间下的 3 pods 中使用 hazelcast 分布式缓存。

这是我的设置:

config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config.getNetworkConfig().getJoin().getAwsConfig().setEnabled(false);
config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(false);
        config.getNetworkConfig().getJoin().getKubernetesConfig().setEnabled(true)
            .setProperty("service-name", applicationProperties.getHazelcast().getServiceName())
            .setProperty("namespace", applicationProperties.getPod().getNamespace());

GH Issue 中有一个类似的问题报告。如那里所述,添加以下部分可能会解决问题:

- containerPort: 5701

无论如何,这可能是hazelcast-kubernetes. Feel free to add the "steps to reproduce" to the following Hazelcast Kubernetes GH Issue的错误。