You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run an MQTT server on another device on the network
Publish to /event/#, any message
Disconnect the network.
Reboot the network connection
Expected behavior
The telegraf instance should reconnect to the MQTT broker upon having network connectivity again and then begin producing data to insert into InfluxDB as normal.
Actual behavior
Upon reconnection, a bunch of cached data is dumped to InfluxDB and shortly there after, no new data is ingested. If telegraf is rebooted, it reconnects normally and produces data. A reboot to telegraf should not be required. It does not notice that it's broken so a manual effort is require to realize data is not being ingested to InfluxDB and a manual forced restart needs to be triggered.
@evilmumi let's continue in one issue rather than splitting up.
@mmachenry or @evilmumi can you please check if this behavior was introduced in a certain version? A first debugging session on slack revealed that the underlying MQTT library itself seems to cause the issue...
I have Auto Update configurated for my telegraf Container. So maybe it came in the last 2-3 releases. But at the moment not clear how to test it? Can i just use an old version?
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf-1.32.1 Ubuntu-20.04.3 LTS
Docker
version: "3"
services:
influxdb:
image: influxdb:2.7.10 # influxdb:latest
ports:
- 8086:8086
volumes:
- influxdb-storage:/var/lib/influxdb2
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
restart: always
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=$KTS_TELEMETRY_INFLUXDB_USERNAME
- DOCKER_INFLUXDB_INIT_PASSWORD=$KTS_TELEMETRY_INFLUXDB_PASSWORD
- DOCKER_INFLUXDB_INIT_ORG=$KTS_TELEMETRY_INFLUXDB_ORG
- DOCKER_INFLUXDB_INIT_BUCKET=$KTS_TELEMETRY_INFLUXDB_BUCKET
- DOCKER_INFLUXDB_INIT_RETENTION=$KTS_TELEMETRY_INFLUXDB_RETENTION
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=$KTS_TELEMETRY_INFLUXDB_TOKEN
grafana:
image: grafana/grafana:11.2.0 # grafana/grafana:latest
environment:
- GF_SERVER_ROOT_URL=http://192.168.1.97:3000/
- GF_PLUGINS_ENABLE_ALPHA=true
ports:
- 3000:3000
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana.ini:/etc/grafana/grafana.ini:ro
restart: always
depends_on:
- influxdb
mqtt_telegraf:
image: telegraf:1.32.1
environment:
- KTS_TELEMETRY_INFLUXDB_TOKEN=$KTS_TELEMETRY_INFLUXDB_TOKEN
- KTS_TELEMETRY_INFLUXDB_ORG=$KTS_TELEMETRY_INFLUXDB_ORG
- KTS_TELEMETRY_INFLUXDB_BUCKET=$KTS_TELEMETRY_INFLUXDB_BUCKET
- KTS_INFLUXDB_HOST=influxdb:8086
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
restart: always
depends_on:
- influxdb
volumes:
influxdb-storage:
grafana-storage:
Steps to reproduce
Expected behavior
The telegraf instance should reconnect to the MQTT broker upon having network connectivity again and then begin producing data to insert into InfluxDB as normal.
Actual behavior
Upon reconnection, a bunch of cached data is dumped to InfluxDB and shortly there after, no new data is ingested. If telegraf is rebooted, it reconnects normally and produces data. A reboot to telegraf should not be required. It does not notice that it's broken so a manual effort is require to realize data is not being ingested to InfluxDB and a manual forced restart needs to be triggered.
Additional info
A more full version of the logs which did not fit here is located on gitst.
https://gist.github.com/mmachenry/59139541bbb628abff0c648d37eb41fb
The text was updated successfully, but these errors were encountered: