# ES5.5 NodeClient State out of sync

**URL:** <https://discuss.elastic.co/t/es5-5-nodeclient-state-out-of-sync/114168>\
**Category:** Elasticsearch\
**Created:** [January 4, 2018, 8:06pm UTC](https://discuss.elastic.co/t/es5-5-nodeclient-state-out-of-sync/114168 "2018-01-04T20:06:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcantrill](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jcantrill/32/26253_2.png) [@jcantrill](https://discuss.elastic.co/u/jcantrill)\
**Post date:** [January 4, 2018, 8:06pm UTC](https://discuss.elastic.co/t/es5-5-nodeclient-state-out-of-sync/114168/1 "2018-01-04T20:06:02Z")

</div>

We are migrating a plugin from 2.4 to 5.5 and are experiencing a difference in the NodeClient provided during initialization. Our plugin is given reference to a NodeClient in the Plugin#createComponents which is used in subsequent document retrievals. When I try to retrieve a document from and index created after the plugin is initialized, the client is unable to find the document. I know the document exists, however, as I can make a REST call and retrieve it. It's like the NodeClient state is out of sync though I am unable to discover what settings would make a difference. setRefresh and setRealtime seem to make no difference. Should NodeClients provided to plugins be able to retrieve cluster data without needing other intervention? Are there additional settings we are missing?

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [January 12, 2018, 9:09am UTC](https://discuss.elastic.co/t/es5-5-nodeclient-state-out-of-sync/114168/2 "2018-01-12T09:09:48Z")

</div>

do you wait until the index is recovered and visible? ie. wait for yellow state with an index on a cluster health call?

---

<div class="post-metadata">

**Author:** ![jcantrill](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jcantrill/32/26253_2.png) [@jcantrill](https://discuss.elastic.co/u/jcantrill)\
**Post date:** [January 12, 2018, 1:44pm UTC](https://discuss.elastic.co/t/es5-5-nodeclient-state-out-of-sync/114168/3 "2018-01-12T13:44:02Z")

</div>

I should have responded with my findings. This behavior was only seen with one specific index for which a dependent library intentionally masked the response for security reasons. I incorrectly assumed this behavior existed for all indices.

---

<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:** [February 9, 2018, 1:44pm UTC](https://discuss.elastic.co/t/es5-5-nodeclient-state-out-of-sync/114168/4 "2018-02-09T13:44:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
