mohammed alzuharey
mohammed alzuharey

Reputation: 41

Channel creation failed at test network of hyperledger fabric

When i run test network at hyperledger fabric i have this error rror: Post "https://localhost:7053/participation/v1/channels": dial tcp 127.0.0.1:7053: connect: connection refused Channel creation failed How to solve it

Upvotes: 2

Views: 3774

Answers (3)

Hanool Choi
Hanool Choi

Reputation: 1

Even this happened two years ago, I would recommend other way to resolve this problem, which recently happened again. Actually, I face this after my computer rebooted because of automatic upgrade, which might be related to this occurence. Remove docker images of hyperledger fabric and install them the same version.

  1. ./network.sh down
  2. docker rmi -f $(docker images -qa)
  3. ./install-fabric.sh --fabric-version X.X.X docker

For 3rd step, you refer to the installation step in https://hyperledger-fabric.readthedocs.io/en/latest/install.html. First

Upvotes: 0

Anish Kutti
Anish Kutti

Reputation: 354

Renaming current folder and Re-downloading the sample worked. Could be a issue with port or prior version

Here are details steps to cleanup prior sample which worked for me Step 1) run following ./network.sh down

Step 2) docker ps Validated that all containers are gone.

docker ps --all

Step 2.b) Incase if you still see containers, use following Note the first letter of the container ID from 'docker ps --all' command e.g 20c0e323a69 hyperledger/fabric-tools:latest Run following docker rm 2

it will remove 20c0e323a69 Do the same for all containers

Step 3) Renaming the folder steps Go back to the root directory Rename the folder by running following. or just delete if you dont have any custom scripts

$ mv fabric-samples oldfabric-samples

Step 4 ) reinstall by running following "$ curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.2.2 1.4.9" or follow steps in https://hyperledger-fabric.readthedocs.io/en/release-2.2/test_network.html

Step 5) List of following command cd fabric-samples/test-network ./network.sh down ./network.sh up docker ps -a

Step 6)./network.sh createChannel Above should work now

Assuming you are in the following folder fabric-samples/test-network


Additional Learnings --under the hood use vscode to view network.sh '$ code network.sh' and look for line scripts/createChannel.sh if needed, navigate to scripts/createChannel.sh from vscode for more info

Upvotes: 1

user17014405
user17014405

Reputation: 21

Try downloading again the test network from Github repository and start the network again. Sometimes, when the test network is stopped, it stores some annoying files. By redownloading the test network, you will start with a clean network.

Upvotes: 2

Related Questions