Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADS Connection Error With Docker Container #220

Open
ismailalhajosman opened this issue Dec 27, 2023 · 1 comment
Open

ADS Connection Error With Docker Container #220

ismailalhajosman opened this issue Dec 27, 2023 · 1 comment

Comments

@ismailalhajosman
Copy link

I have a Beckhoff PLC with IP (192.168.0.176) that I need to control it from linux machine using pyads. Inside linux machine I have a docker container that I want it to establish connection with the PLC.

When I try to communicate the linux host machine whose IP is (192.168.0.100) with the PLC , everything work alright and I can read and write varibles from and to the PLC. However, when I try to communicate the docker container inside linux whose IP is (172.19.0.13) with th PLC using pyads I got the ADS timeout error (1861).

PS. When I try : ping 192.168.0.176 from inside the docker container is throws data which means it connects to PLC , but when I try to read varibles from the PLC it give the ADS timeout error (1861).

Can you help me solve this issue?

@nosvalds
Copy link

Hi @ismailalhajosman we experienced a very similar issue. To resolve it we started the docker container with the --net=host option. This seemed to resolve the network issue between the host and container that caused the timeout. Note this might break networking to other containers you have running on the host so could require some reworking there.

The --net=host option is used to make the programs inside the Docker container look like they are running on the host itself, from the perspective of the network. It allows the container greater network access than it can normally get.

https://docs.docker.com/network/drivers/host/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants