Kibana can't cancel long-running queries — "action [cluster:admin/tasks/cancel[n]] is unauthorized for user [_async_search]"

I'm seeing a lot of exceptions like this while making changes to Kibana Dashboards:

ElasticsearchSecurityException[action [cluster:admin/tasks/cancel[n]] is unauthorized for user [_async_search], this action is granted by the cluster privileges [manage,all]]

…and long-running queries are piling up. How can I fix that, so that Kibana can successfully cancel its no-longer-needed queries?

I tried granting the missing privilege, but the _async_search user doesn't seem to exist, through the public API at least:

$ curl -s -XPUT 0:9200/_security/user/_async_search -H 'Content-Type: application/json' -d'{"roles":["manage"]}' | jq
{
  "error": {
    "type": "validation_exception",
    "reason": "Validation Failed: 1: password must be specified unless you are updating an existing user;"
  },
  "status": 400
}

This issue should be fixed in 7.12 and above - what version are you using?

Thanks, @TimV. This is happening with Elasticsearch 7.12.1 and Kibana 7.12.1.

$ curl -s 0:9200 | jq .version
{
  "number": "7.12.1",
  "build_flavor": "default",
  "build_type": "rpm",
  "build_hash": "3186837139b9c6b6d23c3200870651f10d3343b7",
  "build_date": "2021-04-20T20:56:39.040728659Z",
  "build_snapshot": false,
  "lucene_version": "8.8.0",
  "minimum_wire_compatibility_version": "6.8.0",
  "minimum_index_compatibility_version": "6.0.0-beta1"
}

Thanks for reporting @smokris . A PR has been opened to fix this issue.

Wonderful. Thanks.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.