-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
input.modbus TCP connection handling #8225
Comments
definitely! which modbus plugin are you using? |
I am using the default telegraf plugin example config:
|
It looks like it defaults to disconnecting after a minute of no activity, which seems like a reasonable default. Are you seeing any problems with connections left open longer than that, or issues with the connections not being used? |
@mihailescu2m ping
|
The problem is when I am trying to access the same device over modbus from another software. |
I can confirm the bug with tcp-timeout and in my case i figured out that telegraf close the TCP-connection after the “intervall-setting”. |
@mihailescu2m telegraf definitively does not close the connection after the query. A pull-request adding a |
@mihailescu2m and @rwalli I implemented a disconnection setting in PR #9256. It would be nice if you can test the new setting. You can use the artifacts built by CI and add the following to your modbus-plugin config: workarounds = {
close_connection_after_gather = false
} Please let me know if you find any issue. Thanks you in advance! |
It seems that after successfully gathering data over modbus TCP, the connection is not released.
This makes the telegraf plugin have unique access to the modbus device, and other connections fail even if telegraf is not actively gathering data but it's idle waiting for the next interval.
Can this be fixed?
The text was updated successfully, but these errors were encountered: