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