# Which parameter we need to use for network\_host in IPv6 for ElasticSearch

**URL:** <https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048>\
**Category:** Elasticsearch\
**Created:** [October 17, 2019, 12:16pm UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048 "2019-10-17T12:16:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant1](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@prashant1](https://discuss.elastic.co/u/prashant1)\
**Post date:** [October 17, 2019, 12:16pm UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048/1 "2019-10-17T12:16:45Z")

</div>

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

2. For lo parameter we are getting

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.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [October 17, 2019, 12:49pm UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048/2 "2019-10-17T12:49:58Z")

</div>

`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.

---

<div class="post-metadata">

**Author:** ![prashant1](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@prashant1](https://discuss.elastic.co/u/prashant1)\
**Post date:** [October 22, 2019, 11:28am UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048/3 "2019-10-22T11:28:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [October 22, 2019, 11:45am UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048/4 "2019-10-22T11:45:00Z")

</div>

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:

```nohighlight
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.

---

<div class="post-metadata">

**Author:** ![prashant1](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@prashant1](https://discuss.elastic.co/u/prashant1)\
**Post date:** [October 22, 2019, 12:08pm UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048/5 "2019-10-22T12:08:41Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [October 22, 2019, 12:53pm UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048/6 "2019-10-22T12:53:47Z")

</div>

> [@prashant1](#):
>
> Do you mean to say versions below Elasticsearch 7.4.0 may not work with IPv6?

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 19, 2019, 12:53pm UTC](https://discuss.elastic.co/t/which-parameter-we-need-to-use-for-network-host-in-ipv6-for-elasticsearch/204048/7 "2019-11-19T12:53:52Z")

</div>

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