6

I am doing this tutorial: https://hyperledger.github.io/composer/latest/installing/development-tools

Now i want to start the hyperledger fabric with ./startFabric.sh but then I get this error:

dany@DESKTOP-IQB2P0B:~/fabric-dev-servers$ ./startFabric.sh
Development only script for Hyperledger Fabric control
Running 'startFabric.sh'
FABRIC_VERSION is set to 'hlfv12'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Removing network composer_default
WARNING: Network composer_default not found.
Creating network "composer_default" with the default driver
ERROR: Failed to Setup IP tables: Unable to enable NAT rule:  (iptables failed: iptables --wait -t nat -I POSTROUTING -s 172.22.0.0/16 ! -o br-b49f324730b7 -j MASQUERADE: iptables: No chain/target/match by that name.
 (exit status 1))

Before I had this error: https://github.com/docker/compose/issues/4181

But I fixed it and now I have this error...

BlockchainProgrammer
  • 1,999
  • 5
  • 20
  • 32

2 Answers2

12

Try:

sudo iptables -t filter -N DOCKER
sudo systemctl restart docker

Check this:

https://github.com/moby/moby/issues/16816#issuecomment-179717327

pa4080
  • 531
  • 9
  • 16
Israel Perales
  • 2,192
  • 2
  • 25
  • 30
0

If you're using a Debian-based distribution, then the problem could be in nftables: https://forums.docker.com/t/failing-to-start-dockerd-failed-to-create-nat-chain-docker/78269/2

The docker installer uses iptables for NAT. Unfortunately Debian uses nftables. You can convert the entries over to nftables or just setup Debian to use the legacy iptables.

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
sudo systemctl restart docker
debugger
  • 346
  • 2
  • 10