v0.18.1 error , can't start network - hyperledger-fabric

when I run
composer network start -c PeerAdmin#hlfv1 -a test-network.bna -A admin -S adminpw
it took a long time then got a timeout error
Error: Error trying to instantiate composer runtime. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
docker ps
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
84daf56fde06 hyperledger/fabric-peer:x86_64-1.1.0-rc1 "peer node start" 12 minutes ago Up 12 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
a6835cf4ed34 hyperledger/fabric-orderer:x86_64-1.1.0-rc1 "orderer" 12 minutes ago Up 12 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
3ab21e84dc6e hyperledger/fabric-couchdb:x86_64-0.4.6 "tini -- /docker-ent…" 12 minutes ago Up 12 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
64acf6dc5db7 hyperledger/fabric-ca:x86_64-1.1.0-rc1 "sh -c 'fabric-ca-se…" 12 minutes ago Up 12 minutes 0.0.0.0:7054->7054/tcp ca.org1.example.com
$ docker logs peer0.org1.example.com
2018-03-15 03:02:51.419 UTC [endorser] simulateProposal -> ERRO 4bf [composerchannel][9b4c096b] failed to invoke chaincode name:"lscc" ,
error: timeout expired while starting chaincode test-network:0.18.1(networkid:dev,peerid:peer0.org1.example.com,tx:9b4c096bcffd303acdafbc46ca17a2d69c33de917ccc0d47965b43dd67484960)

The composer network start command is creating a new docker container and using npm install within that container, so your timeout could be a result of a slow system creating the container, and/or slow performance of the npm install command.
The default timeout is 300 seconds, but you can increase that value with the environment variable CORE_CHAINCODE_EXECUTETIMEOUT=800s
If you look at the docker-compose yaml file that is used to start your Fabric (specifically the Peer) then you can add an additional line for this environment variable.
If you are using the default Dev Fabric, the file you are looking for is probably: ~/fabric-tools/fabric-scripts/hlfv11/composer/docker-compose.yml

Related

Unable to start Fabric on Mac OS, startFabric.sh gives daemon error

I am following the setup as per https://hyperledger.github.io/composer/latest/installing/development-tools.html. But when I run ./startFabric.sh, I run into error as per below logs
docker ps -a:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
53263f6dc18e hyperledger/fabric-peer:1.2.1 "peer node start" 20 minutes ago Exited (1) 13 minutes ago peer0.org1.example.com
8e558708b7f6 hyperledger/fabric-orderer:1.2.1 "orderer" 20 minutes ago Exited (1) 13 minutes ago orderer.example.com
0c373a640583 hyperledger/fabric-couchdb:0.4.10 "tini -- /docker-ent…" 20 minutes ago Up 13 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
e86a4960ab44 hyperledger/fabric-ca:1.2.1 "sh -c 'fabric-ca-se…" 20 minutes ago Up 13 minutes 0.0.0.0:7054->7054/tcp ca.org1.example.com
e30099dbd318 hello-world "/hello" 23 minutes ago Exited (0) 15 minutes ago hungry_zhukovsky
cd fabric-dev-servers/ && ./startfabric.sh:
Development only script for Hyperledger Fabric control
Running 'startfabric.sh'
FABRIC_VERSION is set to 'hlfv12'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Stopping couchdb ... done
Stopping ca.org1.example.com ... done
Removing peer0.org1.example.com ... done
Removing orderer.example.com ... done
Removing couchdb ... done
Removing ca.org1.example.com ... done
Removing network composer_default
Creating network "composer_default" with the default driver
Creating couchdb ... done
Creating orderer.example.com ... done
Creating ca.org1.example.com ... done
Creating peer0.org1.example.com ... done
sleeping for 15 seconds to wait for fabric to complete start up
Error response from daemon: Container
3e81f3aa41969a7ae3f7a09c5c42c16aa55e2527958aef319ad93988ca942f7f is not running
On checking the logs for this container, i see this error :
2019-09-06 09:27:49.868 UTC [msp] getPemMaterialFromDir -> DEBU 020 Reading directory /etc/hyperledger/peer/msp/signcerts
2019-09-06 09:27:49.868 UTC [main] main -> **ERRO 021 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/peer/msp: could not load a valid signer certificate from directory /etc/hyperledger/peer/msp/signcerts: stat /etc/hyperledger/peer/msp/signcerts: no such file or directory**
I get the same error when I try to start the peer container from Kitematic
My setup is as per below:
docker --version: Docker version 19.03.1, build 74b1e89
composer --version: v0.20.9
I found same issue https://github.com/hyperledger/composer/issues/4202 on Windows 10 however I am facing this on Mac OS X 10.11.6.
2019-09-06 09:27:49.868 UTC [main] main -> ERRO 021 Cannot run peer
because error when setting up MSP of type bccsp from directory
/etc/hyperledger/peer/msp: could not load a valid signer certificate
from directory /etc/hyperledger/peer/msp/signcerts: stat
/etc/hyperledger/peer/msp/signcerts: no such file or directory
It Means running container cannot able to access the mounted certificates folder
Please check volume mount !! in the docker-compose file

Hyperledger composer network upgrade timout error

I am getting this error while upgrading bna file on network:-
Error trying to upgrade business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Any solution to this?
first i installed the initial version of bna file and start the network and it works perfect with these commands:-
composer network install -c PeerAdmin#hlfv1 -a medicalprovenance#0.0.0.bna
composer network start --networkName medicalprovenance
--networkVersion 0.0.0 -A admin -S adminpw -c
PeerAdmin#hlfv1
but when i tried to upgrade the network with these commands :-
composer network install -a medicalprovenance#0.0.1.bna -c PeerAdmin#hlfv1
composer network upgrade --networkName medicalprovenance --networkVersion
0.0.1 -c PeerAdmin#hlfv1
it fails with timeout error as described in question
I am using fabric dev server single organisation network.
name and version information in package.json file is:-
"name":"medicalprovenance","version":"0.0.1"
docker ps -a output is:-
5d86afea3b9f dev-peer0.org1.example.com-medicalprovenance-0.0.0-fccf8faa81606e91484c24fcd1f851b4d93c9632dce32d2ff3a90b0f12ed12f4 "/bin/sh -c 'cd /usr…" 24 minutes ago Up 24 minutes dev-peer0.org1.example.com-medicalprovenance-0.0.0
a9d40b271b2c hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 26 minutes ago Up 26 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
c1b90e2f062f hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" 26 minutes ago Up 26 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
795e16cdaca1 hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 26 minutes ago Up 26 minutes 0.0.0.0:7054->7054/tcp ca.org1.example.com
f5c65f2cce16 hyperledger/fabric-couchdb:x86_64-0.4.6 "tini -- /docker-ent…" 26 minutes ago Up 26 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb

composer network install command gives error as Error: 14 UNAVAILABLE: EOF

I am using Hyperledger Composer version v0.19.9 and Hyperledger Fabric version v1.1.
I have setup my blockchain network using Fabric and made all docker containers up and running. Following docker containers are running:
1. cli
2. orderer.sterlite.com
3. peer0.orga.sterlite.com
4. ca.orga.sterlite.com
5. peer0.orgb.sterlite.com
I have created a Peer Admin card using Composer CLI named PeerAdminOrgA#sterlite.
Now, when I try to install a business network using below command, I am getting an error:
composer network install -c PeerAdminOrgA#sterlite -a com-fab-bn.bna
Following is the error:
safvan#safvan-VirtualBox:~/blockchain/fabric-sdk/fabric-sdk-go/src/github.com/sterliteChain/config$ composer network install -c PeerAdminOrgA#sterlite -a com-fab-bn.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: 14 UNAVAILABLE: EOF
Command failed
Following is the outcome of docker ps command:
safvan#safvan-VirtualBox:~/blockchain/fabric-sdk/fabric-sdk-go/src/github.com/sterliteChain/config$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3645759c804d hyperledger/fabric-tools:latest "/bin/bash" About a minute ago Up About a minute cli
7f72016afeef hyperledger/fabric-orderer:latest "orderer" 19 hours ago Up About a minute 0.0.0.0:7050->7050/tcp orderer.sterlite.com
74f6a3c3f493 hyperledger/fabric-peer:latest "peer node start" 19 hours ago Up About a minute 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.orga.sterlite.com
6c3ab687ec95 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-seâ¦" 19 hours ago Up About a minute 0.0.0.0:7054->7054/tcp ca.orga.sterlite.com
c6187a82e300 hyperledger/fabric-peer:latest "peer node start" 19 hours ago Up About a minute 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.orgb.sterlite.com
Kindly help me fix this issue.

No valid responses from any peers while deploying the BNA file with "composer network start"

I am following the link: https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-multi-org to deploy bna file in 2 different peers.
Up to step-16 everything is working fine, but when I am trying to deploy the .bna file getting following error.
After importing the identity cards to composer when I have run "install runtime" command for Org1, it is successfully processed but when I am running for Org2 it is showing "No valid responses from any peers" error.
Following are the output.
amandai#ubuntultop:~/block chain/fabric-samples V1/ess-multipeer-sample/network$ composer network start -c PeerAdmin#amsnetwork-essbbsr -a amsnetwork.bna -o endorsementPolicyFile=endorsement-policy.json -A chinmayak -C chinmayak/admin-pub.pem -A kkumarbabu -C kkumarbabu/admin-pub.pem
Starting business network from archive: amsnetwork.bna
Business network definition:
Identifier: amsnetwork#0.2.0-20180102082548
Description: The Hello World of Hyperledger Composer samples
Processing these Network Admins:
userName: chinmayak
userName: kkumarbabu
✖ 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: REQUEST_TIMEOUT
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
Command failed
Even all the peers are up.
amandai#ubuntultop:~/block chain/fabric-samples V1/ess-multipeer-sample/network$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c83e1a245386 hyperledger/fabric-tools "/bin/bash -c './s..." 6 minutes ago Up 6 minutes cli
46bf68ca719e hyperledger/fabric-peer "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.ezone.esspl.com
2e740ce743fe hyperledger/fabric-ca "sh -c 'fabric-ca-..." 6 minutes ago Up 6 minutes 0.0.0.0:7054->7054/tcp ca_peerEssbbsr
cc48b8ee44db hyperledger/fabric-orderer "orderer" 6 minutes ago Up 6 minutes 0.0.0.0:7050->7050/tcp orderer.esspl.com
46077fc3888a hyperledger/fabric-peer "peer node start" 6 minutes ago Up 6 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.essbbsr.esspl.com
3f65239e7315 hyperledger/fabric-ca "sh -c 'fabric-ca-..." 6 minutes ago Up 6 minutes 0.0.0.0:8054->7054/tcp ca_peerEzone
Please help how to resolve this. Thanks
I did the following modification in "peer-base.yaml" file and issue has been resolved.
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn
To
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=network_amsnetwork
Here "network_amsnetwork" is the network name. You can find your network name by using "docker network ls" command

Error when reading core config file: Unsupported Config Type

I am trying to pass in the channel configuration transaction artifact to the order-er using the command:
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile
/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
But I get an error:
2018-03-17 20:55:21.380 GMT [main] main -> ERRO 001 Fatal error
when initializing core config : error when reading core
config file: Unsupported Config Type ""
What does this error mean? and how can I fix it?
Using docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5c27fce33911 hyperledger/fabric-tools:latest "/bin/bash" 3 minutes ago Up 3 minutes cli
aabf72f81352 hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
73ddcafb5ce6 hyperledger/fabric-orderer:latest "orderer" 3 minutes ago Up 3 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
205448f5479a hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
4e5ba2999f54 hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
fcc6b25b6422 hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
2f1536ffe265 dev-peer0.org1.example.com-fabcar-1.0-5c906e402ed29f20260ae42283216aa75549c571e2e380f3615826365d8269ba "chaincode -peer.add…" 24 hours ago Exited (255) 3 minutes ago dev-peer0.org1.example.com-fabcar-1.0
6ae48101bc34 hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 24 hours ago Exited (255) 3 minutes ago 0.0.0.0:7054->7054/tcp ca.example.com
dc9e5bb3cc8e hyperledger/fabric-couchdb "tini -- /docker-ent…" 24 hours ago Exited (255) 3 minutes ago 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
this is the log of orderer.example.com
You should be inside the CLI container to execute the peer channel create command.
You will enter the CLI container using the docker exec command:
docker exec -it cli bash
If successful you should see the following:
root#0d78bb69300d:/opt/gopath/src/github.com/hyperledger/fabric/peer#
Over there, you should run the peer channel create command like this:
root#0d78bb69300d:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
Before running this command, please note that you should also run commands for creating environment variables for CHANNEL_NAME and other Environment variables for PEER0 within this CLI Container.
export FABRIC_CFG_PATH=$PWD. it will resolve this issue.
This is the error you get when the core.yaml is not found. Like the Mukesh mentioned above, running command within the CLI Container will not throw the Error.
See this link for more detail.
Can you try running this command: echo $FABRIC_CFG_PATH
Whatever value you get, can you navigate to that directory and confirm if you can see the configtx.yaml file in there.
From the docs here, it says the error is as a result of inappropriately setting the value of that variable.

Resources