Skip to content

Cannot run consul in windows docker container  #2770

Closed
@prochnowc

Description

@prochnowc

consul version for both Client and Server

Server: 0.7.4

Operating system and Environment details

Windows Server Core

Description of the Issue (and unexpected/desired result)

Consul crashes on startup when data directory is linked through docker volume.
This seems to be an issue of Go which is fixed in 1.8:
golang/go#15978

Reproduction steps

Run consul in windows docker container with data directory linked to host filesystem.

Log Fragments or Link to gist

consul_1        | panic: runtime error: slice bounds out of range
consul_1        |
consul_1        | goroutine 1 [running]:
consul_1        | panic(0xfc5ea0, 0xc042012020)
consul_1        |       /goroot/src/runtime/panic.go:500 +0x1af
consul_1        | syscall.Readlink(0xc0420323e0, 0xe, 0xc04211ea00, 0x80, 0x80, 0x0, 0x0, 0x0)
consul_1        |       /goroot/src/syscall/syscall_windows.go:1031 +0x3a9
consul_1        | os.Readlink(0xc0420323e0, 0xe, 0x1780f20, 0xc04214c300, 0x0, 0x0)
consul_1        |       /goroot/src/os/file_posix.go:21 +0x94
consul_1        | os.Stat(0xc0420323e0, 0xe, 0xc0420136d0, 0x6, 0x0, 0x0)
consul_1        |       /goroot/src/os/stat_windows.go:72 +0x9e
consul_1        | github.com/hashicorp/consul/command/agent.(*Command).readConfig(0xc04214a9c0, 0xc04202a5b0)
consul_1        |       /gopath/src/github.com/hashicorp/consul/command/agent/command.go:242 +0x2ac6
consul_1        | github.com/hashicorp/consul/command/agent.(*Command).Run(0xc04214a9c0, 0xc042060020, 0x6, 0x6, 0x0)
consul_1        |       /gopath/src/github.com/hashicorp/consul/command/agent/command.go:937 +0x177
consul_1        | github.com/hashicorp/consul/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc0421e40c0, 0xc0421e40c0, 0xc
042009200, 0x9)
consul_1        |       /gopath/src/github.com/hashicorp/consul/vendor/github.com/mitchellh/cli/cli.go:153 +0x261
consul_1        | main.realMain(0xc042014000)
consul_1        |       /gopath/src/github.com/hashicorp/consul/main.go:46 +0x1f8
consul_1        | main.main()
consul_1        |       /gopath/src/github.com/hashicorp/consul/main.go:18 +0x29

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