Kibana was working just fine but now the below error appears each time I search in the "Discover" panel.
It appeard on version 5.3.0, I upgraded to 5.3.1 but still got the error.
Looking at the "script" in the error it seems that there is a } missing at the end.
I'm new to Kibana so I don't really know where this script is coming from or how to fix it...
Error: Request to Elasticsearch failed: {
"error": {
"root_cause": [{
"type": "script_exception",
"reason": "compile error",
"script_stack": ["... return \"no exception\";\n}", " ^---- HERE"],
"script": "def message = doc['message.keyword'].value;\nif (doc['message.message'].value =~ /Caught exception in Exception Strategy/) {\n int lastSlashIndex = path.lastIndexOf(':');\n if (lastSlashIndex > 0) {\n return path.substring(lastSlashIndex+1);\n} else {\n return \"no exception\";\n}",
"lang": "painless"
}],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [{
"shard": 0,
"index": "filebeat-2017.05.01",
"node": "-iVxCmFyRLK-KscU_yKuPA",
"reason": {
"type": "script_exception",
"reason": "compile error",
"script_stack": ["... return \"no exception\";\n}",
" ^---- HERE"],
"script": "def message = doc['message.keyword'].value;\nif (doc['message.message'].value =~ /Caught exception in Exception Strategy/) {\n int lastSlashIndex = path.lastIndexOf(':');\n if (lastSlashIndex > 0) {\n return path.substring(lastSlashIndex+1);\n} else {\n return \"no exception\";\n}",
"lang": "painless",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "unexpected token ['<EOF>'] was expecting one of ['}']."
}
}
}],
"caused_by": {
"type": "script_exception",
"reason": "compile error",
"script_stack": ["... return \"no exception\";\n}",
" ^---- HERE"],
"script": "def message = doc['message.keyword'].value;\nif (doc['message.message'].value =~ /Caught exception in Exception Strategy/) {\n int lastSlashIndex = path.lastIndexOf(':');\n if (lastSlashIndex > 0) {\n return path.substring(lastSlashIndex+1);\n} else {\n return \"no exception\";\n}",
"lang": "painless",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "unexpected token ['<EOF>'] was expecting one of ['}']."
}
}
},
"status": 500
}
at http: //myserver:5601/bundles/kibana.bundle.js?v=14844:28:15872
at Function.Promise.try(http: //myserver:5601/bundles/commons.bundle.js?v=14844:75:22403)
at http: //myserver:5601/bundles/commons.bundle.js?v=14844:75:21773
at Array.map(native) at Function.Promise.map(http: //myserver:5601/bundles/commons.bundle.js?v=14844:75:21728)
at callResponseHandlers(http: //myserver:5601/bundles/kibana.bundle.js?v=14844:28:15484)
at http: //myserver:5601/bundles/kibana.bundle.js?v=14844:28:3614
at processQueue(http: //myserver:5601/bundles/commons.bundle.js?v=14844:38:23621)
at http: //myserver:5601/bundles/commons.bundle.js?v=14844:38:23888
at Scope.$eval(http: //myserver:5601/bundles/commons.bundle.js?v=14844:39:4619)
Script with a missing } at the end
def message = doc['message.keyword'].value;
if (doc['message.message'].value = ~/Caught exception in Exception Strategy/) {
int lastSlashIndex = path.lastIndexOf(':');
if (lastSlashIndex > 0) {
return path.substring(lastSlashIndex + 1);
} else {
return "no exception";
}