I was using Zookeeper Hazelcast discovery but now i have changed it to Hazelcast-Kubernetes. It seems it is working fine but some times it prints warning message like :
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)
and
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)
I could not find any protocol usage like OPT or etc.
What should i do to clear this warning ?
Note :
I am using openshift and and my spring boot application use hazelcast distributed cache in 3 pods under one namespace.
Here is my setting :
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());
There is a similar issue report in this GH Issue. As described there, adding the following part might solve the issue:
- containerPort: 5701
In any case, it might be a bug of hazelcast-kubernetes. Feel free to add the "steps to reproduce" to the following Hazelcast Kubernetes GH Issue.