Sigel Koo
Sigel Koo

Reputation: 11

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

Upvotes: 0

Views: 824

Answers (3)

Sigel Koo
Sigel Koo

Reputation: 11

I used this script.It worked

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

Upvotes: 1

Ta-seen Junaid
Ta-seen Junaid

Reputation: 474

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

Upvotes: 0

RaspiRepo
RaspiRepo

Reputation: 33

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

Upvotes: 2

Related Questions