# Unable to find scripts file on disk exception

**URL:** https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [March 23, 2018, 12:34pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365 "2018-03-23T12:34:39Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 23, 2018, 12:34pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/1 "2018-03-23T12:34:39Z")

</div>

I have found a script on the following link

[https://www.elastic.co/blog/implementing-a-statistical-anomaly-deetector-part-3](https://www.elastic.co/blog/implementing-a-statistical-anomaly-deetector-part-3)

The data collection watch in this link contains a script, which when it runs on rest api gives me the following error

"type" : "script\_exception",  
"reason":"failed tp compile script [java.lang.IllegalArgumentException: Unable to find on disk file script [hourly] using lang [groovy]] with lang [hourly] of type [groovy]"

How can i overcome this ? Please help me out

---

<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: [March 23, 2018, 1:25pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/2 "2018-03-23T13:25:27Z")

</div>

This article is already quite old, more than 2.5 years.

In the meantime two major versions of Elasticsearch have been released, one of them dropped support for the groovy scripting language and replacing it with painless, another more secure and fast scripting language.

You would need to port these scripts over to painless to make the blog post work.

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 23, 2018, 3:02pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/3 "2018-03-23T15:02:19Z")

</div>

ok..thanks for the reply..but if am able to create the watch in elasticsearch..Then how will I get the alerts? I have read and executed the complete blog and left with the alerts part in it. Can u just help me out? How will those alerts get generated after creating the watch?

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 24, 2018, 2:04pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/4 "2018-03-24T14:04:47Z")

</div>

If I have created a watch in elasticsearch to generate alerts using watcher api, how should I run it?  
Can u please help me?

---

<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: [March 26, 2018, 7:17am UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/5 "2018-03-26T07:17:54Z")

</div>

Please take some time to check out the documentation, specifically the part [how watcher works](https://www.elastic.co/guide/en/x-pack/6.2/how-watcher-works.html#watch-execution) and how watches are executed.

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 26, 2018, 10:53am UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/6 "2018-03-26T10:53:44Z")

</div>

Ok .Thank you..But when I write the following statement

\_watcher/watch/mywatch\_name/\_execute

This gives an error saying

type: "parse exception",  
reason: "could not parse watch execution request. unexpected object field [trigger]".

I tried alot..But am not able to clear this.,Can u please help me out..

---

<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: [March 26, 2018, 11:40am UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/7 "2018-03-26T11:40:18Z")

</div>

Is it possible that you inadvertently specified a body when executing the above request?

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 26, 2018, 11:55am UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/8 "2018-03-26T11:55:30Z")

</div>

Yes.. i observed that just now..thank you..error got cleared

---

<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: [March 26, 2018, 1:38pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/9 "2018-03-26T13:38:33Z")

</div>

Judging from the conversation I also think you are using Elasticsearch 5.x - you might want to use the latest major version, containing more bugfixes (you would have gotten an error when you specified an ID and a body with the execute watch API for example).

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 26, 2018, 3:50pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/10 "2018-03-26T15:50:49Z")

</div>

When I execute the watch, it says failed to execute search input.

reason: "SearchPhaseExecutionExeception [all shards failed]; nested : [Parameter [percents] must be an array of doubles, type ArrayList provided instead]; nested : ParseException[Parameter[percents] must be an array of doubles, type ArrayList provided instead]

How to overcome this? Where is the mistake done? Can u please help me out?

GET \_cat/indices

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c4f5eb4b70bd7930106bd891b3413d3189cb94d8.png)

GET \_cat/shards  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c7f34a8d121a2f33e0b0202072b2f92c903803f2.png)

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 26, 2018, 6:43pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/11 "2018-03-26T18:43:37Z")

</div>

Also can u please tell me how to update a watch? Can u give an example please..

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 26, 2018, 6:55pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/12 "2018-03-26T18:55:41Z")

</div>

The error that I have specified before says parameter percents should be double , but is array list.  
I have specified 90.0 in the script but it is taking it as 90..Is this what it means?  
The following is the block where error occured

![image](https://us1.discourse-cdn.com/elastic/original/3X/6/1/61402d7583305b0216fd1cf62e5b8d7caddf078b.png)

Please help me with this..

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 27, 2018, 2:49pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/13 "2018-03-27T14:49:21Z")

</div>

Can u please help me with this error

---

<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: [March 28, 2018, 12:03pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/14 "2018-03-28T12:03:30Z")

</div>

This is a public forum without any guaranteed SLA in regards to your answer. If you need that you might want to go for a commercial support relationship with Elastic.

Also just creating a new issue, because you did not get an answer in less than a day(!) is not really nice.

---

<div class="post-metadata">

### Author: ![saii](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@saii](https://discuss.elastic.co/u/saii)
#### Post date: [March 28, 2018, 1:41pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/15 "2018-03-28T13:41:46Z")

</div>

I never post any new topic without trying...Unless I feel am not able to clear the issue, I don't post it..This is a public forum as you said and thousands of people like me keep using it everyday..There are a number of new versions of Elasticsearch being released.For people who are working on large data like me, it is difficult to immediately shift to a newer version..There are compatibility problems too.. So, there might be situations where we are unable to find a solution to a particular issue..It is not that an issue is posted without even trying for a single time..It might also be some sort of emergency to clear the issue..People use this forum at first place to clear the issues they are dealing with..am not different from them..Thank you for the suppport..

---

<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: [April 25, 2018, 1:41pm UTC](https://discuss.elastic.co/t/unable-to-find-scripts-file-on-disk-exception/125365/16 "2018-04-25T13:41:47Z")

</div>

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