Jeroen
Jeroen

Reputation: 105

Composer network start timeout

I'm trying to do a composer network start with the following command:

composer network start --networkName cgi-blockchain --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card

It then goes on to;

Starting business network definition. This may take a while...

But after a couple of minutes it says;

Error: Error trying install business network. Error: No valid response from any peers. Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed

Anyone has a clue how to fix? I followed the tutorial on: https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial

Upvotes: 1

Views: 851

Answers (2)

Andrei Dragotoniu
Andrei Dragotoniu

Reputation: 6335

your network is not up.

start with a clean slate I'd say. the following commands are all run inside your fabric-dev-servers folder.

do a :

  1. ./tearDownFabric.sh or ./stopFabric.sh if you want something less destructive

  2. ./startFabric.sh

  3. ./createPeerAdminCard.sh this last command might fail if the card is already there. You can check this with composer card list

if you need to delete cards you can use this: composer card delete --card name you get the name from the list command

switch to the folder where your network definition files are and run the usual commands :

composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected]

composer network start --networkName your-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1

composer card import --file [email protected]

at this point you can start the rest server with composer-rest-server

note, you will need to update these commands with your bna name and version, plus password, card names, whatever you have in your setup

if you change the name of the project, then be consistent, change the name of the network card, your namespaces, configuration files everything. wherever you had tutorial-network, replace with the new name, change the name of the bna file as well. Basically make a note of all the commands you used to create the tutorial-network and repeat them changing the name to the new one. I did the same thing with my project and once I got everything right, it wasn't a problem anymore

Upvotes: 2

R Thatcher
R Thatcher

Reputation: 5570

Usually this error "Error: 14 UNAVAILABLE:" means a network connect failure - so if you are using the standard development fabric, and following the Developer tutorial, I would say that your Fabric is probably not started.

Before you run the startFabric.sh script again - read this previous Q&A about starting / stopping the development Fabric.

Upvotes: 0

Related Questions