So I've started hyperledger fabric following this tutorial:
https://medium.com/coinmonks/hyperledger-fabric-cluster-on-multiple-hosts-af093f00436
Everything seems to be working fine, but now I want to install my bna on it.
I do it using command:
composer network install --card PeerAdmin#hlfv1 --archiveFile my-network#0.0.1.bna
But after some time I get request time out error:
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
I've tried adding this to my peer's environment:
- CORE_CHAINCODE_STARTUPTIMEOUT=1200s
However, it seems that it had no effect and timeout occurs earlier than 1200s after the launch of command.
Also, I checked all of my container's docker logs but didn't find any errors.
I guess for some reason timeout time is either not being increased or there's some connection error while installing the network.
I expect bna to be installed just as in the tutorial. To be clear, if I install network as in the tutorial, everything works just fine, but now I need hyperledger fabric to run in different machines and use different peers.
Hyperledger composer can't connect to the hyperledger fabric network.
I also had a lot of these issues.
My tip: Restart everything and try again.
This often resolves the problem. Hope this helps.
Happy coding :)
As a note, Composer is all but dead. We are no longer actively maintaining, or developing it. So changes to the Fabric codebase can have negative effects against Composer.
I am trying to deploy fabric using composer (composer, docker, docker -composer). I have been able install most of the items using composer documentation and some online tutorials. However, when I try to start my network using the following command, I get error messages that follow the commandlines. May be someone can help with this:
Commandlines
composer network start --networkName block-track --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin#hlfv1 --file networkadmin.card
Error Messages
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
ComError: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Command failed
In this case, the fabric network is running good but composer-cli can't get a response from a fabric network. Sometimes it depends on network connectivity.
you need to restart fabric network by ./stopFaric.sh and again start by ./startFabric.sh from the fabric-tool folder and again try to start the network.
To check your development, follow the this link for building a Hyperledger Composer blockchain solution.
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.
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'm trying Hyperledger Composer v0.16.0. According to this procedure, I want to Deploy BNA to Fabric network on cloud. but following error occurs.
Kindly let me know how I can solve it.
command:
composer network start --card PeerAdmin#myfabric --networkAdmin admin --networkAdminEnrollSecret adminpw --archiveFile trade-network.bna --file networkadmin.card
result:
tarting business network from archive: trade-network.bna
Business network definition:
Identifier: trade-network#0.1.13
Description: Commodities Trading Business Network
Processing these Network Admins:
userName: admin
✖ Starting business network definition. This may take a minute...
Error: Error trying to instantiate composer runtime. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: chaincode error (status: 500, message: chaincode instantiation policy violated(Failed to authenticate policy))
Error: No valid responses from any peers may be b/c you don't ./startFabric (in fabric-tools folder) or may be the .acl file (permissions.acl) have error (try change it to the beginning version).
The error 'Error: Error trying to instantiate composer runtime.' Suggests you have not run the composer runtime install command e.g.
composer runtime install -c PeerAdmin#fabric-network -n tutorial-network
Or that the command did not complete successfully.
The other possibility is that your fabric has stopped or is not contactable.
The runtime must be installed on fabric for the network to start.
"composer runtime install -c PeerAdmin#hlfv1 -n "
The Steps:
1) ./startFabric.sh,
2) ./createPeerAdminCard.sh,
3) composer runtime install -c PeerAdmin#hlfv1 -n ,
4) composer network start -a ./#0.0.1.bna -A admin -S adminpw -c PeerAdmin#hlfv1
there seems to be some challenges / bug with the use of composer
Composer Updates : 0.19.0 Changes:
End of March developers of Composer framework released version 0.19.0. Although there are multiple new features (mostly under the covers) in this release, it also introduced some BREAKING changes :( So what does that mean? It means that:
Some of the composer CLI commands have become obsolete or have changed
BNA Installation commands have changed ( install + start )
Following Composer CLI commands have been removed
runtime install, network deploy, network update, network undeploy
BNA upgrade requires an install of new version followed by
Composer card commands standardised to use -c or --card. Earlier some commands used -n and some used -c
Some of the Composer API have changed
That error can mean that the identity you are using to perform a network start doesn't have channel admin authority and thus is not authorised to perform a network start. I would suggest you check with whoever created your Hyperledger Fabric environment and channel to find out who the right identities are for administrative authority on the channel and build a card with the appropriate crypto material representing that identity in order to perform a network start.
1. ./stopFabric.sh
2. export FABRIC_VERSION=hlfv11
3. ./startFabric.sh
4. ./createPeerAdminCard.sh
5. install network
6. start network
Please create a new card with your business network name. Hopefully it will work:
composer network start --card PeerAdmin#myfabric --networkAdmin admin --networkAdminEnrollSecret adminpw --archiveFile trade-network.bna --file trade-network.card
I came up with a solution to my problem, which is similar to yours, it might be useful to you too:
I noticed that with other networks it works properly so, there is a problem with the DNS:
Edit or create /etc/docker/daemon.json in your machine and add:
{ "dns": ["your dns", "8.8.8.8"] }
Stop Fabric, restart Docker, Start Fabric
Repeat composer install and composer start
Well i was getting the similar error :-
Upgrading business network definition. This may take a minute...
Error: Error trying to upgrade 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: could not find chaincode with name 'airlinev9')
Command failed
My composer version: v0.19.4
What I was trying to do:-
I was trying the update my BNA to a newer version. But got the error which i shown you above.
What I did to solve the issue :-
I first deleted the previous card using the command :-
composer card delete -c admin#airlinev9
And then start the BNA with (already created, installed):-
composer network start -c PeerAdmin#hlfv1 -n airlinev9 -V 0.0.3 -A
admin -S adminpw
And it worked for me.
I am SUPER new to HyperLedger hence I am not sure on how it worked out me but just in case might work for you too so try it out. I did only 2 things((on fabric-tool directory) :
1) ./startFabric.sh
2) ./createPeerAdminCard.sh
Ok I agree I lied. Not 2 things but 3.
3) Retry .bna association as expected normally.
I hope it works for you too :)