I am trying to update an existing channel to enable lifecyle.
Official link:
https://hyperledger-fabric.readthedocs.io/en/release-2.2/enable_cc_lifecycle.html
Launching this command on my peer:
peer channel update -f config_update_in_envelope.pb -c channelid -o orderer.domain.com:7050 --cafile /opt/gopath/s
rc/github.com/hyperledger/fabric/crypto-config/peerOrganizations/*******/ca
Error
got unexpected status: BAD_REQUEST -- initializing channelconfig failed: could
not create channel Consortiums sub-group config: setting up the MSP
managerfailed: expected at least one CA certificate
I tried all existing ca certs available on my network and It's not working,
Please help
Thanks
This error was "probably" due to a version mismatch ... one orderer used on my network was still using an 1.4 version, since this orderer has been upgraded it's not possible to reproduce this error again. Even if I do not understand why the error msg is talking about a CA file ...
Related
I'm getting "cannot join: failed to determine cluster membership from join-block: failed to validate config metadata of ordering config: duplicate consenter error when attempting to join a new orderer node to a new channel.
Status: 400
{
"error": "cannot join: failed to determine cluster membership from join-block: failed to validate config metadata of ordering config: duplicate consenter: server cert: -----BEGIN CERTIFICATE-----<serverCertificate>-----END CERTIFICATE-----\n, client cert: -----BEGIN CERTIFICATE-----<clientCertificate>-----END CERTIFICATE-----\n"
}
The <serverCertificate> and <clientCertificate> embedded in the error message are both tls certificates. The <clientCertificate> is for one of the nodes which I'm not even attemptiing to joining to a channel yet.
I'm following the "Creating a Channel" tutorial from version 2.4 documentation, without docker.
I have created all the required certificates (both tls and id
certificates) and folder structures.
The orderer nodes are successfully started.
The genesis block is successfully created.
However, the above error occurs when I run the following CLI, irrespective of the referenced orderers' endpoint.
osnadmin channel join --channelID channel.ppty --config-block /home/dionly/hyperledger/fabric/2.4.3/config/genesis_block.pb -o hlfdev:7443 --ca-file $OSN_TLS_CA_ROOT_CERT --client-cert $ADMIN_TLS_SIGN_CERT --client-key $ADMIN_TLS_PRIVATE_KEY
I have checked the orderer.yaml and configtx.yaml files for duplicate reference to the offending certificates. None was found.
I have also queried TLS CA
$ ./fabric-ca-client identity list -u https://hlfdev:7054 --tls.certfiles tls-root-cert/tls-ca-cert.pem --mspdir tls-ca/tlscaadmin/msp
in case somehow I managed to create a duplicate registry. That does not seem to be the case.
I have gone through the tutorial more times than I can count and always get stock at this same point.
I'd really appreciate any suggestion on what is causing this and how to progress past it.
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.
I'm getting this error when trying to start running my chaincode:
Command: composer network start -c adminCardLessor -n block-aviation-network -V 0.0.1 -A admin -C ./credentials/lessor/admin-pub.pem -f delete_me.card
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: chaincode exists block-aviation-network)
I successfully installed my chaincode on each of my peers but can seem to start it due to the above error...
Does anyone have any experience with this error or how to resolve it?
Because the chaincode already exists on the network, you can only upgrade it, because I am assuming the network is not starting because you made some changes. Look toward questions such as How to upgrade a chaincode after modification? and then try starting the network. This should solve your problem.
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