Script processor seems to be not working

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

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.

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