I am trying to deploy Elastic search cluster using ECK 2.7 version and it fails with below error. can someone pls help me find the issue.
I am following the sample yaml provide in elastic documentation
elasticsearch.yaml
cat <<EOF | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: quickstart
spec:
version: 8.7.1
nodeSets:
- name: default
count: 1
config:
node.store.allow_mmap: false
EOF
root@master-node-k8s helm]# kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
quickstart-es-default-0 0/1 CrashLoopBackOff 5 (2s ago) 7m31s 10.244.1.32 worker-node1-k8s
[root@master-node-k8s helm]# kubectl describe pod quickstart-es-default-0
Events:
Type Reason Age From Message
Normal Scheduled 43s default-scheduler Successfully assigned default/quickstart-es-default-0 to worker-node1-k8s
Normal SuccessfulAttachVolume 42s attachdetach-controller AttachVolume.Attach succeeded for volume "k8s-7548469c24"
Normal Pulled 33s kubelet Container image "docker.elastic.co/elasticsearch/elasticsearch:8.7.1" already present on machine
Normal Created 32s kubelet Created container elastic-internal-init-filesystem
Normal Started 32s kubelet Started container elastic-internal-init-filesystem
Normal Pulled 30s kubelet Container image "docker.elastic.co/elasticsearch/elasticsearch:8.7.1" already present on machine
Normal Created 30s kubelet Created container elastic-internal-suspend
Normal Started 30s kubelet Started container elastic-internal-suspend
Normal Pulled 29s kubelet Container image "docker.elastic.co/elasticsearch/elasticsearch:8.7.1" already present on machine
Normal Created 29s kubelet Created container elasticsearch
Normal Started 29s kubelet Started container elasticsearch
Warning Unhealthy 18s kubelet Readiness probe failed: {"timestamp": "2023-05-12T08:12:09+00:00", "message": "readiness probe failed", "curl_rc": "7"}
Warning Unhealthy 13s kubelet Readiness probe failed: {"timestamp": "2023-05-12T08:12:14+00:00", "message": "readiness probe failed", "curl_rc": "7"}
Warning Unhealthy 8s kubelet Readiness probe failed: {"timestamp": "2023-05-12T08:12:19+00:00", "message": "readiness probe failed", "curl_rc": "7"}
kubectl logs -f quickstart-es-default-0
{"@timestamp":"2023-05-12T10:16:51.303Z", "log.level":"ERROR", "message":"fatal exception while booting Elasticsearch", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.bootstrap.Elasticsearch","elasticsearch.cluster.uuid":"rhE7oNIzQwmPWfjVOGZQ7A","elasticsearch.node.id":"i3Yp6HILS7qdLMTQKeZUoA","elasticsearch.node.name":"quickstart-es-default-0","elasticsearch.cluster.name":"quickstart","error.type":"org.elasticsearch.transport.BindTransportException","error.message":"Failed to resolve publish address","error.stack_trace":"org.elasticsearch.transport.BindTransportException: Failed to resolve publish address\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.http.AbstractHttpServerTransport.bindServer(AbstractHttpServerTransport.java:180)\n\tat org.elasticsearch.transport.netty4@8.7.1/org.elasticsearch.http.netty4.Netty4HttpServerTransport.doStart(Netty4HttpServerTransport.java:271)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:43)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.node.Node.start(Node.java:1452)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.bootstrap.Elasticsearch.start(Elasticsearch.java:438)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:231)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67)\nCaused by: java.net.UnknownHostException: quickstart-es-default-0.quickstart-es-default.default.svc: Temporary failure in name resolution\n\tat java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)\n\tat java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52)\n\tat java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1061)\n\tat java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1683)\n\tat java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1004)\n\tat java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1673)\n\tat java.base/java.net.InetAddress.getAllByName(InetAddress.java:1533)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.common.network.NetworkService.resolveInternal(NetworkService.java:267)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.common.network.NetworkService.resolveInetAddresses(NetworkService.java:215)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.common.network.NetworkService.resolvePublishHostAddresses(NetworkService.java:167)\n\tat org.elasticsearch.server@8.7.1/org.elasticsearch.http.AbstractHttpServerTransport.bindServer(AbstractHttpServerTransport.java:178)\n\t... 6 more\n"}
ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/quickstart.log
{"@timestamp":"2023-05-12T10:16:51.307Z", "log.level": "INFO", "message":"stopping ...", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"Thread-0","log.logger":"org.elasticsearch.node.Node","elasticsearch.cluster.uuid":"rhE7oNIzQwmPWfjVOGZQ7A","elasticsearch.node.id":"i3Yp6HILS7qdLMTQKeZUoA","elasticsearch.node.name":"quickstart-es-default-0","elasticsearch.cluster.name":"quickstart"}
{"@timestamp":"2023-05-12T10:16:51.307Z", "log.level": "INFO", "message":"shutting down watcher thread", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[file-settings-watcher]","log.logger":"org.elasticsearch.reservedstate.service.FileSettingsService","elasticsearch.cluster.uuid":"rhE7oNIzQwmPWfjVOGZQ7A","elasticsearch.node.id":"i3Yp6HILS7qdLMTQKeZUoA","elasticsearch.node.name":"quickstart-es-default-0","elasticsearch.cluster.name":"quickstart"}
{"@timestamp":"2023-05-12T10:16:51.308Z", "log.level": "INFO", "message":"watcher service stopped", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"Thread-0","log.logger":"org.elasticsearch.reservedstate.service.FileSettingsService","elasticsearch.cluster.uuid":"rhE7oNIzQwmPWfjVOGZQ7A","elasticsearch.node.id":"i3Yp6HILS7qdLMTQKeZUoA","elasticsearch.node.name":"quickstart-es-default-0","elasticsearch.cluster.name":"quickstart"}