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.
Related
I was trying to build the docker image for a project I'm working onto.
It's based on jhipster, after configuring the project it tells me to run the following maven command:
./mvnw -ntp -Pprod verify jib:dockerBuild
Unfortunately it doesn't seem to work, it returns me this errors:
[WARNING] The credential helper (docker-credential-pass) has nothing for server URL: registry.hub.docker.com
...
[WARNING] The credential helper (docker-credential-pass) has nothing for server URL: index.docker.io
[WARNING]
And finally fails with:
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.4.0:dockerBuild (default-cli) on project booking: (null exception message): NullPointerException -> [Help 1]
Recently I worked on a google cloud project, and I edited the ~/.docker/config.json configuration file. I had to remove google's configuration entries to sort out another problem. Could that be the origin of the problem I'm facing now?
I've tried to do docker logout and docker login without success.
Some considerations
I don't know if editing manually the configuration caused the error, in fact I'm pretty sure to have deleted only google-related entries, but nothing referring to docker.* or similar.
To solve this issue, avoid to edit manually the docker configuration file. In fact I think that it should be avoided whenever possible, to avoid configuration problems of any sort.
Instead, just follow what the error message is trying to tell you: docker is not able to access those urls. Excluding network problems (which you can troubleshoot with ping registry-1.docker.io for example), it should be an authentication problem.
How to fix
I've found out that running those commands fixed it:
docker login registry.hub.docker.com
docker login registry-1.docker.io
I don't know if registry-1.docker.io is just a mirror of the other first server, which the plugin tries to access after the first unsuccessful connection. You can try to loging to registry.hub.docker.com and re-launch the command to see if it sufficient. In case it's not, login to the second one and then it will work.
I ran jib via Gradle:
./gradlew jibDockerBuild
and got a similar error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jibDockerBuild'.
> com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Build to Docker daemon failed, perhaps you should make sure your credentials for 'registry-1.docker.io/library/openjdk' are set up correctly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized for help
What ended up solving this error for me, bizarrely enough, was to log out of Docker Desktop.
I later also tried funder7's solution while logged in to Docker Desktop, and that also worked.
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).
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.
I have just started exploring the blockchain technology. I was working around the installation part by following this tutorial.
I have created /mychain directory and docker-compose.yml. when i run the command sudo docker-compose up it starts pulling member services hyperledger/fabric-membersrvc. But after that it throws error
Pulling vp0 (hyperledger/fabric-peer:latest)...
ERROR: manifest for hyperledger/fabric-peer:latest not found
Please someone guide me on this.
Change the tag from latest to x86_64-1.0.2 in the compose file. There is no latest tag for this image. You can get all available tags on below link
https://hub.docker.com/r/hyperledger/fabric-peer/tags/
If you don't add any tags to fabric-peer, docker try to pull image with latest tag. And there is no latest tag for fabric-peer.
So you should use an available tag, see available tags here.
I had the similar issue, the problem was fabric failed to download peer binary with tag '2.2.1' and 'latest' during 'curl' command execution with following error.
Peer image getch failed:
====> hyperledger/fabric-peer:2.2.1
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout
Error response from daemon: No such image: hyperledger/fabric-peer:2.2.1
Error response from daemon: No such image: hyperledger/fabric-peer:2.2.1
Solution which worked for me:
Have downloaded peer 2.2.1 manually using below command
docker pull "hyperledger/fabric-peer:2.2.1"
NOTE:
"network.sh up" also throws error as it is trying to use peer binary of latest tag which is not present in docker hub. Since 2.2.1 was the latest I have created tag manually using below command.
docker image tag hyperledger/fabric-peer:2.2.1 hyperledger/fabric-peer:latest
Then it worked. You can use your version accordingly.
For HyperLedger 2.3, I found that the 'network.sh' file needs to be edited.
This file can be found under 'fabric-samples/test-network' directory.
Find the constant 'IMAGETAG' and replace its value "latest" into "2.3" or whatever your peer version is.
This constant will be referenced in all the docker-compose files.