How to run Hyperledger Fabric Network on local machine?

Viewed 381

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
1 Answers

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
Related