title: Hazelcast failed to start in Kubernetes
body: <p>I have a HA Kubernetes cluster that initialized with custom certificates. I want to run Hazelcast on it, but there is an error in discovering Hazelcast members using Kubernetes API.
  This is my deploy file:</p>
  <pre><code>apiVersion: apps/v1
  kind: StatefulSet
  metadata:
    name: hazelcast
    labels:
      app: hazelcast
  spec:
    replicas: 3
    serviceName: hazelcast-service
    selector:
      matchLabels:
        app: hazelcast
    template:
      metadata:
        labels:
          app: hazelcast
      spec:
        imagePullSecrets:
        - name: nexuspullsecret
        containers:
        - name: hazelcast
          image: 192.168.161.187:9050/hazelcast-custom:4.0.2
          imagePullPolicy: &quot;Always&quot;
          ports:
          - name: hazelcast
            containerPort: 5701
          livenessProbe:
            httpGet:
              path: /hazelcast/health/node-state
              port: 5701
            initialDelaySeconds: 30
            periodSeconds: 10
            timeoutSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /hazelcast/health/node-state
              port: 5701
            initialDelaySeconds: 30
            periodSeconds: 10
            timeoutSeconds: 1
            successThreshold: 1
            failureThreshold: 1
          resources:
              requests:
                memory: &quot;0&quot;
                cpu: &quot;0&quot;
              limits:
                memory: &quot;2048Mi&quot;
                cpu: &quot;500m&quot;
          volumeMounts:
          - name: hazelcast-storage
            mountPath: /data/hazelcast
          env:
          - name: JAVA_OPTS
            value: &quot;-Dhazelcast.rest.enabled=true -Dhazelcast.config=/data/hazelcast/hazelcast.xml&quot;
        volumes:
        - name: hazelcast-storage
          configMap:
            name: hazelcast-configuration
  
  ---
  
  apiVersion: v1
  kind: Service
  metadata:
    name: hazelcast-service
  spec:
    type: ClusterIP
    selector:
      app: hazelcast
    ports:
    - protocol: TCP
      port: 5701
  
  ---
  apiVersion: rbac.authorization.k8s.io/v1
  kind: ClusterRole
  metadata:
    name: hazelcast-cluster-role
  rules:
  - apiGroups: [&quot;&quot;]
    resources: [&quot;endpoints&quot;, &quot;pods&quot;, &quot;nodes&quot;]
    verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;]
  
  ---
  apiVersion: rbac.authorization.k8s.io/v1
  kind: ClusterRoleBinding
  metadata:
    name: hazelcast-cluster-role-binding
  subjects:
    - kind: ServiceAccount
      name: default
      namespace: default
  roleRef:
    kind: ClusterRole
    name: hazelcast-cluster-role
    apiGroup: rbac.authorization.k8s.io 
  ---
  
  apiVersion: policy/v1beta1
  kind: PodDisruptionBudget
  metadata:
    name: hazelcast
    namespace: default
  spec:
    maxUnavailable: 0
    selector:
      matchLabels:
        app: hazelcast
  
  
  ---
  
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: hazelcast-configuration
  data:
    hazelcast.xml: |-
      &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
      &lt;hazelcast xmlns=&quot;http://www.hazelcast.com/schema/config&quot;
             xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
             xsi:schemaLocation=&quot;http://www.hazelcast.com/schema/config
             http://www.hazelcast.com/schema/config/hazelcast-config-4.0.xsd&quot;&gt;
        &lt;network&gt;
          &lt;rest-api enabled=&quot;true&quot;&gt;&lt;/rest-api&gt;
          &lt;join&gt;
            &lt;!-- deactivate normal discovery --&gt;
            &lt;multicast enabled=&quot;false&quot;/&gt;
            &lt;tcp-ip enabled=&quot;false&quot; /&gt;
            &lt;!-- activate the Kubernetes plugin --&gt;
            &lt;kubernetes enabled=&quot;true&quot;&gt;
              &lt;service-name&gt;hazelcast-service&lt;/service-name&gt;
              &lt;namespace&gt;default&lt;/namespace&gt;
              &lt;kubernetes-api-retries&gt;20&lt;/kubernetes-api-retries&gt;
            &lt;/kubernetes&gt;
          &lt;/join&gt;
        &lt;/network&gt;
        &lt;user-code-deployment enabled=&quot;true&quot;&gt;
          &lt;class-cache-mode&gt;ETERNAL&lt;/class-cache-mode&gt;
          &lt;provider-mode&gt;LOCAL_AND_CACHED_CLASSES&lt;/provider-mode&gt;
        &lt;/user-code-deployment&gt;
        &lt;reliable-topic name=&quot;ConfirmationTimeout&quot;&gt;
          &lt;read-batch-size&gt;10&lt;/read-batch-size&gt;
          &lt;topic-overload-policy&gt;DISCARD_OLDEST&lt;/topic-overload-policy&gt;
          &lt;statistics-enabled&gt;true&lt;/statistics-enabled&gt;
        &lt;/reliable-topic&gt;
        &lt;ringbuffer name=&quot;ConfirmationTimeout&quot;&gt;
          &lt;capacity&gt;10000&lt;/capacity&gt;
          &lt;backup-count&gt;1&lt;/backup-count&gt;
          &lt;async-backup-count&gt;0&lt;/async-backup-count&gt;
          &lt;time-to-live-seconds&gt;0&lt;/time-to-live-seconds&gt;
          &lt;in-memory-format&gt;BINARY&lt;/in-memory-format&gt;
          &lt;merge-policy batch-size=&quot;100&quot;&gt;com.hazelcast.spi.merge.PutIfAbsentMergePolicy&lt;/merge-policy&gt;
        &lt;/ringbuffer&gt;
        &lt;scheduled-executor-service name=&quot;ConfirmationTimeout&quot;&gt;
          &lt;capacity&gt;100&lt;/capacity&gt;
          &lt;capacity-policy&gt;PER_NODE&lt;/capacity-policy&gt;
          &lt;pool-size&gt;32&lt;/pool-size&gt;
          &lt;durability&gt;3&lt;/durability&gt;
          &lt;merge-policy batch-size=&quot;100&quot;&gt;com.hazelcast.spi.merge.PutIfAbsentMergePolicy&lt;/merge-policy&gt;
        &lt;/scheduled-executor-service&gt;
        &lt;cp-subsystem&gt;
          &lt;cp-member-count&gt;3&lt;/cp-member-count&gt;
          &lt;group-size&gt;3&lt;/group-size&gt;
          &lt;session-time-to-live-seconds&gt;300&lt;/session-time-to-live-seconds&gt;
          &lt;session-heartbeat-interval-seconds&gt;5&lt;/session-heartbeat-interval-seconds&gt;
          &lt;missing-cp-member-auto-removal-seconds&gt;14400&lt;/missing-cp-member-auto-removal-seconds&gt;
          &lt;fail-on-indeterminate-operation-state&gt;false&lt;/fail-on-indeterminate-operation-state&gt;
          &lt;raft-algorithm&gt;
              &lt;leader-election-timeout-in-millis&gt;15000&lt;/leader-election-timeout-in-millis&gt;
              &lt;leader-heartbeat-period-in-millis&gt;5000&lt;/leader-heartbeat-period-in-millis&gt;
              &lt;max-missed-leader-heartbeat-count&gt;10&lt;/max-missed-leader-heartbeat-count&gt;
              &lt;append-request-max-entry-count&gt;100&lt;/append-request-max-entry-count&gt;
              &lt;commit-index-advance-count-to-snapshot&gt;10000&lt;/commit-index-advance-count-to-snapshot&gt;
              &lt;uncommitted-entry-count-to-reject-new-appends&gt;100&lt;/uncommitted-entry-count-to-reject-new-appends&gt;
              &lt;append-request-backoff-timeout-in-millis&gt;100&lt;/append-request-backoff-timeout-in-millis&gt;
          &lt;/raft-algorithm&gt;
          &lt;locks&gt;
              &lt;fenced-lock&gt;
                  &lt;name&gt;TimeoutLock&lt;/name&gt;
                  &lt;lock-acquire-limit&gt;1&lt;/lock-acquire-limit&gt;
              &lt;/fenced-lock&gt;
          &lt;/locks&gt;
        &lt;/cp-subsystem&gt;
        &lt;metrics enabled=&quot;true&quot;&gt;
          &lt;management-center&gt;
              &lt;retention-seconds&gt;30&lt;/retention-seconds&gt;
          &lt;/management-center&gt;
          &lt;jmx enabled=&quot;false&quot;/&gt;
          &lt;collection-frequency-seconds&gt;10&lt;/collection-frequency-seconds&gt;
        &lt;/metrics&gt;
      &lt;/hazelcast&gt;
  </code></pre>
  <p>I have tested this deploy file on non-custom certificate ssl HA Kubernetes cluster and it works without any problems.</p>
  <p>This is log files:</p>
  <pre><code>    ######################################## 
  # JAVA_OPTS=-Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=/opt/hazelcast/logging.properties -XX:MaxRAMPercentage=80.0 -XX:+UseParallelGC --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED -Dhazelcast.rest.enabled=true -Dhazelcast.config=/data/hazelcast/hazelcast.xml 
  # CLASSPATH=/opt/hazelcast/*:/opt/hazelcast/lib/*:/opt/hazelcast/user-lib/* 
  # CLASSPATH_DEFAULT=/opt/hazelcast/*:/opt/hazelcast/lib/*:/opt/hazelcast/user-lib/* 
  # starting now.... 
  ######################################## 
  + exec java -server -Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=/opt/hazelcast/logging.properties -XX:MaxRAMPercentage=80.0 -XX:+UseParallelGC --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED -Dhazelcast.rest.enabled=true -Dhazelcast.config=/data/hazelcast/hazelcast.xml com.hazelcast.core.server.HazelcastMemberStarter 
  Sep 08, 2020 7:08:36 AM com.hazelcast.internal.config.AbstractConfigLocator 
  INFO: Loading configuration '/data/hazelcast/hazelcast.xml' from System property 'hazelcast.config' 
  Sep 08, 2020 7:08:37 AM com.hazelcast.internal.config.AbstractConfigLocator 
  INFO: Using configuration file at /data/hazelcast/hazelcast.xml 
  Sep 08, 2020 7:08:40 AM com.hazelcast.instance.AddressPicker 
  INFO: [LOCAL] [dev] [4.0.2] Prefer IPv4 stack is true, prefer IPv6 addresses is false 
  Sep 08, 2020 7:08:40 AM com.hazelcast.instance.AddressPicker 
  INFO: [LOCAL] [dev] [4.0.2] Picked [10.42.128.11]:5701, using socket ServerSocket[addr=/0.0.0.0,localport=5701], bind any local is true 
  Sep 08, 2020 7:08:40 AM com.hazelcast.system 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Hazelcast 4.0.2 (20200702 - 2de3027) starting at [10.42.128.11]:5701 
  Sep 08, 2020 7:08:40 AM com.hazelcast.system 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved. 
  Sep 08, 2020 7:08:42 AM com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Backpressure is disabled 
  Sep 08, 2020 7:08:43 AM com.hazelcast.spi.discovery.integration.DiscoveryService 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Kubernetes Discovery properties: { service-dns: null, service-dns-timeout: 5, service-name: hazelcast-service, service-port: 0, service-label: null, service-label-value: true, namespace: default, pod-label: null, pod-label-value: null, resolve-not-ready-addresses: true, use-node-name-as-external-address: false, kubernetes-api-retries: 20, kubernetes-master: https://kubernetes.default.svc} 
  Sep 08, 2020 7:08:43 AM com.hazelcast.spi.discovery.integration.DiscoveryService 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Kubernetes Discovery activated with mode: KUBERNETES_API 
  Sep 08, 2020 7:08:43 AM com.hazelcast.instance.impl.Node 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Activating Discovery SPI Joiner 
  Sep 08, 2020 7:08:43 AM com.hazelcast.cp.CPSubsystem 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] CP Subsystem is enabled with 3 members. 
  Sep 08, 2020 7:08:44 AM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Starting 2 partition threads and 3 generic threads (1 dedicated for priority tasks) 
  Sep 08, 2020 7:08:44 AM com.hazelcast.internal.diagnostics.Diagnostics 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments. 
  Sep 08, 2020 7:08:45 AM com.hazelcast.core.LifecycleService 
  INFO: [10.42.128.11]:5701 [dev] [4.0.2] [10.42.128.11]:5701 is STARTING 
  Sep 08, 2020 7:08:47 AM com.hazelcast.kubernetes.RetryUtils 
  WARNING: Couldn't discover Hazelcast members using Kubernetes API, [1] retrying in 1 seconds... 
  Sep 08, 2020 7:08:49 AM com.hazelcast.kubernetes.RetryUtils 
  WARNING: Couldn't discover Hazelcast members using Kubernetes API, [2] retrying in 2 seconds... 
  Sep 08, 2020 7:08:51 AM com.hazelcast.kubernetes.RetryUtils 
  WARNING: Couldn't discover Hazelcast members using Kubernetes API, [3] retrying in 3 seconds... 
  Sep 08, 2020 7:08:54 AM com.hazelcast.kubernetes.RetryUtils 
  WARNING: Couldn't discover Hazelcast members using Kubernetes API, [4] retrying in 5 seconds... 
  Sep 08, 2020 7:09:00 AM com.hazelcast.kubernetes.RetryUtils 
  WARNING: Couldn't discover Hazelcast members using Kubernetes API, [5] retrying in 7 seconds... 
  Sep 08, 2020 7:09:07 AM com.hazelcast.kubernetes.RetryUtils 
  WARNING: Couldn't discover Hazelcast members using Kubernetes API, [6] retrying in 11 seconds... 
  Sep 08, 2020 7:09:12 AM com.hazelcast.internal.ascii.rest.HttpPostCommandProcessor 
  WARNING: [10.42.128.11]:5701 [dev] [4.0.2] An error occurred while handling request HttpCommand [HTTP_GET]{uri='/hazelcast/health/node-state'}AbstractTextCommand[HTTP_GET]{requestId=0} 
  java.lang.NullPointerException 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handleHealthcheck(HttpGetCommandProcessor.java:137) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:79) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:47) 
      at com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:396) 
      at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217) 
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
      at java.base/java.lang.Thread.run(Thread.java:834) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) 
   
  Sep 08, 2020 7:09:14 AM com.hazelcast.internal.ascii.rest.HttpPostCommandProcessor 
  WARNING: [10.42.128.11]:5701 [dev] [4.0.2] An error occurred while handling request HttpCommand [HTTP_GET]{uri='/hazelcast/health/node-state'}AbstractTextCommand[HTTP_GET]{requestId=0} 
  java.lang.NullPointerException 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handleHealthcheck(HttpGetCommandProcessor.java:137) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:79) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:47) 
      at com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:396) 
      at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217) 
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
      at java.base/java.lang.Thread.run(Thread.java:834) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) 
   
  Sep 08, 2020 7:09:19 AM com.hazelcast.kubernetes.RetryUtils 
  WARNING: Couldn't discover Hazelcast members using Kubernetes API, [7] retrying in 17 seconds... 
  Sep 08, 2020 7:09:22 AM com.hazelcast.internal.ascii.rest.HttpPostCommandProcessor 
  WARNING: [10.42.128.11]:5701 [dev] [4.0.2] An error occurred while handling request HttpCommand [HTTP_GET]{uri='/hazelcast/health/node-state'}AbstractTextCommand[HTTP_GET]{requestId=0} 
  java.lang.NullPointerException 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handleHealthcheck(HttpGetCommandProcessor.java:137) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:79) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:47) 
      at com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:396) 
      at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217) 
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
      at java.base/java.lang.Thread.run(Thread.java:834) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) 
   
  Sep 08, 2020 7:09:24 AM com.hazelcast.internal.ascii.rest.HttpPostCommandProcessor 
  WARNING: [10.42.128.11]:5701 [dev] [4.0.2] An error occurred while handling request HttpCommand [HTTP_GET]{uri='/hazelcast/health/node-state'}AbstractTextCommand[HTTP_GET]{requestId=0} 
  java.lang.NullPointerException 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handleHealthcheck(HttpGetCommandProcessor.java:137) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:79) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:47) 
      at com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:396) 
      at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217) 
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
      at java.base/java.lang.Thread.run(Thread.java:834) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) 
   
  Sep 08, 2020 7:09:32 AM com.hazelcast.internal.ascii.rest.HttpPostCommandProcessor 
  WARNING: [10.42.128.11]:5701 [dev] [4.0.2] An error occurred while handling request HttpCommand [HTTP_GET]{uri='/hazelcast/health/node-state'}AbstractTextCommand[HTTP_GET]{requestId=0} 
  java.lang.NullPointerException 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handleHealthcheck(HttpGetCommandProcessor.java:137) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:79) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:47) 
      at com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:396) 
      at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217) 
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
      at java.base/java.lang.Thread.run(Thread.java:834) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) 
   
  Sep 08, 2020 7:09:34 AM com.hazelcast.internal.ascii.rest.HttpPostCommandProcessor 
  WARNING: [10.42.128.11]:5701 [dev] [4.0.2] An error occurred while handling request HttpCommand [HTTP_GET]{uri='/hazelcast/health/node-state'}AbstractTextCommand[HTTP_GET]{requestId=0} 
  java.lang.NullPointerException 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handleHealthcheck(HttpGetCommandProcessor.java:137) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:79) 
      at com.hazelcast.internal.ascii.rest.HttpGetCommandProcessor.handle(HttpGetCommandProcessor.java:47) 
      at com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:396) 
      at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217) 
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
      at java.base/java.lang.Thread.run(Thread.java:834) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) 
      at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) 
   
  </code></pre>
  <p>This is our custom dockerfile for Hazelcast that because we need some changes in it:</p>
  <pre><code>FROM alpine:3.11
  
  # Versions of Hazelcast and Hazelcast plugins
  ARG HZ_VERSION=4.0.2
  ARG CACHE_API_VERSION=1.1.1
  ARG JMX_PROMETHEUS_AGENT_VERSION=0.13.0
  ARG BUCKET4J_VERSION=4.10.0
  
  # Build constants
  ARG HZ_HOME=&quot;/opt/hazelcast&quot;
  
  # JARs to download
  # for lib directory:
  ARG HAZELCAST_ALL_URL=&quot;https://repo1.maven.org/maven2/com/hazelcast/hazelcast-all/${HZ_VERSION}/hazelcast-all-${HZ_VERSION}.jar&quot;
  # for user-lib directory:
  ARG JCACHE_API_URL=&quot;https://repo1.maven.org/maven2/javax/cache/cache-api/${CACHE_API_VERSION}/cache-api-${CACHE_API_VERSION}.jar&quot;
  ARG PROMETHEUS_AGENT_URL=&quot;https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/${JMX_PROMETHEUS_AGENT_VERSION}/jmx_prometheus_javaagent-${JMX_PROMETHEUS_AGENT_VERSION}.jar&quot;
  ARG BUCKET4J_CORE_URL=&quot;https://repo1.maven.org/maven2/com/github/vladimir-bukhtoyarov/bucket4j-core/${BUCKET4J_VERSION}/bucket4j-core-${BUCKET4J_VERSION}.jar&quot;
  ARG BUCKET4J_HAZELCAST_URL=&quot;https://repo1.maven.org/maven2/com/github/vladimir-bukhtoyarov/bucket4j-hazelcast/${BUCKET4J_VERSION}/bucket4j-hazelcast-${BUCKET4J_VERSION}.jar&quot;
  ARG BUCKET4J_JCACHE_URL=&quot;https://repo1.maven.org/maven2/com/github/vladimir-bukhtoyarov/bucket4j-jcache/${BUCKET4J_VERSION}/bucket4j-jcache-${BUCKET4J_VERSION}.jar&quot;
  
  # Runtime constants / variables
  ENV HZ_HOME=&quot;${HZ_HOME}&quot; \
      CLASSPATH_DEFAULT=&quot;${HZ_HOME}/*:${HZ_HOME}/lib/*:${HZ_HOME}/user-lib/*&quot; \
      JAVA_OPTS_DEFAULT=&quot;-Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=${HZ_HOME}/logging.properties -XX:MaxRAMPercentage=80.0 -XX:+UseParallelGC --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED&quot; \
      PROMETHEUS_PORT=&quot;&quot; \
      PROMETHEUS_CONFIG=&quot;${HZ_HOME}/jmx_agent_config.yaml&quot; \
      LOGGING_LEVEL=&quot;&quot; \
      CLASSPATH=&quot;&quot; \
      JAVA_OPTS=&quot;&quot;
  
  # Expose port
  EXPOSE 5701
  
  COPY *.sh *.yaml *.jar *.properties ${HZ_HOME}/
  RUN echo &quot;Updating Alpine system&quot; \
      &amp;&amp; apk upgrade --update-cache --available \
      &amp;&amp; echo &quot;Installing new APK packages&quot; \
      &amp;&amp; apk add openjdk11-jre bash curl procps nss 
  RUN mkdir &quot;${HZ_HOME}/user-lib&quot;\
      &amp;&amp; cd &quot;${HZ_HOME}/user-lib&quot; \
      &amp;&amp; for USER_JAR_URL in ${JCACHE_API_URL} ${PROMETHEUS_AGENT_URL} ${BUCKET4J_CORE_URL} ${BUCKET4J_HAZELCAST_URL} ${BUCKET4J_JCACHE_URL}; do curl -sf -O -L ${USER_JAR_URL}; done
  # Install
  RUN echo &quot;Downloading Hazelcast and related JARs&quot; \
      &amp;&amp; mkdir &quot;${HZ_HOME}/lib&quot; \
      &amp;&amp; cd &quot;${HZ_HOME}/lib&quot; \
      &amp;&amp; for JAR_URL in ${HAZELCAST_ALL_URL}; do curl -sf -O -L ${JAR_URL}; done \
      &amp;&amp; echo &quot;Granting read permission to ${HZ_HOME}&quot; \
      &amp;&amp; chmod 755 -R ${HZ_HOME} \
      &amp;&amp; echo &quot;Setting Pardot ID to 'docker'&quot; \
      &amp;&amp; echo 'hazelcastDownloadId=docker' &gt; &quot;${HZ_HOME}/hazelcast-download.properties&quot; \
      &amp;&amp; echo &quot;Cleaning APK packages&quot; \
      &amp;&amp; rm -rf /var/cache/apk/*
  
  WORKDIR ${HZ_HOME}
  
  # Start Hazelcast server
  CMD [&quot;/opt/hazelcast/start-hazelcast.sh&quot;]
  </code></pre>