# The reporting job failed + Error: Max attempts (3) reached for job X. Failed with: Error: Unable to get index-pattern

**URL:** <https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588>\
**Category:** Kibana\
**Tags:** elastic-stack-security, elastic-stack-reporting\
**Created:** [July 26, 2022, 3:15am UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588 "2022-07-26T03:15:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [July 26, 2022, 3:15am UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/1 "2022-07-26T03:15:35Z")

</div>

Hello World!

I'm trying to:

> **[Configure reporting in Kibana | Kibana Guide \[7.17\] | Elastic](https://www.elastic.co/guide/en/kibana/7.17/secure-reporting.html#grant-user-access)**
>
> A list of the supported authentication mechanisms in Kibana.

yet while trying to run report (using "added\*" index-pattern), getting the following error:

> The reporting job failed  
> Error: Max attempts (3) reached for job X. Failed with: Error: Unable to get index-pattern

* * *

My "custom\_reporting\_user" role:

> GET /\_security/role/\_reporting-XYZ

* * *

```auto
{
  "_reporting-XYZ" : {
    "cluster" : [],
    "indices" : [
      {
        "names" : [
          "added*"
        ],
        "privileges" : [
          "view_index_metadata",
          "read"
        ],
        "field_security" : {
          "grant" : [
            "*"
          ],
          "except" : []
        },
        "query" : """{"bool":{"must":[{"match_phrase":{"tag":{"query":"XYZ"}}}]}}""",
        "allow_restricted_indices" : true
      }
    ],
    "applications" : [],
    "run_as" : [],
    "metadata" : { },
    "transient_metadata" : {
      "enabled" : true
    }
  }
}

```

I don't have any issues when report run as "superuser", only user with `_reporting-XYZ` role assigned.

Please advise)  
Thank you in advance)

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [July 26, 2022, 7:15pm UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/2 "2022-07-26T19:15:26Z")

</div>

Now using a different `custom_reporting_user` role and with a completely relaxed query, I was able to generate one report somehow, and the next report failed with a slightly different error:

> Error: Max attempts (3) reached for job X. Failed with: Error: Saved object [index-pattern/XYZ] not found

P.S. I _did_ saved the object before attempting to generate CSV report.

---

<div class="post-metadata">

**Author:** ![tiagocosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagocosta/32/40045_2.png) [@tiagocosta](https://discuss.elastic.co/u/tiagocosta)\
**Post date:** [July 29, 2022, 2:31am UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/3 "2022-07-29T02:31:27Z")

</div>

Hi @alexus ,

I believe this section of our reporting troubleshooting will be helpful to solve the problem you're facing [Reporting troubleshooting | Kibana Guide [8.3] | Elastic](https://www.elastic.co/guide/en/kibana/current/reporting-troubleshooting.html#_max_attempts_reached)

Cheers

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [August 5, 2022, 4:11am UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/4 "2022-08-05T04:11:27Z")

</div>

Thank you for looking into my topic.

The link you provided is to reference to creating a PDF or PNG report, however in my case, I'm trying to generate _CSV_ report instead.

I did set `xpack.reporting.queue.timeout` (2m) and `xpack.reporting.kibanaServer.port`, `xpack.reporting.kibanaServer.protocol` and `xpack.reporting.kibanaServer.hostname` to their respective values, unfortunately that did not help...

back to square zero(

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [August 10, 2022, 5:31pm UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/5 "2022-08-10T17:31:55Z")

</div>

I may have another clue...

In "Report Info", under "Processed by", I'm seeing another Kibana instance, instead of the one where report was initiated at the first place.

* * *

> **[Reporting settings in Kibana | Kibana Guide \[7.17\] | Elastic](https://www.elastic.co/guide/en/kibana/7.17/reporting-settings-kb.html#report-indices)**
>
> A reference of the reporting settings administrators configure in kibana.yml.

still get errors (even after setting `xpack.reporting.index`)

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [August 16, 2022, 9:15pm UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/6 "2022-08-16T21:15:47Z")

</div>

> [@alexus](#):
>
> In "Report Info", under "Processed by", I'm seeing another Kibana instance, instead of the one where report was initiated at the first place.

Hi, do the different kibana instances have different kibana.yml settings?

Most importantly, you will hit errors if you use a different kibana.index. If you use the separate instance to create a separated space for saved objects, you will need to:

1. check out the "Reporting index setting" documentation: [Reporting settings in Kibana | Kibana Guide [7.17] | Elastic](https://www.elastic.co/guide/en/kibana/7.17/reporting-settings-kb.html#report-indices)
2. consider using [Spaces](https://www.elastic.co/guide/en/kibana/7.17/xpack-spaces.html#xpack-spaces) for separating saved objects, and keep `kibana.index` and `reporting.index` the same in all Kibana instances.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [August 17, 2022, 6:20pm UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/7 "2022-08-17T18:20:24Z")

</div>

Hi,

.. while all of the Kibana instances are using same `kibana.yml` file, the values for some keys are set respectively, which includes `kibana.index` and `xpack.reporting.index` values.

I'm already using spaces, however in my case space still resides in it's own index set by `kibana.index` value, which I plan to change by migrating all spaces into fewer or single index.

I tried to set different value for `xpack.reporting.index` on one of Kibana instance, however even though I do see value is set to `.reporting-XYZ` and respective index was created, the report was still processed by different by Kibana instance, which has default value for `xpack.reporting.index` - (`.reporting`).

It's like Kibana instance isn't respecting it properly or something else..

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [August 24, 2022, 3:21am UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/8 "2022-08-24T03:21:50Z")

</div>

I believe I figured it out; the following needs to be present if you running multiple Kibana instances:

> `kibana.index`

- [Configure Kibana | Kibana Guide [7.17] | Elastic](https://www.elastic.co/guide/en/kibana/7.17/settings.html#settings)

> `xpack.reporting.index`

- [Reporting settings in Kibana | Kibana Guide [7.17] | Elastic](https://www.elastic.co/guide/en/kibana/7.17/reporting-settings-kb.html#report-indices)

> `xpack.task_manager.index`

- [Task Manager settings in Kibana | Kibana Guide [7.17] | Elastic](https://www.elastic.co/guide/en/kibana/7.17/task-manager-settings-kb.html#task-manager-settings)

---

<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:** [September 21, 2022, 3:22am UTC](https://discuss.elastic.co/t/the-reporting-job-failed-error-max-attempts-3-reached-for-job-x-failed-with-error-unable-to-get-index-pattern/310588/9 "2022-09-21T03:22:18Z")

</div>

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