ElasticSearch使用curl导数据报400可能原因


curl -H 'Content-Type: application/x-ndjson'  -s -XPOST 10.0.3.73:9200/yyzj2019-04/trans/_bulk?pretty --data-binary @../test_6000.txt

报错

 1 {
 2   "error" : {
 3     "root_cause" : [ {
 4       "type" : "parse_exception",
 5       "reason" : "Failed to derive xcontent"
 6     } ],
 7     "type" : "parse_exception",
 8     "reason" : "Failed to derive xcontent"
 9   },
10   "status" : 400
11 }

可能原因:

1.仔细检查,命令中的ip、port、还有@后面的文件名路径

2.检查数据文件txt的编码格式,要使用utf-8

3。。。

后续再补充


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM