Wednesday, April 24, 2024

Elastic Search - Error -- curl: (52) Empty reply from server

in windows Curl command , the below  bulk import will throw the exception

C:\elasticsearch-8.12.2>curl -XPOST "https://localhost:9200/products/_bulk" -H "Content-Type: application/json" --data-binary "@products-bulk.json"   


Error:  curl: (52) Empty reply from server

Solution :

Use the cacert and -insecure and -u uid:pwd added to your curl command.
I tested and is working fine for me in Windows


curl --cacert config/certs/http_ca.crt --insecure -u elastic:l9RyDpzFJ7TBwhC06e9E -XPOST "https://localhost:9200/products/_bulk" -H "Content-Type: application/json" --data-binary "@products-bulk.json"

 

 

No comments:

Post a Comment