Which parameter we need to use for network_host in IPv6 for ElasticSearch

we had deployed elasticsearch in kubernetes environment on IPv6 vms , when we set network_host parameter as "site", ElasticSearch pods shows the below error
For site parameter we are getting

org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: No up-and-running site-local (private) addresses found, got [name:lo (lo), name:eth0 (eth0)]

When we use network_host parameter as "site" for IPv4 network, it works fine.
When we use any of the parameters recommended in the error for network_host i:e eth0 and lo , still we observe error messages in the logs.

  1. For eth0 parameter we are getting

    org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: No interface named 'eth0' found, got [name:lo (lo)]
    
  2. For lo parameter we are getting

    2019-10-15T12:51:58.303Z","logger":"o.e.d.SeedHostsResolver","timezone":"UTC","marker":"[nefk-belk-elasticsearch-master-0] ","log":"failed to resolve host [nefk-belk-elasticsearch-discovery]"}
    

java.net.UnknownHostException: nefk-belk-elasticsearch-discovery: Name or service not known

Could you please suggest which parameter should we use for network_host in IPv6.

No up-and-running site-local (private) addresses found means that none of the addresses assigned to eth0 is a site-local IPv6 address. If so, you probably want _global_ instead.

Hi @DavidTurner

Below are the one of the interface used in IPv6

eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether fa:16:3e:a3:b1:4a brd ff:ff:ff:ff:ff:ff
inet6 2019:290:4000:2000::5/128 scope global noprefixroute dynamic
valid_lft 5567sec preferred_lft 5267sec
inet6 fe80::f816:3eff:fea3:b14a/64 scope link noprefixroute

We used "2019:290:4000:2000::5" ip of eth0 interface as network_host
i.e. network_host: 2019:290:4000:2000::5 for ElasticSearch and observe the below error.

"log":"Failed to find a usable hardware address from the network interfaces; using random bytes: d6:44:ba:9b:68:72:ff:0f"}
{"type":"log","host":"p-test-belk-elasticsearch-client-6f8cbfd6b5-lpn5t","level":"WARN","systemid":"dce6ff606b094eb5a3a6a1f68ca1ae01","system":"BELK","time": "2019-10-22T06:53:18.269Z","logger":"o.e.b.ElasticsearchUncaughtExceptionHandler","timezone":"UTC","marker":"[p-test-belk-elasticsearch-client-6f8cbfd6b5-lpn5t] ","log":"uncaught exception in thread [main]"}
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to bind to [9300-9400]]; nested: SocketException[Protocol family unavailable];
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-7.0.1.jar:7.0.1]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.0.1.jar:7.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.0.1.jar:7.0.1]
Caused by: org.elasticsearch.transport.BindTransportException: Failed to bind to [9300-9400]
        at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:408) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:375) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:136) ~[?:?]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:61) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.transport.TransportService.doStart(TransportService.java:228) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:61) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.node.Node.start(Node.java:662) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:263) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:334) ~[elasticsearch-7.0.1.jar:7.0.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.0.1.jar:7.0.1]
        ... 6 more
Caused by: java.net.SocketException: Protocol family unavailable
        at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:461) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:453) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) ~[?:?]
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:130) ~[?:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019) ~[?:?]
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:258) ~[?:?]
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[?:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

So could you please suggest us what exactly we have to look in interface for network host?

Sorry, I don't recognise that exception. Binding to an IPv6 address works for fine me. I'm using Elasticsearch 7.4.0 running on Oracle Corporation/OpenJDK 64-Bit Server VM/12/12+33 on this Linux:

Linux worker-772973 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Maybe you need to upgrade something? If not, hopefully someone else can help since I have no other ideas.

I currently use elsticsearch-oss-7.0.1 in kubernetes environment.
Do you mean to say versions below Elasticsearch 7.4.0 may not work with IPv6?
Looking at this https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-network.html, I believe ELK 7.0.1 also should work with IPv6.

If you could suggest me what I should look for among the available network interfaces and best way to configure network.host from that. Any suggestions/pointers will be helpful.

No, that is not what I said at all. I don't think there's been any change to the IPv6 support in Elasticsearch in many versions.

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