# Watcher: Internal Server Error

**URL:** https://discuss.elastic.co/t/watcher-internal-server-error/131471
**Category:** Elasticsearch
**Created:** [May 11, 2018, 11:51am UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471 "2018-05-11T11:51:18Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![FYP\_2018](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@FYP\_2018](https://discuss.elastic.co/u/FYP_2018)
#### Post date: [May 11, 2018, 11:51am UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/1 "2018-05-11T11:51:19Z")

</div>

Whenever I try to execute a watch i get a Watcher : Internal server error.

Also when I try to test the watch using development tools ,  
i get following error

{  
"error": {  
"root\_cause": [  
{  
"type": "null\_pointer\_exception",  
"reason": null  
}  
],  
"type": "null\_pointer\_exception",  
"reason": null  
},  
"status": 500  
}

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [May 11, 2018, 12:06pm UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/2 "2018-05-11T12:06:38Z")

</div>

is there any log file output that you can share or are you running on a cloud instance?

---

<div class="post-metadata">

### Author: ![FYP\_2018](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@FYP\_2018](https://discuss.elastic.co/u/FYP_2018)
#### Post date: [May 11, 2018, 12:32pm UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/3 "2018-05-11T12:32:16Z")

</div>

error [12:29:42.659] [null\_pointer\_exception] null :: {"path":"/\_xpack/watcher/watch/\_execute","query":{},"body":"{"trigger\_data":{},"action\_modes":{"my\_webhook":"simulate"},"watch":{"metadata":{"xpack":{"type":"json"},"name":"A1"},"trigger":{"schedule":{"interval":"1m"}},"input":{"search":{"request":{"search\_type":"query\_then\_fetch","indices":["logstash-\*"],"types":[],"body":{"size":0,"query":{"match":{"severity":"alert"}}}}}},"condition":{"compare":{"ctx.payload.hits.total":{"gt":0}}},"actions":{"my\_webhook":{"webhook":{"scheme":"http","host":"192.168.0.32","port":5601,"method":"post","path":"/api/notification\_center/notification","params":{"type":"warning","content":"DFsdgfsdg"},"headers":{"Authorization":"Basic ZWxhc3RpYzphYmNkZTEyMzQ1","Content-type":"application/json","kbn-version":"6.2.3"},"body":"{ \"type\": \"error\", \"content\": \"{{ctx.payload.hits.total}}\" }"}}}}}","statusCode":500,"response":"{"error":{"root\_cause":[{"type":"null\_pointer\_exception","reason":null}],"type":"null\_pointer\_exception","reason":null},"status":500}"}  
at respond (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:295:15)  
at checkRespForFailure (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:254:7)  
at HttpConnector. (/usr/share/kibana/node\_modules/elasticsearch/src/lib/connectors/http.js:159:7)  
at IncomingMessage.bound (/usr/share/kibana/node\_modules/elasticsearch/node\_modules/lodash/dist/lodash.js:729:21)  
at emitNone (events.js:91:20)  
at IncomingMessage.emit (events.js:185:7)  
at endReadableNT (\_stream\_readable.js:974:12)  
at \_combinedTickCallback (internal/process/next\_tick.js:80:11)  
at process.\_tickDomainCallback (internal/process/next\_tick.js:128:9)

This is the error I get on the console when I try to execute any watch.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [May 11, 2018, 1:33pm UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/4 "2018-05-11T13:33:56Z")

</div>

Sorry for not being clear. I meant in the elasticsearch logfile, not the kibana one.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [May 11, 2018, 1:35pm UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/5 "2018-05-11T13:35:22Z")

</div>

also which elasticsearch version are you on?

---

<div class="post-metadata">

### Author: ![FYP\_2018](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@FYP\_2018](https://discuss.elastic.co/u/FYP_2018)
#### Post date: [May 12, 2018, 6:13am UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/6 "2018-05-12T06:13:38Z")

</div>

The log file output is too big to paste in here. I have uploaded the file on google drive. Here's the link:  
[elasticseach\_log](https://drive.google.com/open?id=1VuGMFA2oAw4_d51ArJZ4x08NvDIT2VBV)

My elasticsearch version is 6.2.3

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [May 13, 2018, 9:29am UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/7 "2018-05-13T09:29:44Z")

</div>

Hey,

can you run `GET _xpack/watcher/stats` and check if watcher is marked as stopped? If so, can you start watcher manually and see if you can run watcher then?

--Alex

---

<div class="post-metadata">

### Author: ![FYP\_2018](https://avatars.discourse-cdn.com/v4/letter/f/779978/32.png) [@FYP\_2018](https://discuss.elastic.co/u/FYP_2018)
#### Post date: [May 14, 2018, 5:48am UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/8 "2018-05-14T05:48:48Z")

</div>

The watcher was marked manually stopped. Manually starting it did the job.  
Thanks a lot.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [May 14, 2018, 7:23am UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/9 "2018-05-14T07:23:30Z")

</div>

Thanks for reporting back. The error message is confusing though. This will be changed in 6.3 though, as a change about starting/stopping watcher (to reduce the code running in additional threads) will be included.

---

<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: [June 11, 2018, 7:23am UTC](https://discuss.elastic.co/t/watcher-internal-server-error/131471/10 "2018-06-11T07:23:36Z")

</div>

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