[o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header

my Elasticearch version 5.5.2

OS:centos 6.5

Java version:openjdk version "1.8.0_51"

Elasticearch status: yellow

xxxx_deprecation.log:

[2017-08-28T20:05:36,357][WARN ][o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
[2017-08-28T20:05:38,357][WARN ][o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
[2017-08-28T20:05:39,360][WARN ][o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
[2017-08-28T20:05:40,321][WARN ][o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
[2017-08-28T20:05:40,357][WARN ][o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.
[2017-08-28T20:05:41,358][WARN ][o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.

How can i solve this problem? Let my Elasticearch state turn green! TKS

Hi @zheng_mao_Peng,

these two are unrelated. See the Definitive Guide on cluster health for more details what a "yellow" cluster health means and what you can about it.

The deprecation log is telling you that you should set a Content-Type header in your Elasticsearch client. How you do that depends on the client implementation and you should check the respective documentation. At the moment everything is still working but you need to fix this before upgrading to 6.0. See also the breaking changes for 6.0.

Daniel

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