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

Error: response transaction id does not match request #64

Open
wz2b opened this issue Aug 21, 2020 · 2 comments
Open

Error: response transaction id does not match request #64

wz2b opened this issue Aug 21, 2020 · 2 comments

Comments

@wz2b
Copy link

wz2b commented Aug 21, 2020

If you leave this driver running long enough, you get this:

2020-08-21T12:36:40Z I! [inputs.modbusgw] Modbus Error: modbus: response transaction id '51219' does not match request '51220'
2020-08-21T12:36:40Z I! [inputs.modbusgw] Modbus Error: modbus: response transaction id '51220' does not match request '51221'
2020-08-21T12:36:40Z I! [inputs.modbusgw] Modbus Error: modbus: response transaction id '51221' does not match request '51222'

forever. I have seen this type of thing before... I think the normal fix is to make sure that if you get a transaction with a transaction ID earlier than the one you requested, recognize that it's old and throw it away.

@wz2b
Copy link
Author

wz2b commented Aug 21, 2020

What causes this is network delay. You launch a poll, you don't get a response within some timeout, and so you launch a second poll, then the response to the first one comes in. At that point, this connection is ruined forever as this driver is currently written, it will always be one transaction out of step.

You can somewhat mitigate this by making the timeout longer, but you don't want long timeouts that wait forever before retrying. So that's a workaround for now but it's definitely NOT a long-term solution.

Is this project still being maintained? If it's not, I'll fork it and fix this myself. The telegraf modbus plugin uses this, which is why I want it fixed.

@wz2b
Copy link
Author

wz2b commented Aug 26, 2020

This is resolved by #65 (if accepted)

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

1 participant