# Elasticsearch won't start after adding email settings in elasticsearch.yml

**URL:** <https://discuss.elastic.co/t/elasticsearch-wont-start-after-adding-email-settings-in-elasticsearch-yml/163002>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [January 4, 2019, 6:47pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-adding-email-settings-in-elasticsearch-yml/163002 "2019-01-04T18:47:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandrik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandrik/32/39951_2.png) [@nandrik](https://discuss.elastic.co/u/nandrik)\
**Post date:** [January 4, 2019, 6:47pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-adding-email-settings-in-elasticsearch-yml/163002/1 "2019-01-04T18:47:52Z")

</div>

Hi, I'm trying to configure [automated reporting](https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html) and the first part of it appears to be [configuring/adding email settings](https://www.elastic.co/guide/en/elastic-stack-overview/6.5/actions-email.html#configuring-email) in elasticsearch.yml.

My `elsticsearch.yml` is relatively vanilla, i.e. only the `path.data`, `path.log` and the `network.host` have been uncommented and edited.

The settings I added, for the email configuration, are:

```auto
xpack.notification.email.account:
  ionos_account:
    profile: standard
    smtp:
      auth: true
      starttls.enable: true
      host: smtp.ionos.com
      port: 587
      user: reporting@<my_domain>.net 
      password: <my_password>

```

After I do `systemctl restart elasticsearch.service`, I don't see anything incremental in the `/var/log/elasticsearch/elasticsearch.log`.

In particular:

```auto
[2019-01-04T13:46:06,472][INFO][o.e.n.Node] [FSwndfv] stopping ...
[2019-01-04T13:46:06,484][INFO][o.e.x.w.WatcherService] [FSwndfv] stopping watch service, reason [shutdown initiated]
[2019-01-04T13:46:06,538][INFO][o.e.x.m.j.p.l.CppLogMessageHandler] [FSwndfv] [controller/1491] [Main.cc@148] Ml controller exiting
[2019-01-04T13:46:06,539][INFO][o.e.x.m.j.p.NativeController] [FSwndfv] Native controller process has stopped - no new native processes can be started
[2019-01-04T13:46:06,808][INFO][o.e.n.Node] [FSwndfv] stopped
[2019-01-04T13:46:06,808][INFO][o.e.n.Node] [FSwndfv] closing ...
[2019-01-04T13:46:06,817][INFO][o.e.n.Node] [FSwndfv] closed

```

I wonder if there's another log where I could find out what is happening and why it is not starting.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![nandrik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandrik/32/39951_2.png) [@nandrik](https://discuss.elastic.co/u/nandrik)\
**Post date:** [January 6, 2019, 3:03am UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-adding-email-settings-in-elasticsearch-yml/163002/2 "2019-01-06T03:03:12Z")

</div>

The mistake was that I did not have proper **indentation** in the `elasticsearch.yml`.

Given that the previous lines in my file (not shown above) had **a space before starting** , `xpack.notification.email.account:` also needed a space before.

This is what was causing elasticsearch not to start.

As for the rest of the lines, I believe I already had **4 spaces for every sub-section**.

---

<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 3, 2019, 3:03am UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-after-adding-email-settings-in-elasticsearch-yml/163002/3 "2019-02-03T03:03:17Z")

</div>

Closed on February 3, 2019, 3:03am UTC

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