Panic: reflect: call of reflect.Value.Int on zero Value


(David Turner) #1

Hi,

Having trouble getting started with heartbeat. I'd like it to ping another host. Here's my setup:

    $ sudo cat heartbeat.yml | sed -e '/^ *#/d; /^ *$/d'
    heartbeat.monitors:
    - type: icmp
      schedule: '*/5 * * * * * *'
      hosts: ["hostname-redacted.elastic.co"]
    setup.template.settings:
      index.number_of_shards: 1
      index.codec: best_compression
    setup.kibana:
    output.elasticsearch:
      hosts: ["localhost:9200"]

... and here's what happens when I start heartbeat:

    $ sudo ./heartbeat -e -c heartbeat.yml
    2018-06-13T12:35:23.418+0100    INFO    instance/beat.go:468    Home path: [/Users/davidturner/stack-6.2.4/heartbeat-6.2.4-darwin-x86_64] Config path: [/Users/davidturner/stack-6.2.4/heartbeat-6.2.4-darwin-x86_64] Data path: [/Users/davidturner/stack-6.2.4/heartbeat-6.2.4-darwin-x86_64/data] Logs path: [/Users/davidturner/stack-6.2.4/heartbeat-6.2.4-darwin-x86_64/logs]
    2018-06-13T12:35:23.418+0100    INFO    instance/beat.go:475    Beat UUID: a6d913a0-fe9c-4ccf-9aff-b84683e4a9fd
    2018-06-13T12:35:23.418+0100    INFO    instance/beat.go:213    Setup Beat: heartbeat; Version: 6.2.4
    2018-06-13T12:35:23.418+0100    INFO    elasticsearch/client.go:145     Elasticsearch url: http://localhost:9200
    2018-06-13T12:35:23.418+0100    INFO    pipeline/module.go:76   Beat name: Davids-MacBook-Pro-3.local
    2018-06-13T12:35:23.418+0100    WARN    beater/heartbeat.go:24  Beta: Heartbeat is beta software
    2018-06-13T12:35:23.418+0100    INFO    beater/manager.go:110   Select (active) monitor icmp
    panic: reflect: call of reflect.Value.Int on zero Value

    goroutine 1 [running]:
    reflect.Value.Int(0x0, 0x0, 0x0, 0x4be44d6)
            /usr/local/go/src/reflect/value.go:914 +0x141
    github.com/elastic/beats/vendor/golang.org/x/net/ipv4.sysfd(0x522b4a0, 0xc42000e8c8, 0xc42000e8c8, 0x522b4a0, 0xc42000e8c8)
            /go/src/github.com/elastic/beats/vendor/golang.org/x/net/ipv4/helper_unix.go:46 +0x196
    github.com/elastic/beats/vendor/golang.org/x/net/ipv4.(*payloadHandler).sysfd(0xc420487650, 0xc420487630, 0xc42000e8c8, 0x522b4a0)
            /go/src/github.com/elastic/beats/vendor/golang.org/x/net/ipv4/helper_unix.go:31 +0x5b
    github.com/elastic/beats/vendor/golang.org/x/net/ipv4.NewPacketConn(0x522afc0, 0xc42000e8c8, 0x0)
            /go/src/github.com/elastic/beats/vendor/golang.org/x/net/ipv4/endpoint.go:106 +0x104
    github.com/elastic/beats/vendor/golang.org/x/net/icmp.ListenPacket(0x4be71fd, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0)
            /go/src/github.com/elastic/beats/vendor/golang.org/x/net/icmp/listen_posix.go:92 +0x671
    github.com/elastic/beats/heartbeat/monitors/active/icmp.createListener(0x4be3276, 0x4, 0x4be71fd, 0x8, 0x17)
            /go/src/github.com/elastic/beats/heartbeat/monitors/active/icmp/loop.go:324 +0x54
    github.com/elastic/beats/heartbeat/monitors/active/icmp.newICMPLoop(0x4bf1d60, 0x17, 0x0)
            /go/src/github.com/elastic/beats/heartbeat/monitors/active/icmp/loop.go:76 +0x4f
    github.com/elastic/beats/heartbeat/monitors/active/icmp.create.func2()
            /go/src/github.com/elastic/beats/heartbeat/monitors/active/icmp/icmp.go:53 +0x6a
    sync.(*Once).Do(0x5297a60, 0xc420236d68)
            /usr/local/go/src/sync/once.go:44 +0xbe
    github.com/elastic/beats/heartbeat/monitors/active/icmp.create(0x4be35b2, 0x4, 0x1, 0xc4204405a0, 0x0, 0x0, 0x0, 0xc4203d7280, 0xc420236ef8)
            /go/src/github.com/elastic/beats/heartbeat/monitors/active/icmp/icmp.go:51 +0x1cb
    github.com/elastic/beats/heartbeat/monitors.(*entry).Create(0xc4203d1940, 0xc4204405a0, 0xc4203d07e0, 0x4, 0x4, 0x0, 0x0)
            /go/src/github.com/elastic/beats/heartbeat/monitors/monitors.go:102 +0x51
    github.com/elastic/beats/heartbeat/monitors.(*entry).Create-fm(0xc4204405a0, 0x4a03b20, 0xc42035fa40, 0x0, 0x0, 0x0)
            /go/src/github.com/elastic/beats/heartbeat/monitors/monitors.go:83 +0x34
    github.com/elastic/beats/heartbeat/beater.(*monitor).Update(0xc4202375b8, 0xc420237518, 0x1, 0x1, 0x0, 0x1)
            /go/src/github.com/elastic/beats/heartbeat/beater/manager.go:180 +0x301
    github.com/elastic/beats/heartbeat/beater.newMonitorManager(0x521efa0, 0xc420360500, 0x52147e0, 0xc4203d7000, 0xc42000e068, 0xc42000e7b8, 0x1, 0x1, 0xc4203d94c0, 0x1, ...)
            /go/src/github.com/elastic/beats/heartbeat/beater/manager.go:138 +0x924
    github.com/elastic/beats/heartbeat/beater.New(0xc4200fc540, 0xc4203d2c00, 0x4be7dcc, 0x9, 0x4be3a4f, 0x5)
            /go/src/github.com/elastic/beats/heartbeat/beater/heartbeat.go:42 +0x39a
    github.com/elastic/beats/libbeat/cmd/instance.(*Beat).createBeater(0xc4200fc540, 0x4c27880, 0x0, 0xc42007a1b0, 0x2e0020369920, 0x1b0)
            /go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:241 +0x40b
    github.com/elastic/beats/libbeat/cmd/instance.(*Beat).launch(0xc4200fc540, 0x4c27880, 0x0, 0x0)
            /go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:260 +0xd1
    github.com/elastic/beats/libbeat/cmd/instance.Run.func1(0x4be7dcc, 0x9, 0x4be7dcc, 0x9, 0x0, 0x0, 0x4c27880, 0xc420010150, 0xc420237d40)
            /go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:135 +0xa8
    github.com/elastic/beats/libbeat/cmd/instance.Run(0x4be7dcc, 0x9, 0x4be7dcc, 0x9, 0x0, 0x0, 0x4c27880, 0x0, 0x0)
            /go/src/github.com/elastic/beats/libbeat/cmd/instance/beat.go:136 +0x71
    github.com/elastic/beats/libbeat/cmd.genRunCmd.func1(0xc4203c0000, 0xc42028f620, 0x0, 0x3)
            /go/src/github.com/elastic/beats/libbeat/cmd/run.go:19 +0x60
    github.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).execute(0xc4203c0000, 0xc420010150, 0x3, 0x3, 0xc4203c0000, 0xc420010150)
            /go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:704 +0x2c6
    github.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4203c0000, 0x4be7dcc, 0x9, 0x0)
            /go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:785 +0x30e
    github.com/elastic/beats/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4203c0000, 0xc420237f70, 0x4993359)
            /go/src/github.com/elastic/beats/vendor/github.com/spf13/cobra/command.go:738 +0x2b
    main.main()
            /go/src/github.com/elastic/beats/heartbeat/main.go:10 +0x2f

Not sure where to go from here. Any advice appreciated.


(Adrian Serrano) #2

Hi,

You're hitting a bug with ICMP under Mac, caused by beats using an old version of the golang.org/x/net package.

The bug is fixed in 6.3, can you upgrade?


(David Turner) #3

Thanks @adrisr, "fixed in 6.3" is enough for me.


(system) #4

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