Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p.98 curl 명령어 오류 #2

Open
seokhwanchoi opened this issue Sep 8, 2021 · 1 comment
Open

p.98 curl 명령어 오류 #2

seokhwanchoi opened this issue Sep 8, 2021 · 1 comment

Comments

@seokhwanchoi
Copy link

seokhwanchoi commented Sep 8, 2021

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

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

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}
이런 오류메세지가 뜹니다.
어떤 부분이 잘못된 건가요?

감사합니다.

@cantoluna1
Copy link
Collaborator

cantoluna1 commented Sep 9, 2021

curl -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@./bulk_index2"

마지막에 세미콜론이 들어갔습니다. 오타 죄송합니다. 98쪽 그림 3.13을 보시면 세미콜론 빠진 명령어가 동작하는 실제 화면 보실 수 있습니다. 다시 한번 죄송합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants