orderer and peer container are exited after a few seconds run ./network.sh up and then i can't create channel - hyperledger-fabric

I followed the Official Fabric Test Network tutorial "Using the Fabric Test Network ", but reported some errors when I run ./network.sh createChannel. Log and errors like this:
Error: failed to create deliver client for orderer: orderer client
failed to connect to localhost:7050: failed to create new connection:
connection error: desc = "transport: error while dialing: dial tcp
127.0.0.1:7050: connect: connection refused"
Orderer and peer container are exited after a few seconds after i launch the network.sh and then i cant't create channel. I don't understand why.

Related

not able to invoke/query chaincode usin fabric Node SDK

I have created a sample HLF network with 3 organizations. I have taken an orderer and a peer from each organization ( total 3 orderers, 3 peers, 3 fabric-CA, 3 CouchDB instances).
I have successfully created the certificates, system channel, channel configuration, application channel and also successfully deployed the chaincode on each peer.
I am able to invoke/query any chaincode using peer binary in docker cli but not able to invoke/query the same chaincode through fabric Node SDK.
I have created the connection profile as per the template provided in the test network and also able to register any user for a specific organization. But whenever I am trying to query any chaincode function I am getting the below error:
[ServiceEndpoint]: Error: Failed to connect before the deadline on
Committer- name: orderer.example.com:7050, url:grpcs://localhost:7050,
connected:false, connectAttempted:true [ServiceEndpoint]: waitForReady
Failed to connect to remote gRPC server orderer.example.com:7050 url:grpcs://localhost:7050 timeout:3000
When I check the orderer logs I found this error:
ServerHandshake -> ERRO 087 Server TLS handshake failed in 2.085859ms
with error EOF server=Orderer remoteaddress=172.23.0.1:45678
**Why I am getting this error?
I am trying to just query so why it's connecting to the orderer?
If there is any TLS issue then why I am able to query it through peer binary?**
This link might help Hyperledger Fabric CA releasing wrong certificates (wrong issuer) to Node SDK when TLS enabled
If you are not running as a test network on your local machine, then you will need to specify the connection option of discovery.asLocalhost as false

Hyperledger Fabric, javascript fabcar chaincode error. Transport: error while dialing: dial tcp 127.0.0.1:7051: connect: connection refused

I am having the same problem with Hyperledger fabric 2.1.1, but I am able to run test network with default options, but when I try to run Fabcar javascript chaincode I get an error:
Error: error getting endorser client for channel: endorser client failed to connect to localhost:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:7051: connect: connection refused"
I have tried everything mentioned in thread Error deploying Fabric test-network fabcar chaincode, removed docker images, ran prune, removed organizations data and fired ./network.sh up createChannel -ca -c mychannel -s couchdb -i 2.1.1, but the error is still there. Also, my RAM is 16Gb, so the problem is not there. Any other suggestion, please ?
This situation is happened because you called a gRPC to 127.0.0.1:7051 server but your call failed to hit the server. This situation may happen for many reasons, but for most of the cases the situation is happened due to server down(server exit or down due to misconfiguration) or for wrong certificate or your call failed to hit the server due to misconfiguration.
Please check the following docker container and ensure that is running properly.

RPC error "transport is closing" during peer channel fetch

I have a problem with BYFN in Hyperledger Fabric 1.4.3.
I ran byfn.sh generate and byfn.sh up without problems
I need to fetch a block. When I run this command:
peer channel fetch newest mychannel.block -c mychannel --orderer orderer.example.com:7050
from docker cli bash, I get the following error:
error receiving: rpc error code = unavailable desc = transport is closing
How to fix this?

Failed to establish connection between 1 Organisation peer and channel

I have created a Solo config Fabric network with 2 Organisation peers connected to single channel on launching the network My 1st Organisation peer is sucessfully getting connected to channel but for 2nd organisation peer it says:
Error: error getting endorser client for channel: endorser client failed to connect to org2-peer1.org2.com:8051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:8051: connect: connection refused"
Make sure all docker containers are up and running.
docker ps

GRPC connection timeout for hyperledger fabric when sending proposal to the endorser

It is solved, please see this: Connection timeout when installing chaincode using fabric-sdk-go
Dev ENV: Mac and Docker (3 CAs, 3 Orgs, 4 Peers)
Fabric SDK: fabric-sdk-go
Description: I use the sdk to install the chaincode but it errors out when sending proposal to the endorser. Seems that I cannot send the grpc request to the container. Things are working fine with the http request to the fabric CA containers.
ErrorMessage:
unable to verify if cc is installed on grpcs://peer1-xxxx:7051. Got error: lscc.getinstalledchaincodes failed: SendProposal failed: Transaction processing for endorser [peer1-xxxx:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection timed out [peer1-xxxx:7051]

Resources