Illegal_state_exception when registering/updating watches


(Mcku) #1

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?

Illegal_state_exception is preventing deletion of watches
(Christoph) #2

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.

(Mcku) #3

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

(Mcku) #4

Moved to Watcher category.

(Alexander Reelsen) #5


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


(Mcku) #6


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.

(Martijn Van Groningen) #7

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.

(rastro) #8

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

(system) #9