Get exception "Unknown protocol: HTT" when using hazelcast-hibernate with hazelcast-kubernetes
See original GitHub issueI used https://github.com/Cepr0/sb-hazelcast-hibernate-l2c-demo as reference, which works well, but when I added hazelcast-kubenetes by this guide, I get following exception and cannot run the pod.
2020-01-10 02:41:55.147 WARN 1 --- [.IO.thread-in-1] com.hazelcast.nio.tcp.TcpIpConnection : [172.20.1.2]:5701 [hl-event-service] [3.12.4] Connection[id=9, /172.20.1.2:41156->/172.20.1.236:80, qualifier=null, endpoint=[172.20.1.236]:80, alive=false, type=NONE] closed. Reason: Exception in Connection[id=9, /172.20.1.2:41156->/172.20.1.236:80, qualifier=null, endpoint=[172.20.1.236]:80, alive=true, type=NONE], thread=hz.hl-event-service-instance.IO.thread-in-1
java.lang.IllegalStateException: Unknown protocol: HTT
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)
Here are my configs (slightly different from the reference) HazelcastConfiguration.java
@Bean
public Config config() {
Config hazelcastConfig = new Config();
hazelcastConfig.setInstanceName(properties.getInstance());
hazelcastConfig.getGroupConfig().setName(properties.getGroup());
JoinConfig joinConfig = hazelcastConfig.getNetworkConfig().getJoin();
joinConfig.getMulticastConfig().setEnabled(false);
joinConfig.getKubernetesConfig().setEnabled(true);
return hazelcastConfig;
}
application.yml
hibernate:
ddl-auto: none
show-sql: true
hbm2ddl:
auto: validate
temp:
use_jdbc_metadata_defaults: false
cache:
use_query_cache: true
use_second_level_cache: true
hazelcast:
instance_name: ${hazelcast-custom.instance}
region:
factory_class: com.hazelcast.hibernate.HazelcastLocalCacheRegionFactory
hazelcast-custom:
instance: hl-event-service-instance
group: hl-event-service
pom.xml (use Hazelcast 3 because hazelcast-hibernate53 doesn’t fit Hazelcast 4 yet)
<hazelcast.version>3.12.4</hazelcast.version>
<hazelcast-hibernate53.version>1.3.2</hazelcast-hibernate53.version>
<hazelcast-kubernetes.version>1.5.2</hazelcast-kubernetes.version>
Where does the “HTT” come from? Is there any crash in the config for hazelcast-hibernate and hazelcast-kubernetes? I noticed an issue in hibernate with similar exception.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Exception on the pods java.lang.IllegalStateException ...
IO.thread-in-0 java.lang.IllegalStateException: Unknown protocol: HTT at com.hazelcast.internal.server.tcp.UnifiedProtocolDecoder.
Read more >hazelcast/hazelcast - Gitter
when running it I get this error in the pod: Caused by: com.hazelcast.config.properties.ValidationException: There is no discovery strategy factory to create ' ...
Read more >Hazelcast IMDG Reference Manual - Hazelcast Documentation
Hazelcast Reference Manual explains all in-memory data grid features provided by Hazelcast in detail with code samples and configuration options.
Read more >Hazelcast Plugins
To use this plugin, add the hazelcast-kubernetes dependency to your Maven or Gradle configurations and enable Hazelcast's Discovery SPI. You need to configure ......
Read more >Hazelcast with Spring Boot on Kubernetes - Piotr's TechBlog
Since we are still using Hazelcast 3 we are declaring version 1.5.2 of hazelcast-kubernetes . We also include Spring Data Hazelcast and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@donatelloOo You can specify the parameter
service-port
. If not specified, the plugin will try to find thecontainerPort
. If nothing found, then it defaults to5701
. You can check the exact logic here and here.I also had this error, but for a different reason. I had forgotten to add
in my pod deployment. This apparently caused hazelcast-kubernetes to connect to the only other open port on the pod, which in my case was 8080, where a web application was being served.
Perhaps this will help someone along the line.