Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve this "Content type detection for rest requests is deprecated" issue of elastisearch?

I'm getting to much logs in my Elasticsearch server and this log takes too much memory on disk. every 2-3 hour,server is getting around 4 GB logs.

Logs looks like-

[2017-05-08T03:08:14,616][WARN ][o.e.d.r.RestController ] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header

like image 723
Nikhil.J Avatar asked May 09 '17 05:05

Nikhil.J


2 Answers

For those using curl, a simple addition of

-H 'Content-Type: application/json'

Made the trick for me

like image 57
webofmars Avatar answered Nov 16 '22 17:11

webofmars


Updating my clients, in my case elasticsearch-model and elasticsearch-rails resolved the issue for me.

like image 2
dduft Avatar answered Nov 16 '22 18:11

dduft