running metricbeat setup command through ansible but getting below error. Can someone please sugesst where to check to fix this issue. After 2nd playbook run can see this host is skipped or ignored (may be due to when condition) but issues still exists if run this command manually on server.
TASK [metricbeat : Metricbeat default dashboards for Kibana] ***********************************************************************************************************
fatal: [server]: FAILED! => {
"changed": true,
"cmd": "metricbeat setup -e -E output.kafka.enabled=false -E output.elasticsearch.hosts=['http://<IP of server1>:5200', 'http://<IP of server2>:5200', 'http://<IP of server3>:5200'] -E output.elasticsearch.username=elastic -E output.elasticsearch.password=<Password> -E setup.kibana.host=<IP of server1> > /var/log/metricbeat_dashboard_load.log",
"delta": "0:00:00.122571",
"end": "2020-11-20 15:21:45.747724",
"rc": 2,
"start": "2020-11-20 15:21:45.625153"
}
STDERR:
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse.(*flagParser).parseArray(0xc0004dd830, 0x3f2f4e0, 0xc0004dd758, 0x1de37a8, 0x7ffd0000002c)
/go/src/github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse/parse.go:125 +0x3c3
github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse.(*flagParser).parseValue(0xc0004dd830, 0x4517e63, 0x1, 0x4654878, 0x0, 0x1b, 0x1)
/go/src/github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse/parse.go:102 +0x1e7
github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse.(*flagParser).parse(0xc0004dd830, 0x1c, 0x4654878, 0x7ffdd60d5da2, 0x1c)
/go/src/github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse/parse.go:67 +0x6d
github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse.Value(0x7ffdd60d5da2, 0x1c, 0x4517e72, 0x1, 0x0, 0x1)
/go/src/github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/internal/parse/parse.go:56 +0x84
github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/flag.NewFlagKeyValue.func1(0x7ffdd60d5d87, 0x37, 0x0, 0x1d06a0f, 0xc0004dd9c0, 0xc87d504f, 0x84177415c81ea561)
/go/src/github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/flag/value.go:69 +0x325
github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/flag.(*FlagValue).Set(0xc0001400f0, 0x7ffdd60d5d87, 0x37, 0x4517e7a, 0xc0001b80d0)
/go/src/github.com/elastic/beats/vendor/github.com/elastic/go-ucfg/flag/util.go:64 +0x42
github.com/elastic/beats/libbeat/common.(*SettingsFlag).Set(0xc0001400f0, 0x7ffdd60d5d87, 0x37, 0x1, 0xc0001b8160)
/go/src/github.com/elastic/beats/libbeat/common/flags.go:209 +0x40
github.com/elastic/beats/vendor/github.com/spf13/pflag.(*FlagSet).Set(0xc0000bd0e0, 0x4517e7a, 0x1, 0x7ffdd60d5d87, 0x37, 0x6ef7700, 0xc00013aa80)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/pflag/flag.go:432 +0xe6
github.com/elastic/beats/vendor/github.com/spf13/pflag.(*FlagSet).Parse.func1(0xc0000b9ea0, 0x7ffdd60d5d87, 0x37, 0xc00013aa90, 0x1)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/pflag/flag.go:1028 +0x54
github.com/elastic/beats/vendor/github.com/spf13/pflag.(*FlagSet).parseSingleShortArg(0xc0000bd0e0, 0x7ffdd60d5d85, 0x1, 0xc0000f20c0, 0x9, 0xa, 0xc00034c6d0, 0x7ffdd60d5d67, 0x0, 0xc0000f20b0, ...)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/pflag/flag.go:964 +0x298
github.com/elastic/beats/vendor/github.com/spf13/pflag.(*FlagSet).parseShortArg(0xc0000bd0e0, 0x7ffdd60d5d84, 0x2, 0xc0000f20c0, 0x9, 0xa, 0xc00034c6d0, 0xc0000f20b0, 0xa, 0xb, ...)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/pflag/flag.go:974 +0xd4
github.com/elastic/beats/vendor/github.com/spf13/pflag.(*FlagSet).parseArgs(0xc0000bd0e0, 0xc0000f20c0, 0x9, 0xa, 0xc00034c6d0, 0xc0000bd770, 0xc0000bd0e0)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/pflag/flag.go:1005 +0x6a6
github.com/elastic/beats/vendor/github.com/spf13/pflag.(*FlagSet).Parse(0xc0000bd0e0, 0xc0000f2000, 0x15, 0x16, 0x0, 0xc000052c20)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/pflag/flag.go:1031 +0xe3
github.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).ParseFlags(0xc0001ce240, 0xc0000f2000, 0x15, 0x16, 0x6f8ec20, 0xc0004dde98)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:1373 +0x9c
github.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).execute(0xc0001ce240, 0xc0000f2000, 0x15, 0x16, 0xc0001ce240, 0xc0000f2000)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:647 +0x8f
github.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0001c6000, 0x3b342ee, 0xc0004ddf88, 0xc0000560b8)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:785 +0x2ca
github.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).Execute(...)
/go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:738
main.main()
/go/src/github.com/elastic/beats/x-pack/metricbeat/main.go:21 +0x30
MSG:
non-zero return code