Sending data to elasticsearch with json file using CURL, meet records number limitation

Hi All,

I want to using json file to send data to elasticsearch with curl, but got problem with limited records number in json file.

Elasticsearch version: 5.6.2, Memory: 16G, Single node with 5 shards.

using: curl -XPOST 'http://192.168.20.1:9200/my_index/_bulk?pretty' --data-binary @test3.json

the result is ok, and test3.json file contains 3 reocrds, the file size is 1KB.

using: curl -XPOST 'http://192.168.20.1:9200/my_index/_bulk?pretty' --data-binary @test4.json

the result is error, detail information as below, test4.json file contains 4 records, the file size is .1.3KB.

Some possible problems are:

  • Missing or unknown request method.

  • Missing URL.

  • Missing HTTP Identifier (HTTP/1.0).

  • Request is too large.

  • Content-Length missing for POST or PUT requests.

  • Illegal character in hostname; underscores are not allowed.

  • HTTP/1.1 Expect: feature is being asked from an HTTP/1.0 software.

What is the log? What is the exact message?

Had similar issue. If you are using proxy, try disabling proxy, which worked for me.

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