# Java Indexing API : error in existing instance, ok with fresh one

**URL:** <https://discuss.elastic.co/t/java-indexing-api-error-in-existing-instance-ok-with-fresh-one/12231>\
**Category:** Elasticsearch\
**Created:** [June 3, 2013, 9:13am UTC](https://discuss.elastic.co/t/java-indexing-api-error-in-existing-instance-ok-with-fresh-one/12231 "2013-06-03T09:13:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yann\_Barraud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yann_barraud/32/1108_2.png) [@Yann\_Barraud](https://discuss.elastic.co/u/Yann_Barraud)\
**Post date:** [June 3, 2013, 9:13am UTC](https://discuss.elastic.co/t/java-indexing-api-error-in-existing-instance-ok-with-fresh-one/12231/1 "2013-06-03T09:13:00Z")

</div>

Hi

We are implementing an indexer using JAVA API. When we launch the indexer  
on a fresh 0.90.1 instance with no data, it just works fine, but when it is  
launched on an existing ES instance, we get a "NoNodeAvailable" exception.  
The instance is up with a yellow status.

org.elasticsearch.client.transport.NoNodeAvailableException: No node available  
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:202)  
at org.elasticsearch.client.transport.support.InternalTransportIndicesAdminClient.execute(InternalTransportIndicesAdminClient.java:85)  
at org.elasticsearch.client.support.AbstractIndicesAdminClient.exists(AbstractIndicesAdminClient.java:147)  
at org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder.doExecute(IndicesExistsRequestBuilder.java:43)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:62)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:57)

Any idea to investigate ?

Thanks.

Regards,

Yann

--  
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:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 3, 2013, 9:20am UTC](https://discuss.elastic.co/t/java-indexing-api-error-in-existing-instance-ok-with-fresh-one/12231/2 "2013-06-03T09:20:19Z")

</div>

You are using IndicesExistsRequestBuilder.Maybe you are looking for an  
index or index alias that does not exist.

Jörg

On Monday, June 3, 2013 11:13:00 AM UTC+2, Yann Barraud wrote:

> Hi
> 
> We are implementing an indexer using JAVA API. When we launch the indexer  
> on a fresh 0.90.1 instance with no data, it just works fine, but when it is  
> launched on an existing ES instance, we get a "NoNodeAvailable" exception.  
> The instance is up with a yellow status.
> 
> org.elasticsearch.client.transport.NoNodeAvailableException: No node available  
> at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:202)  
> at org.elasticsearch.client.transport.support.InternalTransportIndicesAdminClient.execute(InternalTransportIndicesAdminClient.java:85)  
> at org.elasticsearch.client.support.AbstractIndicesAdminClient.exists(AbstractIndicesAdminClient.java:147)  
> at org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder.doExecute(IndicesExistsRequestBuilder.java:43)  
> at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:62)  
> at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:57)
> 
> Any idea to investigate ?
> 
> Thanks.
> 
> Regards,
> 
> Yann

--  
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:** ![Yann\_Barraud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yann_barraud/32/1108_2.png) [@Yann\_Barraud](https://discuss.elastic.co/u/Yann_Barraud)\
**Post date:** [June 3, 2013, 9:41am UTC](https://discuss.elastic.co/t/java-indexing-api-error-in-existing-instance-ok-with-fresh-one/12231/3 "2013-06-03T09:41:04Z")

</div>

Hi,

We first check if the index exists using  
client.admin().indices().prepareExists(indexName).execute().actionGet().isExists()  
Then we are attempting creating the index using  
client.admin().indices().prepareCreate(indexName).execute().actionGet().isAcknowledged()

Is it wrong ?

Le lundi 3 juin 2013 11:20:19 UTC+2, Jörg Prante a écrit :

You are using IndicesExistsRequestBuilder.Maybe you are looking for an

> index or index alias that does not exist.
> 
> Jörg
> 
> On Monday, June 3, 2013 11:13:00 AM UTC+2, Yann Barraud wrote:
> 
> > Hi
> > 
> > We are implementing an indexer using JAVA API. When we launch the indexer  
> > on a fresh 0.90.1 instance with no data, it just works fine, but when it is  
> > launched on an existing ES instance, we get a "NoNodeAvailable" exception.  
> > The instance is up with a yellow status.
> > 
> > org.elasticsearch.client.transport.NoNodeAvailableException: No node available  
> > at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:202)  
> > at org.elasticsearch.client.transport.support.InternalTransportIndicesAdminClient.execute(InternalTransportIndicesAdminClient.java:85)  
> > at org.elasticsearch.client.support.AbstractIndicesAdminClient.exists(AbstractIndicesAdminClient.java:147)  
> > at org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder.doExecute(IndicesExistsRequestBuilder.java:43)  
> > at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:62)  
> > at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:57)
> > 
> > Any idea to investigate ?
> > 
> > Thanks.
> > 
> > Regards,
> > 
> > Yann

--  
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:** ![Yann\_Barraud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yann_barraud/32/1108_2.png) [@Yann\_Barraud](https://discuss.elastic.co/u/Yann_Barraud)\
**Post date:** [June 3, 2013, 11:04am UTC](https://discuss.elastic.co/t/java-indexing-api-error-in-existing-instance-ok-with-fresh-one/12231/4 "2013-06-03T11:04:02Z")

</div>

OK, Thanks David Pilato : we were using specific clusternames.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Have to set this in client config file.

Le lundi 3 juin 2013 11:41:04 UTC+2, Yann Barraud a écrit :

> Hi,
> 
> We first check if the index exists using
> 
> client.admin().indices().prepareExists(indexName).execute().actionGet().isExists()  
> Then we are attempting creating the index using
> 
> client.admin().indices().prepareCreate(indexName).execute().actionGet().isAcknowledged()
> 
> Is it wrong ?
> 
> Le lundi 3 juin 2013 11:20:19 UTC+2, Jörg Prante a écrit :
> 
> You are using IndicesExistsRequestBuilder.Maybe you are looking for an
> 
> > index or index alias that does not exist.
> > 
> > Jörg
> > 
> > On Monday, June 3, 2013 11:13:00 AM UTC+2, Yann Barraud wrote:
> > 
> > > Hi
> > > 
> > > We are implementing an indexer using JAVA API. When we launch the  
> > > indexer on a fresh 0.90.1 instance with no data, it just works fine, but  
> > > when it is launched on an existing ES instance, we get a "NoNodeAvailable"  
> > > exception.  
> > > The instance is up with a yellow status.
> > > 
> > > org.elasticsearch.client.transport.NoNodeAvailableException: No node available  
> > > at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:202)  
> > > at org.elasticsearch.client.transport.support.InternalTransportIndicesAdminClient.execute(InternalTransportIndicesAdminClient.java:85)  
> > > at org.elasticsearch.client.support.AbstractIndicesAdminClient.exists(AbstractIndicesAdminClient.java:147)  
> > > at org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder.doExecute(IndicesExistsRequestBuilder.java:43)  
> > > at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:62)  
> > > at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:57)
> > > 
> > > Any idea to investigate ?
> > > 
> > > Thanks.
> > > 
> > > Regards,
> > > 
> > > Yann

--  
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:33am UTC](https://discuss.elastic.co/t/java-indexing-api-error-in-existing-instance-ok-with-fresh-one/12231/5 "2017-07-06T02:33:21Z")

</div>


