# Script processor seems to be not working

**URL:** <https://discuss.elastic.co/t/script-processor-seems-to-be-not-working/199500>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 14, 2019, 11:11am UTC](https://discuss.elastic.co/t/script-processor-seems-to-be-not-working/199500 "2019-09-14T11:11:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrii](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrii/32/78646_2.png) [@Andrii](https://discuss.elastic.co/u/Andrii)\
**Post date:** [September 14, 2019, 11:11am UTC](https://discuss.elastic.co/t/script-processor-seems-to-be-not-working/199500/1 "2019-09-14T11:11:44Z")

</div>

I need to lowercase the value for one of the fields. And seems like a script processor is the only option to do this. But even with an example config beat is not able to start.  
Filebeat version is 7.3.2  
the config is:  
`- script: lang: javascript id: my_filter source: > function process(event) { event.Tag("js"); }`  
the error is:

`Preformatted text panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: Panic at 0: runtime error: invalid memory address or nil pointer dereference [recovered] panic: Panic at 0: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x16f7445]`  
`goroutine 196 [running]: github.com/elastic/beats/vendor/github.com/dop251/goja.AssertFunction.func1.1(0xc0005d18d0) /go/src/github.com/elastic/beats/vendor/github.com/dop251/goja/runtime.go:1429 +0x9b panic(0x18de4a0, 0xc00070c230) /usr/local/go/src/runtime/panic.go:522 +0x1b5 github.com/elastic/beats/vendor/github.com/dop251/goja.(*vm).try.func1(0xc0003b49c0, 0x0, 0xc0005d17d8, 0x0, 0x0, 0x0, 0xc0005d1830) /go/src/github.com/elastic/beats/vendor/github.com/dop251/goja/vm.go:364 +0x48e panic(0x18ee880, 0x2985780) /usr/local/go/src/runtime/panic.go:522 +0x1b5 github.com/elastic/beats/vendor/github.com/dop251/goja.(*vm).run(0xc0003b49c0) /go/src/github.com/elastic/beats/vendor/github.com/dop251/goja/vm.go:288 +0x75 github.com/elastic/beats/vendor/github.com/dop251/goja.(*funcObject).Call(0xc0000ee3c0, 0x1cb86e0, 0x2be0180, 0xc00070c210, 0x1, 0x1, 0x1a0cc01, 0xc0000ec480) /go/src/github.com/elastic/beats/vendor/github.com/dop251/goja/func.go:130 +0x2c4 github.com/elastic/beats/vendor/github.com/dop251/goja.AssertFunction.func1.2() /go/src/github.com/elastic/beats/vendor/github.com/dop251/goja/runtime.go:1434 +0x96 github.com/elastic/beats/vendor/github.com/dop251/goja.(*vm).try(0xc0003b49c0, 0xc0005d1848, 0x0) /go/src/github.com/elastic/beats/vendor/github.com/dop251/goja/vm.go:370 +0x10d github.com/elastic/beats/vendor/github.com/dop251/goja.AssertFunction.func1(0x1cb86e0, 0x2be0180, 0xc00070c210, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0) /go/src/github.com/elastic/beats/vendor/github.com/dop251/goja/runtime.go:1433 +0x10d github.com/elastic/beats/libbeat/processors/script/javascript.(*session).runProcessFunc(0xc0002e9450, 0xc000292400, 0x0, 0x0, 0x0) /go/src/github.com/elastic/beats/libbeat/processors/script/javascript/session.go:222 +0x12c github.com/elastic/beats/libbeat/processors/script/javascript.(*jsProcessor).Run(0xc0000d30e0, 0xc000292400, 0xc000292400, 0x0, 0x0) /go/src/github.com/elastic/beats/libbeat/processors/script/javascript/javascript.go:163 +0x79 github.com/elastic/beats/libbeat/publisher/processing.(*group).Run(0xc000023e00, 0xc000292400, 0xc000292400, 0x0, 0x0) /go/src/github.com/elastic/beats/libbeat/publisher/processing/processors.go:101 +0x94 github.com/elastic/beats/libbeat/publisher/processing.(*group).Run(0xc0005184e0, 0xc000292400, 0xed50eac69, 0x0, 0x0) /go/src/github.com/elastic/beats/libbeat/publisher/processing/processors.go:101 +0x94 github.com/elastic/beats/libbeat/publisher/pipeline.(*client).publish(0xc000084780, 0x15def826, 0xed50eac69, 0x0, 0x0, 0xc0007a0a50, 0x1a30600, 0xc0007b63f0, 0x0) /go/src/github.com/elastic/beats/libbeat/publisher/pipeline/client.go:85 +0x5c3 github.com/elastic/beats/libbeat/publisher/pipeline.(*client).Publish(0xc000084780, 0x15def826, 0xed50eac69, 0x0, 0x0, 0xc0007a0a50, 0x1a30600, 0xc0007b63f0, 0x0) /go/src/github.com/elastic/beats/libbeat/publisher/pipeline/client.go:64 +0x9c github.com/elastic/beats/filebeat/channel.(*outlet).OnEvent(0xc0005185a0, 0xc000098f70, 0x1c8d401) /go/src/github.com/elastic/beats/filebeat/channel/outlet.go:70 +0x1a6 github.com/elastic/beats/filebeat/channel.SubOutlet.func1(0xc0007a0000, 0x1c8d340, 0xc0005185a0) /go/src/github.com/elastic/beats/filebeat/channel/util.go:54 +0x61 created by github.com/elastic/beats/filebeat/channel.SubOutlet /go/src/github.com/elastic/beats/filebeat/channel/util.go:52 +0xf8`

---

<div class="post-metadata">

**Author:** ![chris\_Athineou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_athineou/32/50468_2.png) [@chris\_Athineou](https://discuss.elastic.co/u/chris_Athineou)\
**Post date:** [September 18, 2019, 4:11pm UTC](https://discuss.elastic.co/t/script-processor-seems-to-be-not-working/199500/2 "2019-09-18T16:11:56Z")

</div>

I have also the same problem using filebeat 7.3.1 in docker container.  
The strange thing is that i get that errors only on my server. In my local pc the script is running without any error.

---

<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:** [October 16, 2019, 4:25pm UTC](https://discuss.elastic.co/t/script-processor-seems-to-be-not-working/199500/3 "2019-10-16T16:25:04Z")

</div>

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