# Error while sending the report

**URL:** <https://discuss.elastic.co/t/error-while-sending-the-report/113641>\
**Category:** Elasticsearch\
**Created:** [December 30, 2017, 7:31pm UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641 "2017-12-30T19:31:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![uvarisubash](https://avatars.discourse-cdn.com/v4/letter/u/c37758/32.png) [@uvarisubash](https://discuss.elastic.co/u/uvarisubash)\
**Post date:** [December 30, 2017, 7:31pm UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641/1 "2017-12-30T19:31:07Z")

</div>

I am getting an error while setting up email report:

Watch[_inlined_] reporting[error\_report.pdf] Error when polling pdf from

**Error message**  
**------------------------** ----------------------------------------------------------  
{  
"watch\_id": "_inlined_",  
"node": "K08xUVhJSfaW6Rs25SvL2w",  
"state": "executed",  
"status": {  
"state": {  
"active": true,  
"timestamp": "2017-12-30T19:27:07.075Z"  
},  
"last\_checked": "2017-12-30T19:27:07.076Z",  
"last\_met\_condition": "2017-12-30T19:27:07.076Z",  
"actions": {  
"email\_admin": {  
"ack": {  
"timestamp": "2017-12-30T19:27:07.075Z",  
"state": "awaits\_successful\_execution"  
},  
"last\_execution": {  
"timestamp": "2017-12-30T19:27:07.076Z",  
"successful": false,  
"reason": ""  
}  
}  
},  
"execution\_state": "executed",  
"version": -1  
},  
"trigger\_event": {  
"type": "manual",  
"triggered\_time": "2017-12-30T19:27:07.076Z",  
"manual": {  
"schedule": {  
"scheduled\_time": "2017-12-30T19:27:07.076Z"  
}  
}  
},  
"input": {  
"none": {}  
},  
"condition": {  
"always": {}  
},  
"metadata": {  
"xpack": {  
"type": "json"  
}  
},  
"result": {  
"execution\_time": "2017-12-30T19:27:07.076Z",  
"execution\_duration": 12163,  
"input": {  
"type": "none",  
"status": "success",  
"payload": {}  
},  
"condition": {  
"type": "always",  
"status": "success",  
"met": true  
},  
"actions": [  
{  
"id": "email\_admin",  
"type": "email",  
"status": "failure",  
"error": {  
"root\_cause": [  
{  
"type": "exception",  
"reason": "Watch[_inlined_] reporting[error\_report.pdf] Error when polling pdf from host[10.177.219.149], port[5601], method[POST], path[/api/reporting/generate/printablePdf], status[500], body[{"message":"Reporting generation failed","reason":"Max attempts reached (3)"}]"  
}  
],  
"type": "exception",  
"reason": "Watch[_inlined_] reporting[error\_report.pdf] Error when polling pdf from host[10.177.219.149], port[5601], method[POST], path[/api/reporting/generate/printablePdf], status[500], body[{"message":"Reporting generation failed","reason":"Max attempts reached (3)"}]"  
}  
}  
]  
},  
"messages": []  
}

---

<div class="post-metadata">

**Author:** ![uvarisubash](https://avatars.discourse-cdn.com/v4/letter/u/c37758/32.png) [@uvarisubash](https://discuss.elastic.co/u/uvarisubash)\
**Post date:** [January 8, 2018, 6:42am UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641/2 "2018-01-08T06:42:31Z")

</div>

Hi All,

I am getting socket\_timeout\_exception issue now after addressing report generate issue. Could you please help me on this?

```auto
{
  "watch_id": "_inlined_",
  "node": "K08xUVhJSfaW6Rs25SvL2w",
  "state": "executed",
  "status": {
    "state": {
      "active": true,
      "timestamp": "2018-01-08T06:39:13.930Z"
    },
    "last_checked": "2018-01-08T06:39:13.931Z",
    "last_met_condition": "2018-01-08T06:39:13.931Z",
    "actions": {
      "email_admin": {
        "ack": {
          "timestamp": "2018-01-08T06:39:13.930Z",
          "state": "awaits_successful_execution"
        },
        "last_execution": {
          "timestamp": "2018-01-08T06:39:13.931Z",
          "successful": false,
          "reason": ""
        }
      }
    },
    "execution_state": "executed",
    "version": -1
  },
  "trigger_event": {
    "type": "manual",
    "triggered_time": "2018-01-08T06:39:13.931Z",
    "manual": {
      "schedule": {
        "scheduled_time": "2018-01-08T06:39:13.931Z"
      }
    }
  },
  "input": {
    "none": {}
  },
  "condition": {
    "always": {}
  },
  "metadata": {
    "xpack": {
      "type": "json"
    }
  },
  "result": {
    "execution_time": "2018-01-08T06:39:13.931Z",
    "execution_duration": 15016,
    "input": {
      "type": "none",
      "status": "success",
      "payload": {}
    },
    "condition": {
      "type": "always",
      "status": "success",
      "met": true
    },
    "actions": [
      {
        "id": "email_admin",
        "type": "email",
        "status": "failure",
        "error": {
          "root_cause": [
            {
              "type": "socket_timeout_exception",
              "reason": "Read timed out"
            }
          ],
          "type": "socket_timeout_exception",
          "reason": "Read timed out"
        }
      }
    ]
  },
  "messages": []
}

```

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [January 8, 2018, 6:59am UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641/3 "2018-01-08T06:59:31Z")

</div>

Please make the effort to format your post to be as readable as possible - there's a live preview panel for exactly this reasons.  
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

From the error you've posted, the most likely problem is that Elasticsearch cannot connect to the mail server that you have configured.  
Double check your [email account configuration](https://www.elastic.co/guide/en/x-pack/6.1/actions-email.html#configuring-email) and check that the servers on which you are running your ES nodes have network access to the mail server.

---

<div class="post-metadata">

**Author:** ![uvarisubash](https://avatars.discourse-cdn.com/v4/letter/u/c37758/32.png) [@uvarisubash](https://discuss.elastic.co/u/uvarisubash)\
**Post date:** [January 8, 2018, 7:13am UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641/4 "2018-01-08T07:13:20Z")

</div>

thanks for your reply. I will follow your instructions.

I have followed the same. Please find the email setting in elasticsearch.yml below

* * *

"xpack.notification.email.account:  
exchange\_account:  
profile: outlook  
email\_defaults:  
from: [subash.duraipandi@domain.com](mailto:subash.duraipandi@domain.com)  
smtp:  
auth: true  
starttls.enable: true  
host: [mail-xxxxx.domain.com](http://mail-xxxxx.domain.com)  
port: 25  
user: elastic  
password: mrkibana

xpack.notification.email.html.sanitization.enabled: true

xpack.security.audit.enabled : true"

> [@TimV](#):
>
> Please make the effort to format your post to be as readable as possible - there's a live preview panel for exactly this reasons.  
> Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
> If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
> 
> From the error you've posted, the most likely problem is that Elasticsearch cannot connect to the mail server that you have configured.  
> Double check your [email account configuration](https://www.elastic.co/guide/en/x-pack/6.1/actions-email.html#configuring-email) and check that the servers on which you are running your ES nodes have network access to the mail server.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [January 8, 2018, 7:46am UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641/5 "2018-01-08T07:46:31Z")

</div>

_Please use the preformatted text option (`</>` button) for configuration files and for JSON blocks_.

> [@uvarisubash](#):
>
> ```auto
> host: mail-xxxxx.domain.com
> port: 25
> 
> ```

We have no way of knowing whether these values are correct, but my best guess based on the error you are seeing is that your ES servers cannot reach that host/port.

---

<div class="post-metadata">

**Author:** ![uvarisubash](https://avatars.discourse-cdn.com/v4/letter/u/c37758/32.png) [@uvarisubash](https://discuss.elastic.co/u/uvarisubash)\
**Post date:** [January 8, 2018, 9:03am UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641/6 "2018-01-08T09:03:21Z")

</div>

Hi Tim,  
Thanks.  
I'm getting below error after changing the setting . any idea?  
\<  
{  
"statusCode": 504,  
"error": "Gateway Time-out",  
"message": "Client request timeout"  
}  
/\>

---

<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:** [February 5, 2018, 9:03am UTC](https://discuss.elastic.co/t/error-while-sending-the-report/113641/7 "2018-02-05T09:03:44Z")

</div>

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