Я пытаюсь сделать реестр плотов постоянным, сохраняя все данные в привязке docker, указывающей на SMB на моем хосте.
По какой-то причине, которую я не знаю, когда Я запускаю контейнер плота и получаю следующую ошибку:
2020-08-03 08:24:03.598 UTC [orderer.consensus.etcdraft] CreateStorage -> DEBU 432 No snapshot found at /var/hyperledger/production/orderer/etcdraft/snapshot/sys-channel channel=sys-channel node=1
2020-08-03 08:24:03.602 UTC [orderer.consensus.etcdraft] createOrReadWAL -> INFO 433 No WAL data found, creating new WAL at path '/var/hyperledger/production/orderer/etcdraft/wal/sys-channel' channel=sys-channel node=1
2020-08-03 08:24:04.033 UTC [orderer.consensus.etcdraft] renameWAL -> INFO 434 closing WAL to release flock and retry directory renaming channel=sys-channel node=1 from=/var/hyperledger/production/orderer/etcdraft/wal/sys-channel.tmp to=/var/hyperledger/production/orderer/etcdraft/wal/sys-channel
2020-08-03 08:24:04.402 UTC [orderer.consensus.etcdraft] createOrReadWAL -> WARN 435 failed to fsync the parent data directory file channel=sys-channel node=1 parent-dir-path=/var/hyperledger/production/orderer/etcdraft/wal dir-path=/var/hyperledger/production/orderer/etcdraft/wal/sys-channel error="sync /var/hyperledger/production/orderer/etcdraft/wal: invalid argument"
2020-08-03 08:24:04.403 UTC [orderer.commmon.multichannel] newChainSupport -> PANI 436 [channel: sys-channel] Error creating consenter: failed to restore persisted raft data: failed to create or read WAL: failed to initialize WAL: sync /var/hyperledger/production/orderer/etcdraft/wal: invalid argument
panic: [channel: sys-channel] Error creating consenter: failed to restore persisted raft data: failed to create or read WAL: failed to initialize WAL: sync /var/hyperledger/production/orderer/etcdraft/wal: invalid argument
goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00013dad0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000010320, 0x4, 0x155b2e6, 0x2a, 0xc0001eddd8, 0x2, 0x2, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x101
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(...)
/opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:74
github.com/hyperledger/fabric/orderer/common/multichannel.newChainSupport(0xc0001ba000, 0xc00022c2c0, 0xc0001f0f60, 0x16baba0, 0x21449b0, 0xc0000a1090, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/chainsupport.go:74 +0x92e
github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).Initialize(0xc0001ba000, 0xc0001f0f60)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:168 +0x252
github.com/hyperledger/fabric/orderer/common/server.initializeMultichannelRegistrar(0xc0003fc140, 0xc000086720, 0xc0002de380, 0x0, 0xc0002c23f0, 0x20e7980, 0xc0004e8440, 0x2, 0x2, 0xc0004e8450, ...)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:681 +0x4c3
github.com/hyperledger/fabric/orderer/common/server.Start(0x1532c3e, 0x5, 0xc000280900)
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:189 +0xaa5
github.com/hyperledger/fabric/orderer/common/server.Main()
/opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:91 +0x208
main.main()
/opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:15 +0x20
Пример того, как выглядит мой плот yaml:
raft1:
logging:
options:
max-size: 5m
image: hyperledger/fabric-orderer:1.4.6
container_name: raft1
ports:
- "7050:7050"
environment:
# My env vars
volumes:
- "/mnt/raft1-private/crypto:/opt/crypto"
- "/mnt/rafts-public/genesis:/corp/genesis"
- "/mnt/raftvm1-public/ledger/raft1/:/var/hyperledger/"
command:
- bash
- -c
- |
echo "Starting Raft1..."
orderer
Это происходит только тогда, когда папка бухгалтерской книги указывает на SMB, если я укажу привязку docker mount к папке моего хоста, плот будет работать без проблем.