X20 Edge - can't initialize iptables for docker setup

,

We have a Docker application that is supposed to run on the X20Edge with Software Image Version 1V8.2. As we conduct the step of installing the dependencies of the Python application into a Docker container the following error message is generated:

Error response from daemon: failed to set up container networking: failed to create endpoint edgedevice-backend-1 on network edgedevice_default: Unable to enable DIRECT ACCESS FILTERING - DROP rule:  (iptables failed: iptables: iptables v1.8.9 (legacy): can't initialize iptables table `raw': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

What we’ve tried so far:

  • kernel update
  • using the host network driver by setting –net=host

The downloads ran through by disabling the iptables in the daemon.json. However, according to my research, this disables port mapping, which our application depends on.

Right now I am not completely sure how to proceed on this issue, as disabling iptables is not an option. This leads me to my question: What is the recommended way to enable full Docker networking support, including port mapping, on the X20Edge platform?

Hi @Emre_Bayazitoglu,
If gets it corectly you have localy build container.
Is this build on Edge?
Are you using both network cards, or just one ?

Is it nessesary to use network=host, if so please try --network=host.

Could you please provide example of run command?

Hi @tomas.miculka,

thanks for the fast response!

eth0 is assigned a static ip. We use this port within the docker application for communication purposes. eth1 is the port connected to the internet to pull the dependencies from docker and pip registries.

sudo docker compose up --build

is used to build the containers on the edge device (as we have internet access).

If you are using both Ethernet cards, there could be an issue with routing, because by default, only one default iptable is set. More about it here:

Here is an examples of a docker compose file from our colleagues:

Maybe this can help as well:
https://forums.docker.com/t/selecting-host-network-for-docker-compose-build/136303

1 Like

I upgraded to software image (1V8.3.1). At the moment it seems to have fixed the issue.

I’m not sure where exactly the problem arose, but for the moment it works.

1 Like