简体   繁体   中英

Why ./network.sh createChannel always give Channel creation failed and Create channel failed error?

I followed the Official Fabric Test Network tutorial "Using the Fabric Test Network ", but reported some errors when I ran ./network.sh createChannel. Log and errors like this

+ peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /home/centos/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=1
Error: failed to create deliver client for orderer: orderer client failed to connect to localhost:7050: failed to create new connection: context deadline exceeded
Channel creation failed
Create channel failed

If you are first time user you can try the following to bring up network with given channel name

./network.sh down
./network.sh up createChannel -c mychannel

我使用了这个脚本。它有效

./network.sh up createChannel -ca -c mychannel -s couchdb -i 2.2.0

This situation is arisen due to TLS certificate.

For example, it may happen due to "client TLS / server no TLS". So please check "--tls $CORE_PEER_TLS_ENABLED" option. "$CORE_PEER_TLS_ENABLED" should be true.

So you can see something like this in console:

+ peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block  --tls true --cafile /home/centos/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

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