![](/img/trans.png)
[英]Springboot application with dynamic rest api calls using kubernetes cluster
[英]Hazecast-Kubernetes Springboot application embedded cluster warning
我已经在 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
是否缺少任何配置?
这看起来类似于https://github.com/hazelcast/hazelcast-kubernetes/issues/186将containerPort: 5701添加到您的 HZ 服务清单应该可以工作。
无论服务类型是 LoadBalancer 还是 ClusterIP,它都应该工作
即使在出现警告的情况下,您能否确认集群也能正常工作?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.