Multiple connection issues on Linux #422
-
Multiple simultaneous instances of the following code works flawlessly on Windows:
A single instance works fine on Linux, however, when a second invocation is started the first instanced fails with:
Any tips or ideas on what I'm doing wrong would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Additional info: Above script runs fine with multiple instances on FreeBSD 13.1. |
Beta Was this translation helpful? Give feedback.
-
You're not the first person to bring this up, we believe it may be an issue with the underlying ADS library, so there is no easy fix in pyads. The way around it for now, if I remember correctly, is instead of running the program multiple times, is to run one program and create multiple instances of the connection class. This however I believe only works if you plan on accessing it from just the single PC, i believe if you have a connection from a linux pc, then open one from a windows pc for example, you would get this error still. |
Beta Was this translation helpful? Give feedback.
-
@thunder-weasel see #314 if tthat helps |
Beta Was this translation helpful? Give feedback.
-
"...i believe if you have a connection from a linux pc, then open one from a windows pc for example, you would get this error still." This is not the case. I just tested with 3 instances of the script running on a Windows virtual machine at the same time as 3 instances running on the FreeBSD PLC. A single instance still worked fine on Linux, but that instance dies when a second one is started. I did, also, start a 4th instance on both Windows and BSD and that had no effect on the Linux instance. I tend to concur that this is probably a Linux issue. When I have a moment I'll repeat this exercise with C, if the results are the same I'll start working with my Beckhoff contacts to see if it can be resolved. Thank you much for the help and for your work on pyads! |
Beta Was this translation helpful? Give feedback.
-
Testing Notes and response I got from Beckhoff:
|
Beta Was this translation helpful? Give feedback.
-
I don't think using anything .Net on linux is an option. |
Beta Was this translation helpful? Give feedback.
-
@thunder-weasel could you please reclose this issue to help us manage the issue tracker. I don't believe this is an issue with pyads itself but rather Beckhoffs Linux ADS so best to close it here. Thanks. |
Beta Was this translation helpful? Give feedback.
@thunder-weasel see #314 if tthat helps