# How to configure client & elasticsearch when machine has no internet access (no IP address)

**URL:** <https://discuss.elastic.co/t/how-to-configure-client-elasticsearch-when-machine-has-no-internet-access-no-ip-address/13128>\
**Category:** Elasticsearch\
**Created:** [August 8, 2013, 2:06pm UTC](https://discuss.elastic.co/t/how-to-configure-client-elasticsearch-when-machine-has-no-internet-access-no-ip-address/13128 "2013-08-08T14:06:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charles\_Moulliard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles_moulliard/32/1666_2.png) [@Charles\_Moulliard](https://discuss.elastic.co/u/Charles_Moulliard)\
**Post date:** [August 8, 2013, 2:06pm UTC](https://discuss.elastic.co/t/how-to-configure-client-elasticsearch-when-machine-has-no-internet-access-no-ip-address/13128/1 "2013-08-08T14:06:16Z")

</div>

Hi,

I have configured ES (server) and client with ("network.host") to be able  
to work on a machine without internet access (no ip address) but that fails

2013-08-08 16:01:40,255 [main] INFO node  
- [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: initialized  
2013-08-08 16:01:40,255 [main] INFO node  
- [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: starting ...  
2013-08-08 16:01:40,316 [main] INFO transport

- [Quasimodo] bound\_address {inet[/127.0.0.1:9301]}, publish\_address  
{inet[/127.0.0.1:9301]}  
2013-08-08 16:02:10,330 [main] WARN discovery
- [Quasimodo] waited for 30s and no initial state was set by the  
discovery  
2013-08-08 16:02:10,330 [main] INFO discovery
- [Quasimodo] KARAF/BM2IA3HFRkmvIhbSM-lYNQ  
2013-08-08 16:02:10,337 [main] INFO http
- [Quasimodo] bound\_address {inet[/127.0.0.1:9201]}, publish\_address  
{inet[/127.0.0.1:9201]}  
2013-08-08 16:02:10,337 [main] INFO node
- [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: started  
Exception in thread "main"  
org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [1m]  
at  
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)  
at  
org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:377)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:722)

Client

```
    // Configure Node Instance (= Client)
    NodeBuilder builder = nodeBuilder()
            .local(false)
            .data(false)
            .client(true)
            .clusterName("KARAF");

    Settings settings = settingsBuilder()
            .put("network.host", "127.0.0.1")
            .build();

    builder.settings(settings);

    // Get the Node and start it
    Node node = builder.node();

    Client client = node.client();

```

Server

```
    String settingsSource = getClass().getName().replace('.', '/') + 

```

".yml";  
Settings finalSettings = settingsBuilder()  
.loadFromClasspath(settingsSource)  
//.put(defaultSettings)  
//.put(settings)  
//.put("cluster.name", "test-cluster-" +  
NetworkUtils.getLocalAddress().getHostName())  
.put("cluster.name","KARAF")  
.put("http.enabled", "true")  
.put("node.data", true)  
.put("path.data", DEFAULT\_DATA\_DIRECTORY)  
.put("path.plugins",pluginDir.getAbsolutePath())  
.put("name", id)  
.put("discovery.type", "zen")  
.put("discovery.zen.multicast.enabled", false)  
.put("discovery.zen.ping.unicast.enabled", true)  
.put("discovery.zen.unicast.hosts", "127.0.0.1")  
.put("network.host","127.0.0.1")  
.build();

```
    if (finalSettings.get("gateway.type") == null) {
        // default to non gateway
        finalSettings = 

```

settingsBuilder().put(finalSettings).put("gateway.type", "none").build();  
}

```
    if (finalSettings.get("cluster.routing.schedule") != null) {
        // decrease the routing schedule so new nodes will be added 

```

quickly  
finalSettings =  
settingsBuilder().put(finalSettings).put("cluster.routing.schedule",  
"50ms").build();  
}

```
    Node node = nodeBuilder()
            .settings(finalSettings)
            .local(false)
            .build();

```

What should be the config in that case ?

Regards,

Charles

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tim\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_s/32/958_2.png) [@Tim\_S](https://discuss.elastic.co/u/Tim_S)\
**Post date:** [August 8, 2013, 2:14pm UTC](https://discuss.elastic.co/t/how-to-configure-client-elasticsearch-when-machine-has-no-internet-access-no-ip-address/13128/2 "2013-08-08T14:14:47Z")

</div>

Does it have a network adapter at all? You might need to install a loop  
back adapter so that you've got a network adapter to bind to 127.0.0.1  
(I've not done this with ES, but I have had to do this with other software  
on a machine with no network card).

On Thursday, August 8, 2013 3:06:16 PM UTC+1, Charles Moulliard wrote:

> Hi,
> 
> I have configured ES (server) and client with ("network.host") to be able  
> to work on a machine without internet access (no ip address) but that fails
> 
> 2013-08-08 16:01:40,255 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: initialized  
> 2013-08-08 16:01:40,255 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: starting ...  
> 2013-08-08 16:01:40,316 [main] INFO transport  
> - [Quasimodo] bound\_address {inet[/127.0.0.1:9301]}, publish\_address  
> {inet[/127.0.0.1:9301]}  
> 2013-08-08 16:02:10,330 [main] WARN discovery  
> - [Quasimodo] waited for 30s and no initial state was set by the  
> discovery  
> 2013-08-08 16:02:10,330 [main] INFO discovery  
> - [Quasimodo] KARAF/BM2IA3HFRkmvIhbSM-lYNQ  
> 2013-08-08 16:02:10,337 [main] INFO http  
> - [Quasimodo] bound\_address {inet[/127.0.0.1:9201]}, publish\_address  
> {inet[/127.0.0.1:9201]}  
> 2013-08-08 16:02:10,337 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: started  
> Exception in thread "main"  
> org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [1m]  
> at  
> org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)  
> at  
> org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:377)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:722)
> 
> Client
> 
> ```
> // Configure Node Instance (= Client)
> NodeBuilder builder = nodeBuilder()
> .local(false)
> .data(false)
> .client(true)
> .clusterName("KARAF");
> 
> Settings settings = settingsBuilder()
> .put("network.host", "127.0.0.1")
> .build();
> 
> builder.settings(settings);
> 
> // Get the Node and start it
> Node node = builder.node();
> 
> Client client = node.client();
> 
> ```
> 
> Server
> 
> ```
> String settingsSource = getClass().getName().replace('.', '/') + 
> 
> ```
> 
> ".yml";  
> Settings finalSettings = settingsBuilder()  
> .loadFromClasspath(settingsSource)  
> //.put(defaultSettings)  
> //.put(settings)  
> //.put("cluster.name", "test-cluster-" +  
> NetworkUtils.getLocalAddress().getHostName())  
> .put("cluster.name","KARAF")  
> .put("http.enabled", "true")  
> .put("node.data", true)  
> .put("path.data", DEFAULT\_DATA\_DIRECTORY)  
> .put("path.plugins",pluginDir.getAbsolutePath())  
> .put("name", id)  
> .put("discovery.type", "zen")  
> .put("discovery.zen.multicast.enabled", false)  
> .put("discovery.zen.ping.unicast.enabled", true)  
> .put("discovery.zen.unicast.hosts", "127.0.0.1")  
> .put("network.host","127.0.0.1")  
> .build();
> 
> ```
> if (finalSettings.get("gateway.type") == null) {
> // default to non gateway
> finalSettings = 
> 
> ```
> 
> settingsBuilder().put(finalSettings).put("gateway.type", "none").build();  
> }
> 
> ```
> if (finalSettings.get("cluster.routing.schedule") != null) {
> // decrease the routing schedule so new nodes will be added 
> 
> ```
> 
> quickly  
> finalSettings =  
> settingsBuilder().put(finalSettings).put("cluster.routing.schedule",  
> "50ms").build();  
> }
> 
> ```
> Node node = nodeBuilder()
> .settings(finalSettings)
> .local(false)
> .build();
> 
> ```
> 
> What should be the config in that case ?
> 
> Regards,
> 
> Charles

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Charles\_Moulliard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles_moulliard/32/1666_2.png) [@Charles\_Moulliard](https://discuss.elastic.co/u/Charles_Moulliard)\
**Post date:** [August 8, 2013, 2:17pm UTC](https://discuss.elastic.co/t/how-to-configure-client-elasticsearch-when-machine-has-no-internet-access-no-ip-address/13128/3 "2013-08-08T14:17:03Z")

</div>

lo0 is defined by default on MacBook

lo0: flags=8049\<UP,LOOPBACK,RUNNING,MULTICAST\> mtu 16384  
options=3\<RXCSUM,TXCSUM\>  
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1  
inet 127.0.0.1 netmask 0xff000000  
inet6 ::1 prefixlen 128

& more /etc/hosts contains a mapping

127.0.0.1 localhost

On Thursday, August 8, 2013 4:06:16 PM UTC+2, Charles Moulliard wrote:

> Hi,
> 
> I have configured ES (server) and client with ("network.host") to be able  
> to work on a machine without internet access (no ip address) but that fails
> 
> 2013-08-08 16:01:40,255 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: initialized  
> 2013-08-08 16:01:40,255 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: starting ...  
> 2013-08-08 16:01:40,316 [main] INFO transport  
> - [Quasimodo] bound\_address {inet[/127.0.0.1:9301]}, publish\_address  
> {inet[/127.0.0.1:9301]}  
> 2013-08-08 16:02:10,330 [main] WARN discovery  
> - [Quasimodo] waited for 30s and no initial state was set by the  
> discovery  
> 2013-08-08 16:02:10,330 [main] INFO discovery  
> - [Quasimodo] KARAF/BM2IA3HFRkmvIhbSM-lYNQ  
> 2013-08-08 16:02:10,337 [main] INFO http  
> - [Quasimodo] bound\_address {inet[/127.0.0.1:9201]}, publish\_address  
> {inet[/127.0.0.1:9201]}  
> 2013-08-08 16:02:10,337 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: started  
> Exception in thread "main"  
> org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [1m]  
> at  
> org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)  
> at  
> org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:377)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:722)
> 
> Client
> 
> ```
> // Configure Node Instance (= Client)
> NodeBuilder builder = nodeBuilder()
> .local(false)
> .data(false)
> .client(true)
> .clusterName("KARAF");
> 
> Settings settings = settingsBuilder()
> .put("network.host", "127.0.0.1")
> .build();
> 
> builder.settings(settings);
> 
> // Get the Node and start it
> Node node = builder.node();
> 
> Client client = node.client();
> 
> ```
> 
> Server
> 
> ```
> String settingsSource = getClass().getName().replace('.', '/') + 
> 
> ```
> 
> ".yml";  
> Settings finalSettings = settingsBuilder()  
> .loadFromClasspath(settingsSource)  
> //.put(defaultSettings)  
> //.put(settings)  
> //.put("cluster.name", "test-cluster-" +  
> NetworkUtils.getLocalAddress().getHostName())  
> .put("cluster.name","KARAF")  
> .put("http.enabled", "true")  
> .put("node.data", true)  
> .put("path.data", DEFAULT\_DATA\_DIRECTORY)  
> .put("path.plugins",pluginDir.getAbsolutePath())  
> .put("name", id)  
> .put("discovery.type", "zen")  
> .put("discovery.zen.multicast.enabled", false)  
> .put("discovery.zen.ping.unicast.enabled", true)  
> .put("discovery.zen.unicast.hosts", "127.0.0.1")  
> .put("network.host","127.0.0.1")  
> .build();
> 
> ```
> if (finalSettings.get("gateway.type") == null) {
> // default to non gateway
> finalSettings = 
> 
> ```
> 
> settingsBuilder().put(finalSettings).put("gateway.type", "none").build();  
> }
> 
> ```
> if (finalSettings.get("cluster.routing.schedule") != null) {
> // decrease the routing schedule so new nodes will be added 
> 
> ```
> 
> quickly  
> finalSettings =  
> settingsBuilder().put(finalSettings).put("cluster.routing.schedule",  
> "50ms").build();  
> }
> 
> ```
> Node node = nodeBuilder()
> .settings(finalSettings)
> .local(false)
> .build();
> 
> ```
> 
> What should be the config in that case ?
> 
> Regards,
> 
> Charles

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Charles\_Moulliard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles_moulliard/32/1666_2.png) [@Charles\_Moulliard](https://discuss.elastic.co/u/Charles_Moulliard)\
**Post date:** [August 9, 2013, 7:20am UTC](https://discuss.elastic.co/t/how-to-configure-client-elasticsearch-when-machine-has-no-internet-access-no-ip-address/13128/4 "2013-08-09T07:20:01Z")

</div>

If there is a lo0 interface, why does that not work ? Do we have to modify  
NettyTransport code of ES ?

On Thursday, August 8, 2013 4:06:16 PM UTC+2, Charles Moulliard wrote:

> Hi,
> 
> I have configured ES (server) and client with ("network.host") to be able  
> to work on a machine without internet access (no ip address) but that fails
> 
> 2013-08-08 16:01:40,255 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: initialized  
> 2013-08-08 16:01:40,255 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: starting ...  
> 2013-08-08 16:01:40,316 [main] INFO transport  
> - [Quasimodo] bound\_address {inet[/127.0.0.1:9301]}, publish\_address  
> {inet[/127.0.0.1:9301]}  
> 2013-08-08 16:02:10,330 [main] WARN discovery  
> - [Quasimodo] waited for 30s and no initial state was set by the  
> discovery  
> 2013-08-08 16:02:10,330 [main] INFO discovery  
> - [Quasimodo] KARAF/BM2IA3HFRkmvIhbSM-lYNQ  
> 2013-08-08 16:02:10,337 [main] INFO http  
> - [Quasimodo] bound\_address {inet[/127.0.0.1:9201]}, publish\_address  
> {inet[/127.0.0.1:9201]}  
> 2013-08-08 16:02:10,337 [main] INFO node  
> - [Quasimodo] {1.0.0.Beta1-SNAPSHOT}[33733]: started  
> Exception in thread "main"  
> org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [1m]  
> at  
> org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)  
> at  
> org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:377)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:722)
> 
> Client
> 
> ```
> // Configure Node Instance (= Client)
> NodeBuilder builder = nodeBuilder()
> .local(false)
> .data(false)
> .client(true)
> .clusterName("KARAF");
> 
> Settings settings = settingsBuilder()
> .put("network.host", "127.0.0.1")
> .build();
> 
> builder.settings(settings);
> 
> // Get the Node and start it
> Node node = builder.node();
> 
> Client client = node.client();
> 
> ```
> 
> Server
> 
> ```
> String settingsSource = getClass().getName().replace('.', '/') + 
> 
> ```
> 
> ".yml";  
> Settings finalSettings = settingsBuilder()  
> .loadFromClasspath(settingsSource)  
> //.put(defaultSettings)  
> //.put(settings)  
> //.put("cluster.name", "test-cluster-" +  
> NetworkUtils.getLocalAddress().getHostName())  
> .put("cluster.name","KARAF")  
> .put("http.enabled", "true")  
> .put("node.data", true)  
> .put("path.data", DEFAULT\_DATA\_DIRECTORY)  
> .put("path.plugins",pluginDir.getAbsolutePath())  
> .put("name", id)  
> .put("discovery.type", "zen")  
> .put("discovery.zen.multicast.enabled", false)  
> .put("discovery.zen.ping.unicast.enabled", true)  
> .put("discovery.zen.unicast.hosts", "127.0.0.1")  
> .put("network.host","127.0.0.1")  
> .build();
> 
> ```
> if (finalSettings.get("gateway.type") == null) {
> // default to non gateway
> finalSettings = 
> 
> ```
> 
> settingsBuilder().put(finalSettings).put("gateway.type", "none").build();  
> }
> 
> ```
> if (finalSettings.get("cluster.routing.schedule") != null) {
> // decrease the routing schedule so new nodes will be added 
> 
> ```
> 
> quickly  
> finalSettings =  
> settingsBuilder().put(finalSettings).put("cluster.routing.schedule",  
> "50ms").build();  
> }
> 
> ```
> Node node = nodeBuilder()
> .settings(finalSettings)
> .local(false)
> .build();
> 
> ```
> 
> What should be the config in that case ?
> 
> Regards,
> 
> Charles

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:21am UTC](https://discuss.elastic.co/t/how-to-configure-client-elasticsearch-when-machine-has-no-internet-access-no-ip-address/13128/5 "2017-07-06T02:21:53Z")

</div>


