-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[inputs.modbus] Error in plugin: modbus: response data size '5' does not match count '4' #11099
Comments
@srebhan is this something you could look at and see what the next steps are? |
The error originates from the underlying grid-x library and basically means that the received modbus packet says it has length 4 but actually contains 5 bytes (+1 byte length field). So your device somehow sends one byte more that expected... @branimirborisov, are you sure that the device is ModbusTCP or does it do RTUoverTCP or similar? Can you maybe try modbus-cli to be sure if the error happens in Telegraf or the underlying library... |
@srebhan Thanks for looking into the issue. Indeed the error is coming from the underlying grid-x/modbus library.
Error message:
In terms of the device - it is actually a RTU device routed via TCP. I've also tried enabling the transmition mode in Telegraf to
Is there any additional configuration that needs to be added when using the Also does it make sense to open an issue to the grid-x/modbus library for this case? P.S. I've also opened an issue in the grid-x/modbus repo to see if the issue can be resolved there: grid-x/modbus#52 Thanks! |
@branimirborisov yeah, probably you want just Please drop me a note if your upstream issue is fixed and I will bump the library so telegraf can pick-up the fix. |
Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Page. Thank you! |
Please keep this open as it tracks an upstream bug... |
FYI use the "upstream" tag to make it clear it is waiting on something other than us or the reporter |
@branimirborisov please test the binary in PR #15276, available as soon as CI finished the tests, and let me know if this works with your device! |
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.22-alpine, InfluxDB 2.2-alpine, Ubuntu 18.04.5 LTS, Docker version 19.03.12
Docker
version: '3.7'
services:
influxdb:
image: influxdb:2.2-alpine
container_name: ${CONTAINER_NAME}-influxdb
volumes:
- influxdb-data:/var/lib/influxdb2:rw
- ./influxdb/ssl/influxdb-selfsigned.crt:${INFLUXD_TLS_CERT}:ro
- ./influxdb/ssl/influxdb-selfsigned.key:${INFLUXD_TLS_KEY}:ro
env_file:
- .env
ports:
- 8086:8086
telegraf:
image: telegraf:1.22-alpine
container_name: ${CONTAINER_NAME}-telegraf
volumes:
- ./influxdb/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- ./influxdb/ssl/influxdb-selfsigned.crt:${INFLUXD_TLS_CERT}:ro
- ./influxdb/ssl/influxdb-selfsigned.key:${INFLUXD_TLS_KEY}:ro
env_file:
- .env
depends_on:
- influxdb
volumes:
influxdb-data:
name: ${CONTAINER_NAME}-influxdb-data
Steps to reproduce
Expected behavior
The data from the holding registers is read and published to InfluxDB
Actual behavior
Following error occurs from Telegraf service/container:
No data is sent/stored to InfluxDB.
Additional info
Device is SIEMENS SICAM P with Modbus RTU translated over TCP.
Reading the same holding registers with another tools works perfectly, for example using
modpoll
:results in:
The text was updated successfully, but these errors were encountered: