window10+elasticsearch sample 아래 명령어를 실행시 아래와 같은 오류가 발생 하였다.
curl -XPUT 'http://localhost:9200/blog/user/dilbert' -H 'Content-Type: application/json' -d '{ "name" : "Dilbert Brown" }'
curl: (1) Protocol "'http" not supported or disabled in libcurl
curl: (6) Could not resolve host: name
curl: (3) Bad URL, colon is first character
curl: (6) Could not resolve host: Dilbert Brown
curl: (3) [globbing] unmatched close brace/bracket in column 1
원인은 'http -> "http 큰따옴표를 해야 오류가 발생 안한다.
그리고 데이터 부분도 '{ "name" : "Dilbert Brown" }' -> "{ ""name"" : ""Dilbert Brown"" }" 이렇게 안하면
아래와 같은 오류 발생
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}},"status":400}curl: (6) Could not resolve host: name
curl: (3) Bad URL, colon is first character
curl: (3) [globbing] unmatched close brace/bracket in column 14
결국 아래와 같이 생행해야 성공
curl -XPUT "http://localhost:9200/blog/user/dilbert" -H "Content-Type: application/json" -d "{ ""name"" : ""Dilbert Brown""}"
'빅데이터 > Elasticsearch' 카테고리의 다른 글
mac kibana 실행시 "개발자를 확인할 수 없기 때문에 ‘re2.node’을(를) 열 수 없습니다." 오류 (0) | 2021.05.01 |
---|---|
window10 tomcat9+filebeat7.0+logstash7.0+ ELK7.0+Kibana7.0 연동방법 (0) | 2019.10.15 |
logstash ERROR: Unknown command '{' 오류 (0) | 2019.10.10 |