ELK 스택 (ElasticSearch, Logstash, Kibana) 으로 데이터 분석
logstash를 start하면 계속 아래와 같이 출력됩니다. 구글링을 아무리해봐도 해결책이 안나오는데... 어떻게 하면 될까요..?? 참고로 윈도우10에서 우분투 환경입니다. md2_global@DESKTOP-Q1V5J1G:~/downloads$ sudo systemctl start logstash.service System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
ELK 스택 (ElasticSearch, Logstash, Kibana) 으로 데이터 분석
elasticsearch 7.x 버젼부터는 curl 리퀘스트에서 헤더를 명확히 설정해주어야하고 또 mappign을 생성할 때에는 include_type_name을 true로 설정해주어야한다고 합니다. 이에 대한 에러문구는 아래와 같습니다. { "error" : { "root_cause" : [ { "type" : "illegal_argument_exception", "reason" : "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true." } ], "type" : "illegal_argument_exception", "reason" : "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true." }, "status" : 400 } 그래서 저는 mapping을 생성할 때 아래와 같이 커맨드라인을 날렸습니다. curl -H 'Content-Type:application/json' -XPUT 'http://localhost:9200/classes/class/_mapping?include_type_name=true&pretty' -d @classesRating_mapping.json 그런데 아래와 같은 에러가 다시 발생했습니다. { "error" : { "root_cause" : [ { "type" : "mapper_parsing_exception", "reason" : "No handler for type [string] declared on field [professor]" } ], "type" : "mapper_parsing_exception", "reason" : "No handler for type [string] declared on field [professor]" }, "status" : 400 } 이에 대해서 원인을 찾아보니 elasticsearch가 mapping 타입 중 string을 삭제하고 text로 변경하여 사용하고있다고 합니다. 관련 정보 링크 : https://stackoverflow.com/questions/47452770/no-handler-for-type-string-declared-on-field-name 그래서 classesRating_mapping.json에서 type이 string으로 되어있는 부분들을 모두 text로 변경한 후 위 커맨드라인을 다시 실행해보니 정상적으로 실행되었습니다. 혹시 이 강의를 보시는 분들 중 elasticsearch 6.x 이상의 버젼을 사용하여 수강하시는 분들은 이 부분들을 참고해보시면 좋을 것 같습니다.
ELK 스택 (ElasticSearch, Logstash, Kibana) 으로 데이터 분석
curl -XPOSt http://localhost:9200/classes/class/1/ -d '{"title" : "Algorithm", "professor" : "John"}' 입력 시 www-form-urlencoded is not supported status 406 에러가 발생합니다. 높은 버전에선 -H 'Content-Type: application/json' 을 추가해줘야 할듯합니다.