Hyperledger fabric 创建同意人时出错:无法还原持久化的raft数据:无法创建或读取WAL:无法打开WAL:fileutil:文件已锁定

Hyperledger fabric 创建同意人时出错:无法还原持久化的raft数据:无法创建或读取WAL:无法打开WAL:fileutil:文件已锁定,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,订购方在尝试创建频道时失败 设置: 三名订购者|也尝试了五名订购者 库伯内特斯 筏式共识 1.4.3和1.4.1 它与docker swarm完美配合 下面是一个订购方的错误日志 2019-09-04 13:02:11.488 UTC [orderer.consensus.etcdraft] HandleChain -> INFO 079 EvictionSuspicion not set, defaulting to 10m0s 2019-09-04 13:02:11.489

订购方在尝试创建频道时失败

设置:

  • 三名订购者|也尝试了五名订购者
  • 库伯内特斯
  • 筏式共识
  • 1.4.3和1.4.1
  • 它与docker swarm完美配合
下面是一个订购方的错误日志

2019-09-04 13:02:11.488 UTC [orderer.consensus.etcdraft] HandleChain -> INFO 079 EvictionSuspicion not set, defaulting to 10m0s
    2019-09-04 13:02:11.489 UTC [orderer.consensus.etcdraft] createOrReadWAL -> INFO 07a Found WAL data at path '/var/hyperledger/production/orderer/etcdraft/wal/nath41channel', replaying it channel=nath41channel node=2
    2019-09-04 13:02:11.489 UTC [orderer.commmon.multichannel] newChainSupport -> PANI 07b [channel: nath41channel] Error creating consenter: failed to restore persisted raft data: failed to create or read WAL: failed to open WAL: fileutil: file already locked
    panic: [channel: nath41channel] Error creating consenter: failed to restore persisted raft data: failed to create or read WAL: failed to open WAL: fileutil: file already locked

    goroutine 86 [running]:
    github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00018bce0, 0x0, 0x0, 0x0)
        /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515
    github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000134280, 0x4, 0x1040dcc, 0x2a, 0xc000721548, 0x2, 0x2, 0x0, 0x0, 0x0)
        /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
    github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc000134280, 0x1040dcc, 0x2a, 0xc000721548, 0x2, 0x2)
        /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
    github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(0xc000134288, 0x1040dcc, 0x2a, 0xc000721548, 0x2, 0x2)
        /opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:74 +0x60
    github.com/hyperledger/fabric/orderer/common/multichannel.newChainSupport(0xc000170000, 0xc00028f5e0, 0xc0004ef260, 0x1145580, 0x1b8f970, 0xc0004ed3a0, 0x0)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/chainsupport.go:74 +0x710
    github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).newChain(0xc000170000, 0xc0008dc870)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:327 +0x1df
    github.com/hyperledger/fabric/orderer/common/multichannel.(*BlockWriter).WriteConfigBlock(0xc0005a8000, 0xc000483940, 0xc0008e3360, 0xb, 0xb)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/blockwriter.go:118 +0x2f3
    github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).writeConfigBlock(0xc0001f8f00, 0xc000483940, 0x7)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:1266 +0x1b4
    github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).writeBlock(0xc0001f8f00, 0xc000483940, 0x7)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:839 +0x18f
    github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).apply(0xc0001f8f00, 0xc0004ea240, 0x3, 0x4)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:1030 +0x250
    github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).serveRequest(0xc0001f8f00)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:748 +0x954
    created by github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).Start
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:336 +0x1e0

2019-09-04 19:12:24.951 UTC [orderer.commmon.multichannel] commitBlock -> PANI 03c [channel: rak25syschannel] Could not append block: unexpected Previous block hash. Expected PreviousHash = [99f567ec6a4f92583076be9d414c47f990559a0f5f24bd0273ba13bbfefd60f8], PreviousHash referred in the latest block= [d1507d8cf004d1dd7cd7940eb3c0c314fd82dcafd1e6edf784df3893cc938a64]
panic: [channel: rak25syschannel] Could not append block: unexpected Previous block hash. Expected PreviousHash = [99f567ec6a4f92583076be9d414c47f990559a0f5f24bd0273ba13bbfefd60f8], PreviousHash referred in the latest block= [d1507d8cf004d1dd7cd7940eb3c0c314fd82dcafd1e6edf784df3893cc938a64]

其中一个订购者的完整日志:

我已经得到了解决方案

因为我在做自动化,三个订购者使用支持工具生成三个genesis区块


即使是相同的配置,我们也不应该这样做,因为当多个genesis块开始分叉时,hyperledger结构协议就是这样设计的

我得到了解决方案

因为我在做自动化,三个订购者使用支持工具生成三个genesis区块


即使是相同的配置,我们也不应该这样做,因为当多个genesis块开始分叉时,hyperledger结构协议就是这样设计的

您到底是如何解决的?我面临着完全相同的问题,我使用docker compose引导3个具有RAFT共识的订购者,并且在尝试创建通道时,不时会发生此错误。在本地运行测试时,我很少出现错误,但它几乎每次都会使CI失败Hey Thomas请不要为每个订购者生成genesis块,对所有订购者使用单个块,我已经这样做了,为每个订购者生成一个genesis块并将其装入一个卷中,但我仍然会遇到这个错误:/我正在做一些测试,似乎在启动整个网络后睡眠1分钟可以避免问题,但我仍然不明白为什么。谢谢你的回答!你到底是怎么解决的?我面临着完全相同的问题,我使用docker compose引导3个具有RAFT共识的订购者,并且在尝试创建通道时,不时会发生此错误。在本地运行测试时,我很少出现错误,但它几乎每次都会使CI失败Hey Thomas请不要为每个订购者生成genesis块,对所有订购者使用单个块,我已经这样做了,为每个订购者生成一个genesis块并将其装入一个卷中,但我仍然会遇到这个错误:/我正在做一些测试,似乎在启动整个网络后睡眠1分钟可以避免问题,但我仍然不明白为什么。谢谢你的回答!