Hyperledger - container_linux.go:349 启动容器进程导致 "no such file or directory": 未知

Hyperledger - container_linux.go:349 starting container process caused "no such file or directory": unknown

我已经在 Windows(Linux 容器)的 Docker (2.2.0.5) 运行 中安装了 Hyperledger Fabric (2.0.0-alpha) 并且正在尝试开始第一个网络示例。当 运行 命令 ./byfn.sh -m up 我收到以下错误:

    OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused 
    "no such file or directory": unknown ERROR !!!! Test failed

从 Docker 仪表板开始,cli 和 peers 已经启动,而不是 orderer。检查订购者的日志时,我看到以下错误:

2020-05-04 20:29:04.492 UTC [orderer.common.cluster] loadVerifier -> ERRO 003 Channel byfn-sys-channel has no blocks, skipping it

    2020-05-04 20:29:04.500 UTC [orderer.common.cluster] loadVerifier -> INFO 004 Loaded verifier for channel testchainid from config block at index 0

    2020-05-04 20:29:04.520 UTC [orderer.common.server] initializeServerConfig -> INFO 005 Starting orderer with TLS enabled

    2020-05-04 20:29:04.521 UTC [orderer.common.server] initializeMultichannelRegistrar -> INFO 006 Not bootstrapping because of existing chains

    panic: runtime error: invalid memory address or nil pointer dereference

    [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xe06ad9]


    goroutine 1 [running]:

    github.com/hyperledger/fabric/protoutil.GetMetadataFromBlock(0x0, 0x1, 0x0, 0x194, 0x1dad440)

    /go/src/github.com/hyperledger/fabric/protoutil/blockutils.go:110 +0x39

    github.com/hyperledger/fabric/protoutil.GetLastConfigIndexFromBlock(0x0, 0xc0002f22a0, 0xffffffffffffffff, 0x0)

    /go/src/github.com/hyperledger/fabric/protoutil/blockutils.go:130 +0x37

    github.com/hyperledger/fabric/orderer/common/multichannel.ConfigBlock(0x7f12cf76eda8, 0xc0002f22a0, 0x7f12cf76eda8)

    /go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:111 +0x68

    github.com/hyperledger/fabric/orderer/common/multichannel.configTx(0x7f12cf76eda8, 0xc0002f22a0, 0xc0002f22a0)

    /go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:124 +0x35

我已经在网上查询了解决方案,但直到现在都没有结果。
- 他没有解释他是否安装了新的 Docker 版本或做了其他任何不同的事情。
Similar question 2 - 在 docker-compose.yml 我的 working_dir 对于 orderer.example.com 是 /opt/gopath/src/github.com/hyperledger/fabric/orderer 而对于 cli /opt/gopath/src/github.com/hyperledger/fabric/peer
还有,我的GO版本是go1.8.7

我通过几个步骤解决了这个问题:

  1. 我的脚本运行不正常。所以我用记事本++打开文件script.sh和utils.sh,并将EOL转换设置为Linux。在此之后我收到以下错误:

Error: failed to create deliver client for orderer: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer.example.com on 127.0.0.11:53: no such host" !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!

  1. 我还通过以下docker rm -f $(docker ps -aq)
  2. 清除了所有未使用的图像
  3. 关闭网络 ./byfn.sh down 然后重新启动它解决了问题。