Hazelcast 5.0: REST API is not enabled

Skip to first unread message

Lars Krog-Jensen

Oct 26, 2021, 6:53:01 AM10/26/21
to Hazelcast
Seen some weird exception that happens once a minute or so in a 2 node cluster:

java.lang.IllegalStateException: REST API is not enabled. To enable REST API, please do one of the following: - Change member config using JAVA API: config.getNetworkConfig().getRestApiConfig().setEnabled(true); - Change XML/YAML configuration property: hazelcast.network.rest-api.enabled to true - Add system property: -Dhz.network.rest-api.enabled=true - Add environment variable property: HZ_NETWORK_RESTAPI_ENABLED=true at c.h.internal.server.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:106) at c.h.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:136) at com.hazelcast.internal.networking.nio.NioPipeline.lambda$start$0(NioPipeline.java:127) at com.hazelcast.internal.networking.nio.NioThread.processTaskQueue(NioThread.java:355) at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:290) at com.hazelcast.internal.networking.nio.NioThread.executeRun(NioThread.java:249) at c.h.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)

I have not enabled REST API cause I have no use for it, but yet hazelcast itself is using it for some reason.

App runs hazelcast embedded and these errors are only logged when running app in kubernetes (which we are moving to).  On current prod environment (AWS ec2) this is not happening.

Lars Krog-Jensen

Oct 26, 2021, 8:55:49 AM10/26/21
to Hazelcast
turns out that there is a prometheus scrapper that queried hazelcast port, scraper is the culprit not hazelcast 
Reply all
Reply to author
0 new messages