Flag redefinition crash

while executing custom metric beat it shows the following error log

run command : ./cantiz-iot-beat-cassandra -e

Out put

    ./cantiz-iot-beat-cassandra flag redefined: v
    `panic: ./cantiz-iot-beat-cassandra flag redefined: v`
    goroutine 1 [running]:
    flag.(*FlagSet).Var(0xc420064060, 0x453eae0, 0xc420012932, 0x3224a16, 0x1, 0x3238394, 0x11)
    	/usr/local/go/src/flag/flag.go:793 +0x5e1
    flag.(*FlagSet).BoolVar(0xc420064060, 0xc420012932, 0x3224a16, 0x1, 0xc4200a4b00, 0x3238394, 0x11)
    	/usr/local/go/src/flag/flag.go:566 +0x70
    flag.(*FlagSet).Bool(0xc420064060, 0x3224a16, 0x1, 0x107f4200, 0x3238394, 0x11, 0xf100000003188e00)
    	/usr/local/go/src/flag/flag.go:579 +0x76
    flag.Bool(0x3224a16, 0x1, 0x2c91e00, 0x3238394, 0x11, 0xc4200a4bd8)
    	/usr/local/go/src/flag/flag.go:586 +0x5e
    cantiz-iot-beat-cassandra/vendor/github.com/elastic/beats/libbeat/logp.init.0()
    	/home/sujith/GoWorkUnx/src/github.com/sujith-beat-cassandra/src/cantiz-iot-beat-cassandra/vendor/github.com/elastic/beats/libbeat/logp/logp.go:46 +0x54
    cantiz-iot-beat-cassandra/vendor/github.com/elastic/beats/libbeat/logp.init()
    	<autogenerated>:1 +0x2d5
    cantiz-iot-beat-cassandra/vendor/github.com/elastic/beats/libbeat/common/file.init()
    	<autogenerated>:1 +0x4e
    cantiz-iot-beat-cassandra/vendor/github.com/elastic/beats/libbeat/common.init()
    	<autogenerated>:1 +0x87
    cantiz-iot-beat-cassandra/module/cassandra/nodetool_metric.init()
    	<autogenerated>:1 +0x49
    cantiz-iot-beat-cassandra/include.init()
    	<autogenerated>:1 +0x44
    main.init()
    	<autogenerated>:1 +0x58

@sujithattinad I guess you are making a custom beat? Are you actually redefining theses flags in your code? -v -e are provided by libbeat.

Yes i'm making custom beat, but i did't redefined flags anywhere

I guess you used the generator and this guide ?

yes i have used generator python script

flag resetting code found in libbeat
src/cantizbeatzookpr/vendor/github.com/elastic/beats/libbeat/logp/logp.go:46

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