Composer network install: cannot get package for blockchain - hyperledger-fabric

Composer version v.0.19.5 on Ubuntu
composer network install is producing error. I have chacked all the similar posts regarding these keywords: trying to start business network .... no valid responses from any peers ... cannot get package for blockchain
but it didn't help.
Network version is checked and it is correctly entered in the commmand. START and INSTALL commands are as follows:
composer network install --archiveFile carauction-network1.bna --card PeerAdmin#hlfv1
which resulted in: Successfully installed business network caracution-network1, version 0.2.4.-deploy.0
Command succeeded
composer network start --networkName carauction-network1 --networkVersion 0.2.4 --card PeerAdmin#hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw][2]
resulted in: Starting business network definition. this may take a minute...
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: cannot get package for chaincode (carauction-network1:0.2.4)
I suspect it cannot find npm package. It says: "cannot get package for blockchain". Maybe it is not looking to the right directory. Anyway, where should be respective npm packages? Maybe the key is in the environment variables. My variables regarding Hyperledger are:
GOPATH=/home/hyperl/go
NVM_CD_FLAGS=
NVM_DIR=/home/hyperl/.nvm
NVM_BIN=/home/hyperl/.nvm/versions/node/v8.9.4/bin
PWD=/home/hyperl/.composer/cards/PeerAdmin#carauction-network5 ---> on samo of the trials the value was PWD=/home/hyperl
PATH=/home/hyperl/bin:/home/hyperl/.local/bin:/home/hyperl/.nvm/versions/node/v8.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/go-1.9/bin`

Related

Error While Installing Fabric Chaincode: _lifecycle.syscc: no such file or directory

While trying to install chaincode using Fabric v2.1, I am encountering an error. Does anyone face similar issues? My peer is running fine and able to join the channel as well. I am able to list the channel details as well.
Note: I am doing Native installation without using docker images for running orderer and peer.
Highly appreciate for your support and looking forward to hear from you.
Error:
chaincode install failed with status: 500 - error in simulation: failed to execute transaction 44688cc50afeda03e3f5e7735ae650030952477b6bdfce83064582f42bec6c84: could not launch chaincode _lifecycle.syscc: error building chaincode: error building image: failed to get chaincode package for external build: could not get legacy chaincode package '_lifecycle.syscc': open /home/vagrant/ledger/ORG2/peer1-org2/ledger/chaincodes/_lifecycle.syscc: no such file or directory
I got this error after upgrading from 1.4. In my case the problem was in the old config file for the peer.
Make sure you have next lines in your core.yaml:
chaincode:
...
# enabled system chaincodes
system:
_lifecycle: enable

Convector Framework CLI returns error when installing chaincode

I am very new to the Hyperledger Fabric and Convector Framework and I have followed this tutorial:
https://worldsibu.github.io/convector/modules/getting_started.html
When I try to use the CLI tool and run the command (test is my chaincode name):
npm run cc:start -- test 1
It gives the following errors:
Installing Chaincode test version 1.0 at org1
Error: Error endorsing chaincode: rpc error: code = Unknown desc = access
denied: channel [] creator org [org1MSP]
...
Installing Chaincode test version 1.0 at org2
Error: error getting endorser client for install: endorser client failed to
connect to localhost:7151: failed to create new connection: context deadline
exceeded
I have not changed the configs and MSPs.
What is going wrong and how should I start to resolve the problem? Any guidance is appreciated!
#shole that documentation is now deprecated, you can use http://docs.worldsibu.com/convector for the latest versions.
About your error that usually happens when the environment gets corrupted and keeps cryptographic materials from a previous installation, try re-running npm run env:restart and try again.

adding new peer | 'chaincode with name 'cc' already exists' on composer network start

I am facing issues while while starting chaincode on my newly added peer in hyperledger network. Let me explain you the issue I am facing.
I had up and running hyperledger network where I had installed my bna with version 0.0.1. When I ping my network everything works fine. I have added new peer in network without bringing network down. Now I am trying to install bna on newly added peer. I have added new peer in connection profile for both organizations after adding I have created card and installed on organization where I have added new peer. bna is installed on the peer successfully. Now I am trying to start the network with composer network start. this is the point where I am receiving the following error.
Processing these Network Admins:
userName: user1
userName: user2
× Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Command failed
Please help in this matter. How am I suppose to add bna on newly added peer in network. I dont want bring my network down while adding new peer and install bna file.
So long as the bna is the same on the other peers, then you don't need to do anything else. All you need to do is install it onto the peer (the install command will not install it on peers that already have the bna, but will install it on peers that don't have it), and it sounds like you have done the correct approach by updating your connection profile and run the install command using an identity that is in the same MSP as your new Peer.
You do not need to start the business network because it is already started and that is the meaning of the error you are getting.
Now if you submit a transaction it will be sent to all peers in your connection profile. For your new Peer it will bring up the chaincode (ie the business network) automatically so that it can simulate that submission.

Error - chaincode exists

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.

Hyperledger Composer: install error (Error: Error trying to start business network. Error: No valid responses from any peers.)

When I try to install business network on Fabric, I get the error:
Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: EOF
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: EOF
Logs of peer1 of org1:
Most likely, this is because of wrong setting up a Fabric. Can anybody tell me what I did wrong?
The problem is solved. I just had to configure TLS in peers like so:
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
And set valid key in CA-contaner configuration:
- FABRIC_CA_SERVER_TLS_KEYFILE=[Here path to key]
The same path must be specified after --ca.keyfile in command: field.
I was also getting similar error-
Installing business network. This may take a minute...
Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed
Command failed
The solution work for me is, I have to start the initial setup script commands as part of development environment installation.
$ ./startFabric.sh
$ ./createPeerAdminCard.sh
And then run the command to install the business network-
$ composer network install --card PeerAdmin#hlfv1 --archiveFile tutorial-network#0.0.1.bna
I had the same error, but my fault was wrong env value for
- CORE_PEER_LOCALMSPID=
in docker-compose.yaml for every peer.

Resources