ELK

ScriptException[scripts of type [inline], oper ation [update] and lang [groovy] are disabled] 오류

✨✨✨✨✨✨✨ 2021. 5. 2. 22:30
반응형
1. 문제 :
url -X POST "localhost:9200/classes/class/1/_update?pretty" -d '{"script": "ctx._source.unit+=1"}'   

위 명령문 입력 시 아래와 같은 오류

ScriptException[scripts of type [inline], oper ation [update] and lang [groovy] are disabled]

2. 원인 : elasticSearch 보안 문제 오류
3. 해결 :
#elasticSearch/config/elasticsearch.yml 생성
touch ~/config/elasticsearch.yml

# 해당 파일에 아래 내용 넣기
script.engine.groovy.inline.aggs: on                                                                                      
script.engine.groovy.inline.update : on 

docker 재시작

다시명령문 치면 깔끔하게 생성됨^^!

반응형