Error in executing ./network.sh up createChannel - hyperledger-fabric

I was implementing the fabric v2.2 Hyperledger fabric sample > test-network, all the binaries and module versions are updated and satisfied but while creating channel getting this error as highlighted as shown click to see error

I have not used v2.2 before but I have successfully used v1.4 and 2.1 before and what can tell you is that "join transactions" are submitted to the orderer in the network.
The orderer has a port number of 7050. So you can try the code below to see if your orderer is listening on port 7053 or 7050.
telnet localhost 7053
telnet localhost 7050
Before trying the codes, make sure you start your network.

Related

Unable to create channel in Fabric Network

I am trying to create a fabric application using node.
And so from the /fabric-samples/test-network directory, when I run the command - ./network.sh up.
It starts the network and then the orderer is running on port 7053.
Now, when I run the command - ./network.sh createChannel -c channel1 -ca
It outputs,
Error: Post "https://localhost:7053/participation/v1/channels": read tcp 127.0.0.1:60864->127.0.0.1:7053: read: connection reset by peer
Channel creation failed
Why is it occuring and how can it be resolved?

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.

Fabic: Issue connection refused 7050

I am trying to create a network from the hyperledger fabic tutorial. I get the following error:
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 [::1]:7050: connect: connection refused"
I opened up the port on the Centos 7 Virtual machine and still no luck. The docker container is exposing the port to the host.
I removed all docker containers, images and volumes. I even rebuilt the VM from scratch.
Any help would be great.
Thanks,
This situation is happened because you called a gRPC to orderer 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(orderer server exit or down due to misconfiguration) or your call failed to hit the server due to misconfiguration.
I somehow encounter this problem before and the port was opened. Somehow it was a mistake where I forgot to put '-a' in command (launch cerificate authorities). Hope it help.
You might also refer this : https://hyperledger-fabric.readthedocs.io/en/release-2.0/build_network.html

error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE:.. Hyperledger Caliper

I have setup hyperledger fabric version 1.4.2 with 1 org 2 peers 1 orderer setup all are running in 3 different VMs natively. Now I am trying to implement caliper v0.3.0 in this fabric setup. Peers and Orderer are already up and peers are joined in the channel. I have modified the network config file and benchconfig file in caliper according to my network. So I directly run the caliper using the flag "caliper-flow-only-install". While executing this, I am facing issues like
error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: failed to connect to all addresses\n at Object.exports.createStatusError (/home/xx/caliper-benchmarks/node_modules/grpc/src/common.js:91:15)\n at ClientDuplexStream._emitStatusIfDone (/home/xx/caliper-benchmarks/node_modules/grpc/src/client.js:233:26)\n at ClientDuplexStream._receiveStatus (/home/xx/caliper-benchmarks/node_modules/grpc/src/client.js:211:8)\n at Object.onReceiveStatus (/home/xx/caliper-benchmarks/node_modules/grpc/src/client_interceptors.js:1306:15)\n at InterceptingListener._callNext (/home/xx/caliper-benchmarks/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/home/xx/caliper-benchmarks/node_modules/grpc/src/client_interceptors.js:618:8)\n at /home/xx/caliper-benchmarks/node_modules/grpc/src/client_interceptors.js:1123:18"
2020.04.29-12:22:12.094 error [caliper] [caliper-engine] Error while performing "install" step: Error: Orderer error for instantiating W1CC#v0 in composerchannelrest: SERVICE_UNAVAILABLE
It seems the issue is with using incorrect docker container port mapping.
Use the host port rather docker container port.
You can even cross check connection to container with network utility.
For instance, nc -vz [host] [port]
Hope this resolves SERVICE_UNAVAILABLE error.

How to run Hyperledger Fabric Network on local machine?

I am trying to run a sample Hyperledger Fabric network without using docker and trying to create channel by following this tutorial.
orderer is running normally in terminal window 1 and is ready to serve requests as you can see in image: here
peer is also running normally in terminal window 2 :
here
Now, when I try to create a channel and run below command from terminal window 3 :
./peer channel create -o localhost:7050 -c mychannel
-f ./channel-artifacts/channel.tx
--tls true
--cafile
./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
It gives following error :
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded
orderer.example.com is likely not a known host on your local machine. You'll need to create an entry in your /etc/hosts file which maps orderer.example.com to either the IP address of the host or the loopback address 127.0.0.1.
For example:
127.0.0.1 localhost orderer.example.com

Resources