问题描述
我有一个在 Kubernetes 集群上运行的包含 3 个排序节点的网络。我正在使用 NFS 进行持久性存储。 Kubernetes 集群运行在裸机上。我将一个新组织加入了网络,并将该组织添加到了联盟中。一旦我执行命令 peer channel create
,订购者就开始抛出下面提到的错误:
2021-01-31 11:09:04.412 UTC [orderer.consensus.etcdraft] createOrReadWAL -> INFO 089 No WAL data found,creating new WAL at path '/var/hyperledger/production/orderer/etcdraft/wal/mvp1x-channel' channel=mvp1x-channel node=1
2021-01-31 11:09:04.549 UTC [orderer.consensus.etcdraft] createOrReadWAL -> WARN 08a Failed to create a temporary WAL directory channel=mvp1x-channel node=1 tmp-dir-path=/var/hyperledger/production/orderer/etcdraft/wal/mvp1x-channel.tmp dir-path=/var/hyperledger/production/orderer/etcdraft/wal/mvp1x-channel error="expected \"/var/hyperledger/production/orderer/etcdraft/wal/mvp1x-channel.tmp\" to be empty,got [\".nfs000000000982c7c700005443\"]"
2021-01-31 11:09:04.549 UTC [orderer.commmon.multichannel] newChainSupport -> PANI 08b [channel: mvp1x-channel] Error creating consenter: Failed to restore persisted raft data: Failed to create or read WAL: Failed to initialize WAL:expected "/var/hyperledger/production/orderer/etcdraft/wal/mvp1x-channel.tmp" to be empty,got [".nfs000000000982c7c700005443"]
panic: [channel: mvp1x-channel] Error creating consenter: Failed to restore persisted raft data: Failed to create or read WAL: Failed to initialize WAL:expected "/var/hyperledger/production/orderer/etcdraft/wal/mvp1x-channel.tmp" to be empty,got [".nfs000000000982c7c700005443"]
自动重启后开始报错:
2021-02-01 04:55:31.392 UTC [orderer.commmon.multichannel] newChain -> PANI 1519 Error creating chain support: error creating consenter forchannel: mvp1x-channel: Failed to restore persisted raft data: Failed to create or read WAL: Failed to open WAL: fileutil: file already locked
panic: Error creating chain support: error creating consenter for channel: mvp1x-channel: Failed to restore persisted raft data: Failed to create or read WAL: Failed to open WAL: fileutil: file already locked
goroutine 74 [running]:
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00014fe40,0x0,0x0)
/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:230 +0x545
go.uber.org/zap.(*SugaredLogger).log(0xc0000101b0,0xc000557004,0x101b08c,0x20,0xc001ca7588,0x1,0x0)
/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x100
go.uber.org/zap.(*SugaredLogger).Panicf(...)
/go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(...)
/go/src/github.com/hyperledger/fabric/common/flogging/zap.go:74
github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).newChain(0xc000146a00,0xc000452b40)
/go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:369 +0x251
github.com/hyperledger/fabric/orderer/common/multichannel.(*BlockWriter).WriteConfigBlock(0xc00056f540,0xc00021cb40,0xc000573ca0,0x9,0x9)
/go/src/github.com/hyperledger/fabric/orderer/common/multichannel/blockwriter.go:118 +0x357
github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).writeConfigBlock(0xc001d7a000,0x12)
/go/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:1226 +0x28f
github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).writeBlock(0xc001d7a000,0x12)
/go/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:805 +0x1a9
github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).apply(0xc001d7a000,0xc00059db10,0x1)
/go/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:990 +0x24a
github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).run(0xc001d7a000)
/go/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:713 +0x95c
created by github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Chain).Start
/go/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/chain.go:360 +0x230
我相信抛出第一个错误是因为 NFS 客户端创建了一个模式为 .nfsxxxxxxx 的文件。但我不明白第二个错误,我正在寻找解决它的方法。
我也在为裸机集群寻找另一种替代 NFS 服务器的最佳存储机制。
任何建议/反馈将不胜感激
更新:其他 2 个订购者运行良好。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)