(Window环境) curl: (6) Could not resolve host: application curl: (6) Could not resolve host: ‘localhos

(Window环境) curl: (6) Could not resolve host: application curl: (6) Could not resolve host: ‘localhos,第1张

(Window环境) curl: (6) Could not resolve host: application curl: (6) Could not resolve host: ‘localhos

window环境下执行curl命令批量导入json到elasticsearch中

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json

报错信息

curl: (6) Could not resolve host: application
curl: (6) Could not resolve host: 'localhost

解决方法
把命令中的单引号改为双引号

curl -H "Content-Type: application/x-ndjson" -XPOST "localhost:9200/bank/account/_bulk?pretty" --data-binary @accounts.json

重新执行命令,导入成功

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5705064.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存