[Resolved][ES7.0.1] Exception [o.e.d.SeedHostsResolver ] [node-1] failed to resolve host [node-1] when starting es

Hi team,

I got below error when starting es7.0.1, how to correct the yml configuration file to resolve it?

[2019-09-04T08:40:22,339][INFO ][o.e.h.AbstractHttpServerTransport] [node-1] publish_address {10.59.181.210:9200}, bound_addresses {[::]:9200}
[2019-09-04T08:40:22,343][INFO ][o.e.n.Node               ] [node-1] started
[2019-09-04T08:40:23,890][WARN ][o.e.d.SeedHostsResolver  ] [node-1] failed to resolve host [node-1]
java.net.UnknownHostException: node-1
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:1.8.0_144]
        at java.net.InetAddress$3.lookupAllHostAddr(InetAddress.java:971) ~[?:1.8.0_144]
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1366) ~[?:1.8.0_144]
        at java.net.InetAddress.getAllByName0(InetAddress.java:1319) ~[?:1.8.0_144]
        at java.net.InetAddress.getAllByName(InetAddress.java:1235) ~[?:1.8.0_144]
        at java.net.InetAddress.getAllByName(InetAddress.java:1169) ~[?:1.8.0_144]
        at org.elasticsearch.transport.TcpTransport.parse(TcpTransport.java:536) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.transport.TcpTransport.addressesFromString(TcpTransport.java:489) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:744) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.discovery.SeedHostsResolver.lambda$resolveHostsLists$0(SeedHostsResolver.java:143) ~[elasticsearch-7.0.1.jar:7.0.1]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:681) ~[elasticsearch-7.0.1.jar:7.0.1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
        at java.lang.Thread.run(Thread.java:808) [?:1.8.0_144]

Thanks,
Cherie

You have node-1 defined as the address of a seed host (e.g. in discovery.seed_hosts) but this does not resolve to an IP address that Elasticsearch can use. Either delete this entry from your seed hosts, or else fix your DNS so that this entry does resolve to an IP address.

1 Like

Hi David,

You mean either I

  1. Specify the IP in discovery.seed_hosts
    OR
  2. comment discovery.seed_hosts: ["node-1"] from elasticsearch.yml?

Thanks,
Cherie

Thanks,
Cherie

  1. Yes, the IP address should avoid this, as would a name that DNS knows about that resolves to that IP address.

  2. Possibly, although I can think of some reasons why that might not work. You could also try setting it to an empty list: discovery.seed_hosts: [].

I enabled 2 configurations in yml file: discovery.seed_hosts AND discovery.zen.ping.unicast.hosts.

when starting elasticsearch, it says

`

it is forbidden to set both [discovery.seed_hosts] and [discovery.zen.ping.unicast.hosts]

`

  1. which one of these 2 is mandatory when starting elasticsearch?
  2. what is the lowest level configuration to start elasticsearch?

Thanks,
Cherie

You shouldn't be setting discovery.zen.ping.unicast.hosts. This setting is renamed to discovery.seed_hosts and the old name is deprecated.

1 Like

Oh.. OK. thanks

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