# Need to stop all Pending jobs in reporting

**URL:** <https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125>\
**Category:** Kibana\
**Tags:** elastic-stack-reporting\
**Created:** [May 18, 2020, 2:18pm UTC](https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125 "2020-05-18T14:18:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kolli\_dilip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kolli_dilip/32/33821_2.png) [@kolli\_dilip](https://discuss.elastic.co/u/kolli_dilip)\
**Post date:** [May 18, 2020, 2:18pm UTC](https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125/1 "2020-05-18T14:18:58Z")

</div>

Hi Experts,

I have reporting enabled, but getting the below response in the reporting status

`Pending - waiting for job to be processed`

can i have any suggestion to stop all the pending jobs so that I run a new report from a watcher

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/8/d8eb1f789b006238f7f40f56dfb4e96a4ece60de.png)

Regards  
dilip

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [May 19, 2020, 9:39pm UTC](https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125/2 "2020-05-19T21:39:24Z")

</div>

Good news, this was recently added to the UI: [https://github.com/elastic/kibana/pull/60077](https://github.com/elastic/kibana/pull/60077)

In the meantime, you will have to resort to deleting the underlying documents. Unless you have modified `xpack.reporting.index`, this should follow the `.reporting-*` pattern.

You can see the uncompleted jobs with the following query. I would recommend using Dev Tools in Kibana for this:

```auto
GET /.reporting*/_search
{
    "query": {
        "bool": {
            "must_not": {
                "exists": {
                    "field": "completed_at"
                }
            }
        }
    }
}

```

If the results look correct there, you can then remove those by passing the same query to the [\_delete\_by\_query](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html) Elasticsearch API.

```auto
POST /.reporting*/_delete_by_query
{
    "query": {
        "bool": {
            "must_not": {
                "exists": {
                    "field": "completed_at"
                }
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![kolli\_dilip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kolli_dilip/32/33821_2.png) [@kolli\_dilip](https://discuss.elastic.co/u/kolli_dilip)\
**Post date:** [May 20, 2020, 6:10am UTC](https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125/3 "2020-05-20T06:10:35Z")

</div>

Hi @tylersmalley

Thanks for your response , I am able to delete the pending reports, but still my new report is going into pending state.. instead of executing the report.

Am i missing something here, please advise

Regards  
Dilip

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [May 20, 2020, 3:59pm UTC](https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125/4 "2020-05-20T15:59:22Z")

</div>

What version are you running? Is there anything in the Kibana logs as to why the report isn't proceeding?

---

<div class="post-metadata">

**Author:** ![kolli\_dilip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kolli_dilip/32/33821_2.png) [@kolli\_dilip](https://discuss.elastic.co/u/kolli_dilip)\
**Post date:** [May 21, 2020, 6:00am UTC](https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125/5 "2020-05-21T06:00:45Z")

</div>

Hi @tylersmalley

version of ELK is 6.7

The below are the logs as per the kibana

```auto
{"type":"log","@timestamp":"2020-05-20T11:21:38Z","tags":["debug","legacy-proxy"],"pid":3156,"message":"\"getConnections\" has been called."}
{"type":"log","@timestamp":"2020-05-20T11:21:38Z","tags":["debug","legacy-proxy"],"pid":3156,"message":"\"getConnections\" has been called."}
{"type":"log","@timestamp":"2020-05-20T11:21:38Z","tags":["debug","monitoring-ui","kibana-monitoring"],"pid":3156,"message":"Received Kibana Ops event data"}
{"type":"log","@timestamp":"2020-05-20T11:21:38Z","tags":["debug","legacy-proxy"],"pid":3156,"message":"\"getConnections\" has been called."}
{"type":"log","@timestamp":"2020-05-20T11:21:38Z","tags":["debug","monitoring-ui","kibana-monitoring"],"pid":3156,"message":"Received Kibana Ops event data"}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","legacy-proxy"],"pid":3156,"message":"Event is being forwarded: connection"}
{"type":"error","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","security","auth","session"],"pid":3156,"level":"error","error":{"message":"Unauthorized","name":"Error","stack":"Error: Unauthorized\n at validate (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi-auth-cookie\\lib\\index.js:153:49)\n at Object.authenticate (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi-auth-cookie\\lib\\index.js:226:26)\n at module.exports.internals.Manager.execute (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi\\lib\\toolkit.js:35:106)\n at module.exports.internals.Auth.test (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi\\lib\\auth.js:92:54)\n at Session.get (F:/ELKELK/kibana-6.7.0-windows-x86_64/kibana-6.7.0-windows-x86_64/node_modules/x-pack/plugins/security/server/lib/authentication/session.js:56:47)\n at Authenticator.authenticate (F:/ELKELK/kibana-6.7.0-windows-x86_64/kibana-6.7.0-windows-x86_64/node_modules/x-pack/plugins/security/server/lib/authentication/authenticator.js:142:49)\n at Object.server.expose.request [as authenticate] (F:/ELKELK/kibana-6.7.0-windows-x86_64/kibana-6.7.0-windows-x86_64/node_modules/x-pack/plugins/security/server/lib/authentication/authenticator.js:297:60)\n at Object.authenticate (F:/ELKELK/kibana-6.7.0-windows-x86_64/kibana-6.7.0-windows-x86_64/node_modules/x-pack/plugins/security/server/lib/auth_redirect.js:29:60)\n at module.exports.internals.Manager.execute (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi\\lib\\toolkit.js:35:106)\n at module.exports.internals.Auth._authenticate (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi\\lib\\auth.js:238:58)\n at authenticate (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi\\lib\\auth.js:214:21)\n at Request._lifecycle (F:\\ELKELK\\kibana-6.7.0-windows-x86_64\\kibana-6.7.0-windows-x86_64\\node_modules\\hapi\\lib\\request.js:263:62)\n at process._tickCallback (internal/process/next_tick.js:68:7)"},"message":"Unauthorized"}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","legacy-service"],"pid":3156,"message":"Request will be handled by proxy GET:/api/reporting/jobs/download/kaf90d1e02fo043c5d7cbsjz."}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","security","basic"],"pid":3156,"message":"Trying to authenticate user request to /api/reporting/jobs/download/kaf90d1e02fo043c5d7cbsjz."}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","security","basic"],"pid":3156,"message":"Trying to authenticate via login attempt."}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","security","basic"],"pid":3156,"message":"Username and password not found in payload."}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","security","basic"],"pid":3156,"message":"Trying to authenticate via header."}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","security","basic"],"pid":3156,"message":"Request has been authenticated via header."}
{"type":"log","@timestamp":"2020-05-20T11:21:39Z","tags":["debug","reporting","download"],"pid":3156,"message":"Report kaf90d1e02fo043c5d7cbsjz has non-OK status: [503] Reason: [\"pending\"]"}
{"type":"response","@timestamp":"2020-05-20T11:21:39Z","tags":["api"],"pid":3156,"method":"get","statusCode":503,"req":{"url":"/api/reporting/jobs/download/kaf90d1e02fo043c5d7cbsjz","method":"get","headers":{"user-agent":"Apache-HttpClient/4.5.2 (Java/1.8.0_191)","accept-charset":"UTF-8","host":"mydns:80","x-cluster-client-ip":"10. **.**.135","kbn-xsrf":"reporting","connection":"Keep-Alive","accept-encoding":"gzip,deflate","content-length":"0"},"remoteAddress":"10. **.**.132","userAgent":"10. **.**.132"},"res":{"statusCode":503,"responseTime":66,"contentLength":9},"message":"GET /api/reporting/jobs/download/kaf90d1e02fo043c5d7cbsjz 503 66ms - 9.0B"}

```

Regards  
Dilip

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 18, 2020, 6:05am UTC](https://discuss.elastic.co/t/need-to-stop-all-pending-jobs-in-reporting/233125/6 "2020-06-18T06:05:41Z")

</div>

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