Verifying that Watcher is set up fails

Getting a 400 error when try to verify watcher installation as follow:
% curl -XGET 'http://localhost:9200/_watcher/_stats?pretty'

"error" : "ElasticsearchIllegalArgumentException[No feature for name [stats]]",
"status" : 404

Through trial & error I've changed the 'stats' in command to '_stats' and get another error:
% curl -XGET 'http://localhost:9200/_watcher/_stats?pretty'

"error" : "IndexMissingException[[_watcher] missing]",
"status" : 404

What is the problem?

If Elasticsearch tells you that the index _watcher is missing, then the _wachter endpoint is not registered.
Watcher is nog correctly installed. Have you restarted your node? In one of the first log messages it will tell you which plugins are loaded.

I've restarted elasticsearch, but I don't know how to restart the nodes?

If you restarted Elasticsearch, you are actually restarting a node. There should be a line like:

[2015-07-27 06:54:58,758][INFO ][plugins                  ] [Spoilsport] loaded [watcher], sites []

This will tell you the loaded plugins. How is yours looking?

Is there any solution to this. Getting exactly the same problems when trying to verify whether watcher has been correctly installed. When I restart my Elasticsearch, I get the loaded plugins, but it looks like this:

If you don't see during startup that watcher has been loaded then it means watcher hasn't been installed. The run watcher successfully you need to install the watcher and license plugins on all nodes in your cluster like is done in the Watcher getting started.

To better verify if your required plugins are installed you can configure watcher to be a mandatory plugin in the elasticsearch.yml file. Like is configured here:

Same issue: {"error":"ElasticsearchIllegalArgumentException[No feature for name [_watcher]]","status":400}

Elasticsearch logs:
root@es-monitor-01:/usr/share/elasticsearch# tail -100f /var/log/elasticsearch/es-monitor-01/es-monitor-01.log
[2015-08-26 10:25:00,352][INFO ][node ] [es-monitor-01-es-monitor-01] version[1.5.2], pid[24338], build[62ff986/2015-04-27T09:21:06Z]
[2015-08-26 10:25:00,353][INFO ][node ] [es-monitor-01-es-monitor-01] initializing ...
[2015-08-26 10:25:00,414][INFO ][plugins ] [es-monitor-01-es-monitor-01] loaded [marvel, watcher, license], sites [marvel]
[2015-08-26 10:25:00,481][INFO ][watcher.trigger.schedule ] [es-monitor-01-es-monitor-01] using [ticker] schedule trigger engine
[2015-08-26 10:25:07,055][INFO ][marvel.agent ] [es-monitor-01-es-monitor-01] collecting disabled by settings
[2015-08-26 10:25:07,069][INFO ][node ] [es-monitor-01-es-monitor-01] initialized
[2015-08-26 10:25:07,069][INFO ][node ] [es-monitor-01-es-monitor-01] starting ...
[2015-08-26 10:25:07,149][INFO ][transport ] [es-monitor-01-es-monitor-01] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/]}
[2015-08-26 10:25:07,172][INFO ][discovery ] [es-monitor-01-es-monitor-01] es-monitor-01/hAnO5IaOQdGnR1sFSsrgpQ
[2015-08-26 10:25:10,973][INFO ][cluster.service ] [es-monitor-01-es-monitor-01] new_master [es-monitor-01-es-monitor-01][hAnO5IaOQdGnR1sFSsrgpQ][es-monitor-01][inet[/]], reason: zen-disco-join (elected_as_master)
[2015-08-26 10:25:11,594][INFO ][http ] [es-monitor-01-es-monitor-01] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/]}
[2015-08-26 10:25:11,595][INFO ][node ] [es-monitor-01-es-monitor-01] started
[2015-08-26 10:25:13,683][INFO ][license.plugin.core ] [es-monitor-01-es-monitor-01] license for [watcher] - valid
[2015-08-26 10:25:13,693][ERROR][watcher.license ] [es-monitor-01-es-monitor-01]

Watcher license will expire on [Friday, September 25, 2015]. All configured actions on

all registered watches are throttled (not executed) on Watcher license expiration.

Watches will continue be evaluated and watch history will continue being recorded.

Have a new license? please update it. Otherwise, please reach out to your support contact.

[2015-08-26 10:25:13,693][INFO ][watcher ] [es-monitor-01-es-monitor-01] starting watch service...
[2015-08-26 10:25:14,102][INFO ][gateway ] [es-monitor-01-es-monitor-01] recovered [15] indices into cluster_state
[2015-08-26 10:25:14,215][INFO ][watcher ] [es-monitor-01-es-monitor-01] watch service has started
[2015-08-26 10:25:16,034][DEBUG][ ] [es-monitor-01-es-monitor-01] All shards failed for phase: [query_fetch]
org.elasticsearch.action.NoShardAvailableActionException: [.marvel-2015.08.26][0] null

[...] at
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Watcher seems to load but then there is this error. I tried to clean up all shards, restarted same issue.

Using elasticsearch-1.5.2.deb

When you log into the box where this node is running and run
curl 'localhost:9200/_watcher'

then what is the response you see?

Then I get:

curl 'localhost:9200/_watcher'

Which seems correct. Si what is the difference?

Did you connect to a node that didn't have Watcher installed?
(watcher needs to be installed in all nodes in your cluster)

No, I did not connect to a node without watcher. This is a "monitoring" elastic search instance that is its own cluster (or a cluster of 1), This one monitoring node has watcher installed. There is a cluster of 5 nodes that are sending the monitoring data to that one node via marvel plugin.

It is deployed in a openstack cluster though so the external IP to reach the node is not the same as the internal IP.

What I then did: updated ES to 1.7.1, restarted, and now it appears to work. :smile:

I have the same issue with "{"error":"ElasticsearchIllegalArgumentException[No feature for name [_watcher]]","status":400}"

The log shows
[2015-09-29 11:23:56,109][INFO ][plugins ] [Thog] loaded [marvel, license], sites [marvel]

The plugins list shows
~/elasticsearch-1.7.1 ❯❯❯ ./bin/plugin --list
Installed plugins:
- marvel
- license
- watcher

I didn't install any license though,
"licenses" : [ ]

No related error in the log

There isn't any jar file in the watcher folder though...
~/e/plugins ❯❯❯ find license -name *.jar
~/e/plugins ❯❯❯ find watcher -name *.jar
~/e/plugins ❯❯❯

Hi Gadin,

After installing the Watcher plugin on each node in your cluster, did you restart each node? Plugins are loaded at ES startup.

I hope that helps!