简体   繁体   中英

“Error retrieving consenter of type: etcdraft” when trying to set up Hyperledger Fabric

I did the following the instructions in the manual when trying to set up Hyperledger Fabric 1.4.7 and having cloned the samples from GitHub and used the first-network starting point. At first, I got the expected output: (I removed all the references to EtcdRaft in configtx.yaml )

rm -r channel-artifacts/*
export FABRIC_CFG_PATH=$PWD
cryptogen generate --config=./crypto-config.yaml
configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
export CHANNEL_NAME=mychannel
configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org2MSP
docker-compose -f docker-compose-cli.yaml up -d

Now docker is up and I try this:

docker logs orderer.example.com

And after normal output, I get this:

2020-06-16 18:08:47.746 UTC [orderer.commmon.multichannel] newChainSupport -> PANI 008 Error retrieving consenter of type: etcdraft
panic: Error retrieving consenter of type: etcdraft

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000ec580, 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(0xc000240070, 0x4, 0x156734e, 0x26, 0xc000347b30, 0x1, 0x1, 0x0, 0x0, 0x0)
        /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x100
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(0xc000172000, 0xc00054a060, 0xc0003205d0, 0x16c8800, 0x208ffe0, 0xc000324540, 0x0)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/chainsupport.go:69 +0xa06
github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).Initialize(0xc000172000, 0xc0003205d0)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:168 +0x252
github.com/hyperledger/fabric/orderer/common/server.initializeMultichannelRegistrar(0xc0003b8b80, 0x0, 0x0, 0x0, 0xc0002065a0, 0x2021b00, 0xc0003ee0e0, 0x2, 0x2, 0xc0003ee0f0, ...)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:681 +0x4a5
github.com/hyperledger/fabric/orderer/common/server.Start(0x1543ab2, 0x5, 0xc0002c2480)
        /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:189 +0xa94
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

But there is no more reference to EtcdRaft anywhere that I can find. What's going on?

EDIT:

Trying to add EtcdRaft creates this error instead:

2020-06-17 01:10:40.083 UTC [orderer.commmon.multichannel] Initialize -> INFO 00e Starting system channel 'byfn-sys-channel' with genesis block hash fbbc5d4bd63c38a9623fb3c3d68493d8441d3de4e249d9a8cabba0619978c56d and orderer type etcdraft
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xfaee39]

EDIT:

I tried it with Hyperledger Fabric version 2.1, which requires Raft, and I get the same error from Raft as above.

EDIT:

For the sake of completeness, here's the full log of the log for the orderer for Hyperledger 1.4.7 and the full log for the orderer Hyperledger 2.1.0 .

If you are receiving the panic:

Error retrieving consenter of type: etcdraft

This can generally be attributed to one of two things.

  1. You are using Fabric v1.4.0, rather than v1.4.1+. Raft ordering was introduced in v1.4.1 , which is often a topic of confusion.
  2. You have specified a Genesis Type of None and are using a version of Fabric prior to v2.2.0 which at the time of this writing is unreleased. This bug is documented as FAB-17774 and should be included as part of v2.2.0.

If you ensure that the images you are using are current, and that genesis type is not set to none, I expect your errors will go away.

If on the other hand, you are attempting to use some consensus type other than etcdraft (which, for new deployments etcdraft is the recommended consensus type), then ensure that the consensus type in your configtx.yaml has been set to the appropriate type, for instance 'solo'. Ensure that all artifacts, including any volumes persisted by your docker compose have been deleted, and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM