Configuring email account for Watcher breaks Elasticsearch

Hi there! I recently upgraded my ELK setup where Logstash and Elasticsearch are at 2.0.0 and Kibana at 4.2.0.
So I wanted to install Watcher 2.0.0 so I could try out the new features.

I wanted to try the email function just to check if watcher was working properly.

I "sudo nano /etc/elasticsearch/elasticsearch.yml" the yml of elasticsearch and entered this at the bottom of the file:

watcher.actions.email.service.account:
  work:
    profile: gmail
    email_defaults:
      from: myemail@gmail.com
    smtp:
      auth: true
      starttls.enable: true
      host: smtp.gmail.com
      port: 587
      user: myemail@gmail.com
      password: mypassword

Obviously the email and password changed for privacy reasons.
When I save this edit and restart elasticsearch it gives me a red start with the text "elasticsearch is not running"
Before the edit and restart it gave me a white star with "elasticsearch is running".

So what gives? Just to put it out there, I uncommented the network.host and port for connection reasons but that did not stop elasticsearch from running before I added the email configuration.

Thanks :smile:

If Elasticsearch doesn't start I'm sure there will be something in the logs about it.

Ah thanks @magnusbaeck ! Well here is a noob question but I'm currently using a bash terminal in Windows to manage my ELK setup. I haven't got much experience in either so I'm at kind of a loss as how to grab the logs. Can you guide me in the right direction so I can take a gander at the logs?

Elasticsearch usually stores its logs in /var/log/elasticsearch.

@magnusbaeck

Took me a while (laptop broke down) but I managed to get to my logs using another computer and a connection to the server.

I can't see anything out of the ordinary to be honest. maybe you see something of interest?

[2015-11-10 04:24:23,760][INFO ][node                     ] [Graydon Creed] version[2.0.0], pid[2735], build[de54438/2015-10-22T08:09:48Z]
[2015-11-10 04:24:23,762][INFO ][node                     ] [Graydon Creed] initializing ...
[2015-11-10 04:24:23,906][INFO ][plugins                  ] [Graydon Creed] loaded [], sites []
[2015-11-10 04:24:24,099][INFO ][env                      ] [Graydon Creed] using [1] data paths, mounts [[/ (/dev/vda1)]], net usable_space [35.1gb], net total_space [39.2gb], spins? [possibly], types [ext4]
[2015-11-10 04:24:27,448][INFO ][node                     ] [Graydon Creed] initialized
[2015-11-10 04:24:27,448][INFO ][node                     ] [Graydon Creed] starting ...
[2015-11-10 04:24:27,536][INFO ][transport                ] [Graydon Creed] publish_address {localhost/127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2015-11-10 04:24:27,554][INFO ][discovery                ] [Graydon Creed] elasticsearch/l1jmIiaST8yXG_tHIYaPGA
[2015-11-10 04:24:30,619][INFO ][cluster.service          ] [Graydon Creed] new_master {Graydon Creed}{l1jmIiaST8yXG_tHIYaPGA}{127.0.0.1}{localhost/127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2015-11-10 04:24:30,689][INFO ][http                     ] [Graydon Creed] publish_address {localhost/127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2015-11-10 04:24:30,690][INFO ][node                     ] [Graydon Creed] started
[2015-11-10 04:24:30,736][INFO ][gateway                  ] [Graydon Creed] recovered [0] indices into cluster_state
[2015-11-10 04:26:37,919][INFO ][cluster.metadata         ] [Graydon Creed] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [config]
[2015-11-10 04:27:08,201][INFO ][node                     ] [Graydon Creed] stopping ...
[2015-11-10 04:27:08,261][INFO ][node                     ] [Graydon Creed] stopped
[2015-11-10 04:27:08,261][INFO ][node                     ] [Graydon Creed] closing ...
[2015-11-10 04:27:08,268][INFO ][node                     ] [Graydon Creed] closed
[2015-11-10 04:27:10,465][INFO ][node                     ] [Vibro] version[2.0.0], pid[2921], build[de54438/2015-10-22T08:09:48Z]
[2015-11-10 04:27:10,467][INFO ][node                     ] [Vibro] initializing ...
[2015-11-10 04:27:10,607][INFO ][plugins                  ] [Vibro] loaded [], sites []
[2015-11-10 04:27:10,760][INFO ][env                      ] [Vibro] using [1] data paths, mounts [[/ (/dev/vda1)]], net usable_space [34.7gb], net total_space [39.2gb], spins? [possibly], types [ext4]
[2015-11-10 04:27:13,828][INFO ][node                     ] [Vibro] initialized
[2015-11-10 04:27:13,829][INFO ][node                     ] [Vibro] starting ...
[2015-11-10 04:27:13,913][INFO ][transport                ] [Vibro] publish_address {localhost/127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2015-11-10 04:27:13,930][INFO ][discovery                ] [Vibro] elasticsearch/BgDUH7qHR2Oo6GOp_qJeBw
[2015-11-10 04:27:17,009][INFO ][cluster.service          ] [Vibro] new_master {Vibro}{BgDUH7qHR2Oo6GOp_qJeBw}{127.0.0.1}{localhost/127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2015-11-10 04:27:17,101][INFO ][http                     ] [Vibro] publish_address {localhost/127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2015-11-10 04:27:17,101][INFO ][node                     ] [Vibro] started
[2015-11-10 04:27:17,205][INFO ][gateway                  ] [Vibro] recovered [1] indices into cluster_state
[2015-11-10 04:30:06,365][INFO ][node                     ] [Vibro] stopping ...
[2015-11-10 04:30:06,458][INFO ][node                     ] [Vibro] stopped
[2015-11-10 04:30:06,458][INFO ][node                     ] [Vibro] closing ...
[2015-11-10 04:30:06,472][INFO ][node                     ] [Vibro] closed

I've exactly the same problem.

Sadly I have yet to find out why. I moved on to other project as this was just an experiment