Illegal_state_exception when registering/updating watches

On a trial installation, watches were working fine till yesterday, but today we get an error. Elastic cluster and Kibana is up and running. On the sense console, whenever I try to DELETE or PUT a watch I get (I had to type it, sorry if typos are present or if not a valid JSON :wink:

    "error": {
        "root_cause": [
            "type": "illegal_state_exception",
            "reason": "not started"
        "type": "illegal_state_exception",
        "reason": "not started"
    "status": 500

GET _watcher/watch/myWatch --> OK

PUT _watcher/watch/myWatch --> failing, but was working fine till yesterday
DELETE _watcher/watch/myWatch --> failing, but was working fine till yesterday

Any ideas on how to fix it?

Hi, just wanted to let you know there is a special section of the forum dedicated to Watcher. You might want to try your question there as well.

@cbuescher Thank you. I will post another one on the watcher forum. Please disregard this post.

Moved to Watcher category.


which elasticsearch version are you using? Do you see additional information in the log files? Like a stack trace for example?



That was ES2.0.

It was apparently due to too many watches being in the execution queue, and I guess that's the reason why PUT and DELETE did not work. It was in a loop such that as new watches pop up the overall situation was unstable. I had to fix it in a hard way :wink:

That was a trial so did not matter but be careful about the trigger intervals.

Maybe this helps if this happens again: If you can't delete a watch because it continuously being used. You can also delete via the delete watch api by using the force option in the query string.

1 Like

Might want to add this info to the doc, especially since you didn't give an example (?force and ?force=true don't work).