Beats - fatal error: concurrent map iteration and map write

Hi

I was following this doc to create a custom beat. I was able to build and run the beat.I encountered an error while running it

 fatal error: concurrent map iteration and map write

goroutine 1 [running]:
runtime.throw(0x17b90e3, 0x26)
    /usr/local/go/src/runtime/panic.go:774 +0x72 fp=0xc00023e6a8 sp=0xc00023e678 pc=0xac0b42
runtime.mapiternext(0xc0004213e0)
    /usr/local/go/src/runtime/map.go:858 +0x579 fp=0xc00023e730 sp=0xc00023e6a8 pc=0xaa0f19
reflect.mapiternext(0xc0004213e0)
    /usr/local/go/src/runtime/map.go:1347 +0x2b fp=0xc00023e748 sp=0xc00023e730 pc=0xaa1f2b
reflect.Value.MapKeys(0x1712220, 0xc0008b4e70, 0x15, 0x0, 0xa9f96b, 0xc00023e8a8)
    /usr/local/go/src/reflect/value.go:1214 +0x10a fp=0xc00023e7d8 sp=0xc00023e748 pc=0xb5a23a
encoding/json.mapEncoder.encode(0xc000436d50, 0xc0001af180, 0x1712220, 0xc0008b4e70, 0x15, 0x1710100)
    /usr/local/go/src/encoding/json/encode.go:690 +0xff fp=0xc00023e920 sp=0xc00023e7d8 pc=0xb9f0af
encoding/json.mapEncoder.encode-fm(0xc0001af180, 0x1712220, 0xc0008b4e70, 0x15, 0x100)
    /usr/local/go/src/encoding/json/encode.go:682 +0x64 fp=0xc00023e960 sp=0xc00023e920 pc=0xbaad44
encoding/json.(*encodeState).reflectValue(0xc0001af180, 0x1712220, 0xc0008b4e70, 0x15, 0x100)
    /usr/local/go/src/encoding/json/encode.go:337 +0x82 fp=0xc00023e998 sp=0xc00023e960 pc=0xb9c5a2
encoding/json.(*encodeState).marshal(0xc0001af180, 0x1712220, 0xc0008b4e70, 0x1000000000100, 0x0, 0x0)
    /usr/local/go/src/encoding/json/encode.go:309 +0x10b fp=0xc00023ea18 sp=0xc00023e998 pc=0xb9c04b

Thanks in advance

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