From fabric document create-join-channel, when I execute the command
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/
Try adding a entry in the /etc/hosts for the domain in use (usually example.com)
go to terminal: type "sudo /etc/hosts" in the top add in "127.0.0.1 example.com" press ctrl+o to save, confirm with 'y', press ctrl+x to exit.
try again.. should work.
./byfn.sh -m restart -c mychannel
The reason you're getting this is probably because the docker-compose-cli.yaml
file is still running the script.sh
script. Comment out the line that invokes the script and it will run fine. Example:
# Comment out the line like the example below by adding a #
# command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME} ${DELAY} ${LANG}; sleep $TIMEOUT'```
I am suggesting a documentation change to fix this.
I had similar error. There seems to be a issue with the way CHANNEL_NAME variable is set within the docker-compose (I guess?). I ran this command with a slight modification as below [changed flag '-c $CHANNEL_NAME' to '-c mychannel']:
peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
This worked.
The same thing happens to me but I just down the network and then done all procedure again like generate genesis block again and then up my network I got up a network.
As @Phil said, you should comment out that line before you start the network. As documentation says :
If left uncommented, that script will exercise all of the CLI commands when the network is started, as we describe in the What’s happening behind the scenes? section. However, we want to go through the commands manually in order to expose the syntax and functionality of each call.
see the doc