Hi,
I am running Apache Tomcat 7 from within Eclipse and running elasticsearch
(port 9300/9200) on the same machine.
I am initializing the node within my ServletContextListener contextInitialized
method using the following code:
// Then we start our node for tests
*node* = NodeBuilder.*nodeBuilder*().client(*true*).node();
// We wait now for the yellow (or green) status
*node*
.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet();
… I am getting the following exception:
org.elasticsearch.discovery.MasterNotDiscoveredException: waited for
[30s] at
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(
TransportMasterNodeOperationAction.java:169)
at
org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(*
InternalClusterService.java:371*)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(*
ThreadPoolExecutor.java:886*)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(*
ThreadPoolExecutor.java:908*)
at java.lang.Thread.run(*Thread.java:662*)
If I remove client(true) part:
// Then we start our node for tests
*node* = NodeBuilder.*nodeBuilder*().client(*true*).node();
// We wait now for the yellow (or green) status
*node*
.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet();
… it starts without an exception but it also starts another server
listening on 9301 (I have checked it using netstat).
Anybody has got clue what is going on here?
Regards,
Janusz
--