In the vast realm of blockchain technology, setting up a network can be a complex task. Recently, I faced an issue while deploying a minifabric network on a virtual machine. The error message
"Error: failed to create deliver client for orderer: orderer client failed to connect to 123.456.789.012:5013: failed to create new connection: context deadline exceeded,"
disrupted what should have been a routine process.
For those familiar with blockchain deployment, encountering errors is expected. However, comprehending and resolving these issues is where the real journey begins. In this blog, I aim to demystify the aforementioned error, sharing the troubleshooting steps that led to its resolution. Join me as we figure out the details of this deployment problem and solve the mystery behind the error that momentarily halted progress.
Troubleshooting steps:
- Make sure no other app or service is using the port where minifab is deploying the orderer. In my case, it was port 5013. You can check with any one of these commands
lsof -i :<port_number>
netstat -tlnp | grep <port_number>
- If you find another application on the needed port, you can choose a different port range by using the -e flag in the minifab command. Just use
minifab up -e <port_number>
- If you are using an old minifab version, try updating the version
docker pull hyperledgerlabs/minifab:latest
- The last crucial step that finally fixed the issue was discovering a firewall on the VM causing trouble with communication between the docker containers and the host. The problem was the firewall rules set up using Uncomplicated Firewall (UFW). To tackle this, I examined the firewall's status and rules by using the command
sudo ufw status
It became evident from the output that the firewall was not allowing the port range (5000). To fix this, I added a rule permitting this port range using the command:
ufw allow <start_port_number>:<end_port_number>
I cleaned everything up by these commands
minifab down
minifab cleanup
Then, I brought the network back up. Hooray! Problem solved, and the network was up and running smoothly! XD
Through this shared experience, I want to help others save time fixing common problems. This blog is like a guide to help troubleshoot issues and show the way for people facing similar problems. Let's make it easier for enthusiasts to understand and fix things when setting up their fabric deployments. Together, we can navigate through these challenges more smoothly and enjoy a hassle-free deployment experience.
Happy Learning :)
Top comments (0)