I am following this tutorial https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html Where i have successfully generated my channel by using ./byfn.sh -m generate / up Now trying to start the network by using
# command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
I have faced following error :
Channel name : mychannel
Creating channel...
panic: Fatal error when initializing core config : Error when reading core config file:
Unsupported Config Type ""goroutine 1 [running]:panic(0xbb8400, 0xc0421fd4b0)
/opt/go/go1.7.linux.amd64/src/runtime/panic.go:500
+0x1afmain.main()/w/workspace/fabric-binaries-x86_64/gopath/src/github.com/
hyperledger/fabric/peer/main.go:94 +0x859
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
I think the network was not ready to run that script.
Please modify the command like this:
command: /bin/bash -c 'sleep 10s; ./scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
Related
I'm trying to install Hyperledger in my Ubuntu Stand Alone system, After running sudo ./byfn.sh up i got this Error please help..!
Error: failed to create deliver client for orderer: orderer client
failed to connect to orderer.example.com:7050: failed to create new
connection: connection error: desc = "transport: error while dialing:
dial tcp: lookup orderer.example.com: no such host" !!!!!!!!!!!!!!!
Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
byfn.sh script was used with older fabric versions and is no longer supported. The latest fabric-samples is having a network.sh script to setup fabric network. Detailed tutorial is available in official docs.
Error: endorsement failure during invoke. response: status:500 message:"make sure the chaincode basic2 has been successfully defined on channel mychannel and try again: chaincode definition for 'basic2' exists, but chaincode is not installed"
It gives me this error whenever I try to invoke chaincode but when I try to install chaincode again it shows that chain code is successfully installed. what should be the meaning of this error?
It also does not create a docker container.
So i try to instantiated with command
COMMAND: peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -l node -n basic2 -v 1 -c '{"Args":["init"]}' -P 'OR ("Org1MSP.member")'
But then i got new error:
Error: error getting broadcast client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded
I check the logs of Orderer then it shows :
Can anyone tell me what is problem and how should i resolve it?
Try enabling the tls using the '--tls' flag. Also, you can refer to this similar question here
Make sure you're following the steps properly. Also, if you're sure about the steps, sometimes it works if you retry without making any changes, just repeat the step where you're facing the error without making any changes, it should work on the 3rd try atmost if everything goes well.
docker exec cliMagnetoCorp peer chaincode install -n papercontract -v 0 -p /opt/gopath/src/github.com/contract -l node .
above line is mentioned in the fabric documentation https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html
when i run this then its giving below error
Error: Error endorsing chaincode: rpc error: code = Unknown desc =
chaincode error (status: 500, message: Error installing chaincode code
papercontract:0(chaincode
/var/hyperledger/production/chaincodes/papercontract.0 exists))
my question is how does /opt/gopath/src/github.com/contract come from in your documentation. its never mentioned anywhere.
Moreover,
./../../../../organization/magnetocorp:/opt/gopath/src/github.com/
its written in docker-composer.yml. how /opt path is related and connected here ?
I am following this link first-network to run hyperledger samples name first-network.
I am using Ubuntu 18.04LTS
./byfn.sh -m generate got successfully executed.
When I am trying to execute ./byfn.sh -m up I am getting error
`2018-05-08 08:45:22.485 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp folder
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
Edits 1: Adding docker compose files
docker-compose-cli.yaml
docker-compose-couch.yaml
docker-compose-e2e.yaml
docker-compose-couch-org3.yaml
docker-compose-e2e-template.yaml
docker-compose-org3.yaml
Your crypto materials are not getting generated properly as required . Check that you have all the Prerequisites installed on the platform(s) I hope you have downloaded all the platform specific binaries https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.sh
This will make sure you have the correct Cryptogen and Configtxgen tools for creating crypto material,ca clients and channel configurations .
I'm trying to make the tutorial "Chaincode for Developers" work. But at the section "Terminal 3 - Use the chaincode" I'm stuck trying to run this command
$ peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10"]}' -C
myc
It exits with this error :
Error: Error endorsing chaincode: rpc error: code = Unknown desc =
Failed to init chaincode(handler not found for chaincode mycc:0)
I've done some research but I don't know what to do. Could somebody please help me ?
This is solved. There were three primary problems.
As Chris mentioned, the certs are expired. In the future you can easily check a certificate's validity by parsing it. For example openssl x509 -in your_cert.pem -text
The provided artifacts were not configured properly. Namely, the configtx.yaml that the configtxgen utility consumed did not have the orderer address defined correctly.
Lastly, the documented command to start the chaincode used the wrong port for the peer address. Should be 7052 not 7051.
I will push a fix for this shortly