I was trying to create my own private network in ubuntu with hyperledger-fabric as mentioned in the documentation. When I was running the command ./byfn.sh up I get the following error
Error: error getting chaincode bytes: failed to calculate
dependencies: incomplete package:
github.com/hyperledger/fabric-chaincode-go/shim !!!!!!!!!!!!!!!
Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
Please help me solve this issue.
Thank you.
As there is not enough information provided.If it's a 2.0 network then the shim package and dependencies are not included in the images.
https://github.com/hyperledger/fabric/releases/tag/v2.0.0
So you have to manually install them.
You can install them inside your CLI container by:
go get github.com/hyperledger/fabric-chaincode-go/shim
and then run the peer chaincode installation command.(don't forget to import the path in your chaincode).
Related
I am having trouble with docker, i had an image which i imported using the following command:
docker image import C:\Users\****\Downloads\imagename-b1.tar imagename-b1:latest
And when i try to run image/container, for the image it gives this error:
Failed to run image. Error invoking remote method 'docker-run-container': Error: (HTTP code 400) unexpected - No command specified
And for the container it gives this error:
Error invoking remote method 'docker-start-container': Error: (HTTP code 400) unexpected - failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--name": executable file not found in $PATH: unknown
Docker Version 20.10.21, build baeda1f
I'll appreciate any suggestion.
Thank you
Just had a similar issue.
Try starting the image from your terminal. Works for me when I did that.
Can check this Github issue too.
https://github.com/dotnet-architecture/eShopOnContainers/issues/1699
After using the CMD to start the image, later encountered port issues.
Found this solution that works now. https://github.com/docker/for-win/issues/9272#issuecomment-776225866
TL;DR:
net stop winnat
Then start your docker container. Then
net start winnat
Followed instructions and installed Docker for the first time. Then I input everything in terminal as stated. Error on make up language=node
cannot write /var/folders/fw/44x2zkk9337ddrtbq5cp5w940000gn/T/tmph4o_dkt6 because server did not provide an image ID
ERROR: Service 'frontend' failed to build : Build failed
make: *** [up] Error 1
zsh: command not found: #
This looks like a Docker issue - See this thread here:
docker buildx install
The above command seemed to work for these folks.
I was following this tutorial and found out that I am getting this error when I try:
composer network install --card PeerAdmin#hlfv1 --archiveFile tutorial-network#0.0.1.bna
Error is:
✖ 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: REQUEST_TIMEOUT
Command failed
Any lead will be helpful.
Update:
docker ps output as follows:
To check your development environment, I would recommend follow the first tutorial composer example from https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.
If this works, you can replace logic.js, model.cto and permissions.acl file from your link.
I was having the same error. None of the Peers responded withing the given time. I edited the docker-compose.yaml file inside
~/fabric-dev-servers/fabric-scripts/hlfv12/composer
and added the following line
- CORE_CHAINCODE_STARTUPTIMEOUT=1200s
to the
peer0.org1.example.com container environment.
Then I did a Teardown and re-executed the same steps. This time, it worked. You just need to increase the TIMEOUT from default 300s to 1200s. It happens when you do not have enough resources on your PC and the time to process the installation increases.
I installed the latest Composer locally on an Ubantu Linux and then started with the composer.sh. It works fine, I can do anything what I want. After restarting the composer, however, it fails to connect again.
I get the following error:
Exception:
Error: Error trying to ping.
Error: make sure the chaincode gowdanar-funds has been successfully instantiated and try again: getccdata composerchannel/gowdanar-funds responded with error: could not find chaincode with name 'gowdanar-funds'
Error: Error trying to ping.
Error: make sure the chaincode gowdanar-funds has been successfully instantiated and try again: getccdata composerchannel/gowdanar-funds responded with error: could not find chaincode with name 'gowdanar-funds'
at _checkRuntimeVersions.then.catch (/home/santosh/.nvm/versions/node/v8.12.0/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:798:34)
at anonymous
What can I do to solve this problem?
This error is due to vertion problem of your node js. Check the node vertion by typing node -v comment. The change the vertion of node js to 8.11.3 or 8.9. Then restart it.
I have already implemented my .bna file named "supply-chain-network" but I think that the problem isn't in the .bna, since I have tried with another .bna(the basic-sample-network in hyperledger composer playground) and the problem still persists.
Composer version: 0.19.2
Operating System: Ubuntu 16.04 running in VM
Steps:
download the fabric-dev-servers
./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
exported the basic-sample-network from the playground (my-basic-sample.bna)
composer network install --card PeerAdmin#hlfv1 --archiveFile my-basic-sample.bna#
composer network start --networkName my-basic-sample --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin#hlfv1 --file networkadmin.card
And I got the following error:
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 (my-basic-sample:0.0.1))
I have checked and the name of the network and the version by issue the command:
composer archive list -a my-basic-sample.bna
And I got:
Listing Business Network Archive from my-basic-sample.bna
Identifier:my-basic-sample#0.2.4-deploy.0
Name:my-basic-sample
Version:0.2.4-deploy.0
Command succeeded
I have tried to issue composer network start with version 0.2.4 instead of 0.0.1 and I got the same error.
The log of the docker by typing:
docker logs peer0.org1.example.com
I got:
I have seen on https://github.com/hyperledger/composer/issues/3591#issuecomment-386718739 that this error is caused by an extra character when copy pasting the command from the hyperledger composer website. I have done what hi2rashid suggests(copy the command to a notepad and then copy to the command line) but I still got the same error.
Anybody know how to fix this ?
You are very close to getting this working ...
The composer archive list command has listed the version as "0.2.4-deploy.0" - although this doesn't look like a version "number" it is. Your network start command should include --networkVersion 0.2.4-deploy.0
This long version comes from Composer Playground autogenerating versions when the model is upgraded.