I am trying to deploy a sample ChainCode on Fabric test-network. I bring up the network and then I create a channel and then I run this command: ./network.sh deployCC and I get the following error:
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image inspection failed: Get "http://unix.sock/images/dev-peer0.org1.example.com-basic_1.0-4ec191e793b27e953ff2ede5a8bcc63152cecb1e4c3f301a26e22692c61967ad-42f57faac8360472e47cbbbf3940e81bba83439702d085878d148089a1b213ca/json": dial unix /host/var/run/docker.sock: connect: no such file or directory
Chaincode installation on peer0.org1 has failed
Deploying chaincode failed
I'm guessing you are running Docker on a Mac ? Docker made a change in version 2.4.0.0 (I think) and it causes a problem. You need to uncheck the option "use gRPC fuse".
see https://lists.hyperledger.org/g/fabric/topic/77402508?p=Created,,,20,2,0,0::recentpostdate%2Fsticky,,,20,2,0,77402508
for more details
If you are running Docker Desktop on macOS, this problem is caused by a newer version of Docker Desktop for macOS. To resolve this issue, in the Docker Desktop preferences, uncheck the box Use gRPC FUSE for file sharing to use the legacy osxfs file sharing instead and click Apply & Restart.
If you see errors on your create, approve, commit, invoke or query commands, make sure you have properly updated the channel name and chaincode name.
Related
I use fabric-samples/test-network ./test-network.sh createChannle command to create a test channle, however a problem occured:
a problem
Error: Post "https://localhost:7053/participation/v1/channels": read tcp 127.0.0.1:57664->127.0.0.1:7053: read: connection reset by peer
after executing this command, my docker is fine:
docker
does anyone know how to solve it?
my docker, fabric, fabric-samples are newest, and my go is 1.18.2
I'm working on the hyperledger blockchain on Ubuntu 18-04 LTS via this tuto hyperledger.github.io/composer/latest/tutorials/developer-tutorial . I have installed all the pre-requisites and in this step of running "composer network install", I faced this issue and tried some solutions but still not working.
Any help please ? Thanks !
~/tutorial-network$ composer network install --card PeerAdmin#hlfv1 --archiveFile tutorial-network#0.0.1.bna
✖ 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: Failed to connect before the deadline
Command failed
Docker ps and version
your fabric network is not running.
go to your fabric-dev-servers folder and run ./startFabric.sh
if you get any errors there, like some containers already exist then do a ./teardownFabric.sh first then run the start command again.
This will give you a basic running network with one org, one peer and one orderer.
Once your network is running then you need to create your admin card by running ./createPeerAdminCard.sh
only at this point you are ready to install and start your chaincode.
Just mentioning this for others who might face this issue - While in your case fabric network was not running, in my case it was an issue with proxy. Once I cleared that, I was able to deploy successfully.
There was an Hyperledger Fabric error updating the anchor peer in the Building Your First Network document. This error is as follows.
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: x509: certificate signed by unknown authority
I need your help.
I fixed by bringing the network down (byfn.sh down)
and then up again (byfn.sh up).
Please see this link for more information:
How to fix "FAILED to execute End-2-End Scenario" in Hyperledger Fabric?
x509: certificate signed by unknown authority
This error is due to the certificate format mismatch, It happed to me when I used v1.0 cryptogen tool for certificate generation and ran the network with v1.1 Fabric containers.
So, try to update the cryptogen tool from here -> http://hyperledger-fabric.readthedocs.io/en/release-1.1/samples.html#binaries.
I don't know what version you were using so, I assumed it would be v1.1. So, please specify the Hyperledger Fabric version you were using.
One of the problems could be that you have an old version of the Hyperledger Example and you are pointing to an old version of the Cryptogen tool. So if you download a newer example, when you generate the crypto-config it will generate it with the old version of the cryptogen tool, this could make your orderer container to stop, cause can validate the certificate generated.
This is because the differents versions of the cryptogen tool generate different metadata.
My suggest is to check if the cryptogen version that you are using is the one contained in your downloaded image of your example. If you had run lot of tests, clean all the docker images and containers, that always help.
If nothing of that works, I wrote a tutorial based on the basic-network example and how to run it in multiple hosts, maybe you can take some information from there.
https://medium.com/1950labs/setup-hyperledger-fabric-in-multiple-physical-machines-d8f3710ed9b4
Please, feel free to ask, if you have doubts!
This error is due to channel capabilities are set as true for v.1.4.0 so you should change it to false so that it can run for every version of the fabric.
Try:
docker ps -a
to find container ID of hyperledger orderer and peer images. Then try:
docker rm *container_ID*
to remove them. After you can run ./network.sh up createChannel.
so for this error i tried doing byfn.sh down and byfn.sh up but after that it threw another error, which i solved by first killing all the containers, removing them, cleaning all images and volumes that already exist and restarted the tutorial. to kill and remove processes and images and cleaning my system.
https://medium.com/coinmonks
docker kill $(docker ps -q)
docker rm $(docker ps -qa)
docker system prune -a
docker volumes prune -a
delete fabric-samples directory and start from the beginning and you're ready to go.
since the recent upgrade I have trouble to start or deploy changes on my network. The commands : composer network start and composer network upgrade both give me this error message:
Error: Error trying to upgrade business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
I saw several posts with the same problem but no clear solution. The same thing is happening on the Playground UI when I want to deploy changes. I verified that I'm not behind a proxy or else. Thanks
Make sure that your peer is on by running docker ps
Check your docker ps list, make sure that there is no same version running to which you are upgrading. If so exist, delete it using
> docker stop containerId
> docker rm containerId
also before creating the archive file do not forget to set new version in package.json or you will get error like:
Error trying install business network. Error: The business network
is already installed on all the peers
I have run IBM marbles demo for implementing blockchain mentioned in below link:
https://github.com/IBM-Blockchain/marbles
When I have run Hyperledger Fabric and Marbles application on the same system(Ubuntu), it is working.
But when I have tried to run Hyperledger Fabric and client-side marble application in two different systems (one ubuntu and the other windows), it is not working.
Network script is running properly on Ubuntu.
And I also have changed in blockchain credential file by replacing localhost to IP address on which we need to run marbles application.
But when I am running chaincode installation script by running "node install_chaincode.js", it is giving an error as below :
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed error: [fcw] Failed to obtain endorsement for transaction. code=14, error: [fcw] Error in install catch block object code=14
Can anyone provide me the solution or any reference link?
Thanks in advance.