Skip to content

serf agent panic when -iface and -discover is given #689

Description

@5aint2ero

When starting serf agent via cmdline with the arguments -iface and -discover, the process stops with a panic.

Provided command:
serf agent -iface ens10 -discover swarm

Error message:

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

goroutine 33 [running]:
reflect.Value.Int(...)
        /goroot/src/reflect/value.go:961
github.com/hashicorp/go.net/ipv4.sysfd(0xa5b3a0, 0xc00000c7d0, 0xc00000c7d0, 0xa5b3a0, 0xc00000c7d0)
        /root/go/pkg/mod/github.com/hashicorp/go.net@v0.0.1/ipv4/helper_unix.go:46 +0x2ca
github.com/hashicorp/go.net/ipv4.(*dgramOpt).sysfd(0xc000077eb0, 0x95a0a0, 0x9a78e0, 0xc00012aa00)
        /root/go/pkg/mod/github.com/hashicorp/go.net@v0.0.1/ipv4/helper_unix.go:25 +0x7f
github.com/hashicorp/go.net/ipv4.(*dgramOpt).SetMulticastInterface(0xc000077eb0, 0xc00012a800, 0xc00000c7d0, 0xa5b3a0)
        /root/go/pkg/mod/github.com/hashicorp/go.net@v0.0.1/ipv4/dgramopt_posix.go:59 +0x43
github.com/hashicorp/mdns.(*client).setInterface(0xc00012aac0, 0xc00012a800, 0xc00012aac0, 0x5)
        /root/go/pkg/mod/github.com/hashicorp/mdns@v1.0.0/client.go:184 +0xe9
github.com/hashicorp/mdns.Query(0xc000387f80, 0x0, 0x0)
        /root/go/pkg/mod/github.com/hashicorp/mdns@v1.0.0/client.go:72 +0x10b
github.com/hashicorp/serf/cmd/serf/command/agent.(*AgentMDNS).poll(0xc00012a8c0, 0xc00033d740)
        /serf/cmd/serf/command/agent/mdns.go:127 +0xa4
created by github.com/hashicorp/serf/cmd/serf/command/agent.(*AgentMDNS).run
        /serf/cmd/serf/command/agent/mdns.go:115 +0x1f2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions