Elasticsearch 7.5.1: Failed to resolve host exception

I have recently upgraded Elasticsearch from 6.5.2 to 7.5.1 . But now when getting the cluster health via: curl localhost:9200/_cluster/health?pretty I get master_not_discovered_exception (503)

Do I need to consider something else while migrating to ES 7.5?
My elasticsaerch.yml file looks like:

bootstrap.memory_lock: true
node.name: elasticsearch-master.service.consul

network.host: 0.0.0.0
action.destructive_requires_name: true
cluster.initial_master_nodes: elasticsearch-master.service.consul

cluster.name: monitor-cluster
node.master: true
node.data: false
node.ingest: true
cluster.remote.connect: false

discovery.zen.ping.unicast.hosts:
- elasticsearch-master.service.consul

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

azure.client.default.timeout: 30s
azure.client.default.max_retries: 5
azure.client.default.endpoint_suffix: core.chinacloudapi.cn

When looking into the logs the entire exception stack is:

    at java.lang.Thread.run(Thread.java:830) [?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at org.elasticsearch.discovery.SeedHostsResolver.lambda$resolveHostsLists$0(SeedHostsResolver.java:144) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:803) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TcpTransport.addressesFromString(TcpTransport.java:470) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TcpTransport.parse(TcpTransport.java:528) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName(InetAddress.java:1282) ~[?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName(InetAddress.java:1348) ~[?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName0(InetAddress.java:1489) ~[?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]:         at java.net.InetAddress$CachedAddresses.get(InetAddress.java:798) ~[?:?]
    Mar 25 16:09:04 monitor-master elasticsearch[11503]: java.net.UnknownHostException: elasticsearch-master.service.consul
    Mar 25 16:09:04 monitor-master elasticsearch[11503]: [2020-03-25T16:09:04,316][WARN ][o.e.d.SeedHostsResolver  ] [monitor-master] failed to resolve host [elasticsearch-master.service.consul]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.lang.Thread.run(Thread.java:830) [?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at org.elasticsearch.discovery.SeedHostsResolver.lambda$resolveHostsLists$0(SeedHostsResolver.java:144) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:803) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TcpTransport.addressesFromString(TcpTransport.java:470) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TcpTransport.parse(TcpTransport.java:528) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName(InetAddress.java:1282) ~[?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName(InetAddress.java:1348) ~[?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName0(InetAddress.java:1489) ~[?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]:         at java.net.InetAddress$CachedAddresses.get(InetAddress.java:798) ~[?:?]
    Mar 25 16:09:03 monitor-master elasticsearch[11503]: java.net.UnknownHostException: elasticsearch-master.service.consul
    Mar 25 16:09:03 monitor-master elasticsearch[11503]: [2020-03-25T16:09:03,315][WARN ][o.e.d.SeedHostsResolver  ] [monitor-master] failed to resolve host [elasticsearch-master.service.consul]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.lang.Thread.run(Thread.java:830) [?:?]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at org.elasticsearch.discovery.SeedHostsResolver.lambda$resolveHostsLists$0(SeedHostsResolver.java:144) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:803) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TcpTransport.addressesFromString(TcpTransport.java:470) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at org.elasticsearch.transport.TcpTransport.parse(TcpTransport.java:528) ~[elasticsearch-7.5.1.jar:7.5.1]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName(InetAddress.java:1282) ~[?:?]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName(InetAddress.java:1348) ~[?:?]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.net.InetAddress.getAllByName0(InetAddress.java:1489) ~[?:?]
    Mar 25 16:09:02 monitor-master elasticsearch[11503]:         at java.net.InetAddress$CachedAddresses.get(InetAddress.java:798) ~[?:?]

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.