Skip to content

p.98 curl 명령어 오류 #2

@seokhwanchoi

Description

@seokhwanchoi

안녕하십니까
책 엘라스틱 개발부터 운영까지 구매하여 잘 보고 있는 독자입니다.

책을 통해 실습을 하던 중 오류가 있어서 문의드립니다.

p.98 - 2부 - 엘라스틱 스택 구성요소에서 bulk_index2 파일을 만든 후,
curl을 이용한 벌크 요청 명령어를 수행하면 오류가 납니다.

curl -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@./bulk_index2";
위처럼 해도 오류가 나고

curl -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary @./bulk_index2;
위처럼 @./bulk_index2에 ""를 제거해도 오류가 납니다.

Warning: Couldn't read data from file "./bulk_index2;", this makes an empty
Warning: POST.
{"error":{"root_cause":[{"type":"parse_exception","reason":"request body is required"}],"type":"parse_exception","reason":"request body is required"},"status":400}
이런 오류메세지가 뜹니다.
어떤 부분이 잘못된 건가요?

감사합니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions