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.
For more options, visit https://groups.google.com/groups/opt_out.