# Error when generating reports

**URL:** <https://discuss.elastic.co/t/error-when-generating-reports/310791>\
**Category:** Kibana\
**Created:** [July 27, 2022, 7:17pm UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791 "2022-07-27T19:17:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcapp24](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tcapp24](https://discuss.elastic.co/u/tcapp24)\
**Post date:** [July 27, 2022, 7:17pm UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791/1 "2022-07-27T19:17:08Z")

</div>

Hello,

Currently we are trying to generate a report but keep getting the error message below:

> Error: Failed to decrypt report job data. Please ensure that xpack.reporting.encryptionKey is set and re-generate this report.

We have 2 instances of Kibana (Testing & Production) and each have `xpack.reporting.encryptionKey` set with the same value.

In our Testing instance we are able to generate a report successfully but in our Production instance we are not able to. At one point the Production instance did work for a split second in generating a report but never worked again after. We also tried generating reports with shorter time intervals but that didn't seem to fix the error.

Any idea on why we can generate reports in the Testing instance but not the Production Instance?  
Thanks.

---

<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:23am UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791/2 "2022-07-29T02:23:28Z")

</div>

Hi @tcapp24 ,

In case both instances are running against the same elasticsearch could you please make sure both Kibana instances has , for sure, the same `xpack.reporting.encryptionKey`? In addition to that could you also please make sure you have the correct packages installed for your distribution? ([Configure reporting in Kibana | Kibana Guide [8.3] | Elastic](https://www.elastic.co/guide/en/kibana/current/secure-reporting.html#install-reporting-packages))

Last, are both of your Kibana instances running the same version?

Cheers

---

<div class="post-metadata">

**Author:** ![tcapp24](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tcapp24](https://discuss.elastic.co/u/tcapp24)\
**Post date:** [July 29, 2022, 9:48pm UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791/4 "2022-07-29T21:48:25Z")

</div>

Hey @tiagocosta ,

So installed the required packages on both our testing and production kibana instances. I didn't restart the kibana instances wondering if I should restart both? The testing kibana instance still works correctly and is able to generate csv reports. Production worked for a sec I was able to generate one report but after that I got the same error again

> Error: Failed to decrypt report job data. Please ensure that xpack.reporting.encryptionKey is set and re-generate this report.

Forgot to mention but our kibana instances are spun up using docker and nomad so our job definition in nomad has the configuration that is used. We set the kibana reporting settings as environment variables listed below:

```auto
            "XPACK_REPORTING_CSV_MAXSIZEBYTES": "10485760",
            "XPACK_REPORTING_ENABLED": "true",
            "XPACK_REPORTING_ENCRYPTIONKEY": "secretkey",

```

Wondering if the way these are set are giving me in the production instance the error up above? Both instances are using the same encryption key and are on the same version 6.8.21.

---

<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 30, 2022, 12:36am UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791/5 "2022-07-30T00:36:11Z")

</div>

@tcapp24 I believe it is a good idea to restart the Kibana instances, yes.

In addition to that, have you also considered to upgrade into a more recent version of Kibana ?

Cheers

---

<div class="post-metadata">

**Author:** ![tcapp24](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tcapp24](https://discuss.elastic.co/u/tcapp24)\
**Post date:** [July 30, 2022, 2:12am UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791/6 "2022-07-30T02:12:14Z")

</div>

@tiagocosta Will restart those instances next Monday and get back to you. We have not considered upgrading as of late but we probably do need to upgrade. Will probably look to upgrade if the restart doesn't change anything.

---

<div class="post-metadata">

**Author:** ![tcapp24](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tcapp24](https://discuss.elastic.co/u/tcapp24)\
**Post date:** [August 2, 2022, 3:55pm UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791/7 "2022-08-02T15:55:42Z")

</div>

@tiagocosta Figured out the issue. In our Nomad job that ties to Kibana some of the nodes were not modified properly. So we just copied the Nomad Job definition and re-pasted it into the job definition and re-ran the nomad job and now we can generate csv reports in Prod instance.

Thanks for all the help

---

<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:** [August 30, 2022, 3:56pm UTC](https://discuss.elastic.co/t/error-when-generating-reports/310791/8 "2022-08-30T15:56:18Z")

</div>

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