Orderer节点启动报错解决方案:Not bootstrapping because of 3 existing channels

Orderer重启问题

针对fabric1.4版本,重启orderer后出现了以下问题:Not bootstrapping because of 3 existing channels。

详细堆栈信息如下:

orderer.example.com    | 2020-11-19 09:48:00.705 UTC [orderer.common.server] extractSysChanLastConfig -> INFO 003 Not bootstrapping because of 3 existing channels
orderer.example.com    | panic: runtime error: invalid memory address or nil pointer dereference
orderer.example.com    | [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xfb10d9]
orderer.example.com    | 
orderer.example.com    | goroutine 1 [running]:
orderer.example.com    | github.com/hyperledger/fabric/protos/utils.GetMetadataFromBlock(0x0, 0xc000000001, 0x1006413, 0x0, 0x0)
orderer.example.com    |        /opt/gopath/src/github.com/hyperledger/fabric/protos/utils/blockutils.go:55 +0x39
orderer.example.com    | github.com/hyperledger/fabric/protos/utils.GetLastConfigIndexFromBlock(0x0, 0xc0001e29c0, 0xffffffffffffffff, 0x0)
orderer.example.com    |        /opt/gopath/src/github.com/hyperledger/fabric/protos/utils/blockutils.go:75 +0x37
orderer.example.com    | github.com/hyperledger/fabric/orderer/common/multichannel.ConfigBlock(0x7f963c1e75d0, 0xc0001e29c0, 0xc0001e29c0)
orderer.example.com    |        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:112 +0x74
orderer.example.com    | github.com/hyperledger/fabric/orderer/common/server.extractSysChanLastConfig(0x16db000, 0xc0001e21e0, 0xc00009da80, 0x16db000)
orderer.example.com    |        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:258 +0x2c9
orderer.example.com    | github.com/hyperledger/fabric/orderer/common/server.Start(0x1548ad2, 0x5, 0xc000256480)
orderer.example.com    |        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:110 +0x33c
orderer.example.com    | github.com/hyperledger/fabric/orderer/common/server.Main()
orderer.example.com    |        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:91 +0x208
orderer.example.com    | main.main()
orderer.example.com    |        /opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:15 +0x20

问题解决方案

首先,我的docker-compose文件:
在这里插入图片描述

orderer.example.com:/var/hyperledger/production/orderer
这是 orderer 的目录映射,/var/hyperledger/production/orderer 是 Orderer 容器的工作目录,orderer.example.com 是映射到宿主机的,这个截图的 docker-compose-orderer.yaml 上部有 volume 的定义,就是这个 orderer.example.com

换句话说,- orderer.example.com:/var/hyperledger/production/orderer 不是映射到宿主机的某个目录,而是创建了一个 volume,然后映射到这个 volume,可以用 docker volume ls 查看当前宿主机上有哪些 volume

出现问题的原因是:之前产生的volume。docker volume ls 查看当前宿主机上有哪些 volume
在这里插入图片描述

删除对应的无用的volume即可:docker volume rm VOLUME_NAME

欢迎关注公众号,交流区块链技术

在这里插入图片描述


版权声明:本文为jingzi123456789原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。