MasterNotDiscoveredException when using the Java Node Client API

Hi All:
I am running a long running java App that connects to ES Cluster (currently at 1.5.2) using the Node Client API. It connects and creates the requisite client nodes

these are my settings :

ImmutableSettings settings = Settings.settingsBuilder().putArray("",hosts)
                                    .put("", getESClusterName())
                                    .put("node.client", true)
                                    .put("", false)
        Node node = nodeBuilder().settings(settings).node();
        this.esClient = node.client();

We have to upgrade to a newer version of ES, So I had downloaded ES2.1.1 (thats what is supported within our organization). Updated the ES jars and tried. I got the error that the variable "path.home" was not set. So I updated my Settings to include the path.home setting. However at this point, the app seemingly connects ( no indication either in kopf or the logs that it was successful) only that the one of code returns a node and the client is set. When I try to use the client to see if an index exists in the ES cluster, it failed with :

Exception in thread "main" MasterNotDiscoveredException[waited for [30s]]
	at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(
	at org.elasticsearch.cluster.service.InternalClusterService$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

From this post: Elasticsearch 2.1.1 on localhost Java client error MasterNotDiscoveredException waited for 30s

I assumed that because of the license plugin on my ES 2.1.1 instance I was unable to get it to work.
So, per, I tried adding the plugin dependency to my app and include the plugin settings as indicated. However, This continues to raise the same exception.

I have removed he offending license plugin ( and the marvel-agent plugin) to see if the app connects (as others have indicated success with that approach). But this failed as well with the same exception.

Any suggestions as to how this can be fixed.

The reason we are using the Node Client is that our process is a long running process and we went with the recommendation that perhaps a Node Client in these situations is better than using the Transport Client.

Thanks for all the responses

Current Test Configuration :

ES 2.1.1 running in a Single Node on linux
with Java 1.8

Did you set

No. I will try that out.. (would it be set to localhost/local hosts IP address ?)



Hi david:
That was it... I set and it worked.

Thanks much