consul服务启动报错panic: log not found

consul的agent启动时报一下错误:

panic: log not found

goroutine 1 [running]:
github.com/hashicorp/consul/vendor/github.com/hashicorp/raft.NewRaft(0xc4201d4120, 0x1ae17e0, 0xc42026f360, 0x1ae84e0, 0xc42028aa40, 0x1ae45e0, 0xc42033b000, 0x1ae29a0, 0xc42033b100, 0x1ae9980, ...)
	/gopath/src/github.com/hashicorp/consul/vendor/github.com/hashicorp/raft/api.go:491 +0x14ef
github.com/hashicorp/consul/agent/consul.(*Server).setupRaft(0xc42045e000, 0x0, 0x0)
	/gopath/src/github.com/hashicorp/consul/agent/consul/server.go:620 +0x603
github.com/hashicorp/consul/agent/consul.NewServerLogger(0xc4203c5b80, 0xc42026ef00, 0xc420320cc0, 0x0, 0xc420320c00, 0xc4202dc000)
	/gopath/src/github.com/hashicorp/consul/agent/consul/server.go:364 +0xda9
github.com/hashicorp/consul/agent.(*Agent).Start(0xc4202dc000, 0xc4202dc000, 0x0)
	/gopath/src/github.com/hashicorp/consul/agent/agent.go:258 +0x227
github.com/hashicorp/consul/command.(*AgentCommand).run(0xc4202ea1e0, 0xc4200c2020, 0xc, 0xc, 0x0)
	/gopath/src/github.com/hashicorp/consul/command/agent.go:320 +0x4e0
github.com/hashicorp/consul/command.(*AgentCommand).Run(0xc4202ea1e0, 0xc4200c2020, 0xc, 0xc, 0xc42007eda0)
	/gopath/src/github.com/hashicorp/consul/command/agent.go:267 +0x50
github.com/hashicorp/consul/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc420280b40, 0xc420280b40, 0x40, 0xc4202b0a20)
	/gopath/src/github.com/hashicorp/consul/vendor/github.com/mitchellh/cli/cli.go:242 +0x1eb
main.realMain(0xef5bd7)
	/gopath/src/github.com/hashicorp/consul/main.go:52 +0x3fb
main.main()
	/gopath/src/github.com/hashicorp/consul/main.go:19 +0x22

百度无果,去github上搜索,发现有相关内容,链接、截图如下:
https://github.com/hashicorp/consul/issues/2933
consul服务启动报错panic: log not found_第1张图片所以,按照github上说的,先找到raft.db,先备份下,然后删除原文件,然后重启consul,OK了。

你可能感兴趣的:(consul服务启动报错panic: log not found)