# WARN o.e.c.s.ElasticsearchNodesSniffer - unknown role \[ml\] on node \<name\>

**URL:** <https://discuss.elastic.co/t/warn-o-e-c-s-elasticsearchnodessniffer-unknown-role-ml-on-node-name/221090>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [February 26, 2020, 5:48pm UTC](https://discuss.elastic.co/t/warn-o-e-c-s-elasticsearchnodessniffer-unknown-role-ml-on-node-name/221090 "2020-02-26T17:48:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobbyi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bobbyi/32/27949_2.png) [@bobbyi](https://discuss.elastic.co/u/bobbyi)\
**Post date:** [February 26, 2020, 5:48pm UTC](https://discuss.elastic.co/t/warn-o-e-c-s-elasticsearchnodessniffer-unknown-role-ml-on-node-name/221090/1 "2020-02-26T17:48:48Z")

</div>

We have an API server using version 7.5.1 of the elasticsearch-rest-high-level-client and elasticsearch-rest-client-sniffer Java libraries, which matches the version of ES used on our cluster. It is working fine, but our application log ends up filled with messages saying  
`WARN o.e.c.s.ElasticsearchNodesSniffer - unknown role [ml] on node <name>`

This application is just running queries and doesn't need or care about the ml functionality in ES.

How do I get this message to stop being generated? Also, why is it happening? Shouldn't this version of the sniffer understand all of the roles that the matching version of ES has?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 26, 2020, 6:33pm UTC](https://discuss.elastic.co/t/warn-o-e-c-s-elasticsearchnodessniffer-unknown-role-ml-on-node-name/221090/2 "2020-02-26T18:33:48Z")

</div>

I think this is a bug. The `ElasticsearchNodesSniffer` only knows about the three core roles:

> <https://github.com/elastic/elasticsearch/blob/bbbdf949a9d63dbc795ce8dd7dbd529d5f40b98b/client/sniffer/src/main/java/org/elasticsearch/client/sniff/ElasticsearchNodesSniffer.java#L209-L222>

IOW it was not updated when [node roles became pluggable](https://github.com/elastic/elasticsearch/pull/43175). Would you open an issue on Github about it?

In the meantime, the only workaround I can see is to set the `org.elasticsearch.client.sniff.ElasticsearchNodesSniffer` logger to `ERROR` to suppress this `WARN`-level log. I don't think you lose anything useful from this logger.

---

<div class="post-metadata">

**Author:** ![bobbyi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bobbyi/32/27949_2.png) [@bobbyi](https://discuss.elastic.co/u/bobbyi)\
**Post date:** [February 27, 2020, 2:25am UTC](https://discuss.elastic.co/t/warn-o-e-c-s-elasticsearchnodessniffer-unknown-role-ml-on-node-name/221090/3 "2020-02-27T02:25:20Z")

</div>

Thanks. Here is the issue I filed on Github:

> <https://github.com/elastic/elasticsearch/issues/52864>
>
> We have an API server using version 7.5.1 of the elasticsearch-rest-high-level-client and elasticsearch-rest-client-sniffer Java libraries, which matches the version of ES...

---

<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:** [March 26, 2020, 2:25am UTC](https://discuss.elastic.co/t/warn-o-e-c-s-elasticsearchnodessniffer-unknown-role-ml-on-node-name/221090/4 "2020-03-26T02:25:27Z")

</div>

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