do you have any logs?
# umh-support
d
do you have any logs?
d
"log.level":"info","@timestamp":"2023-07-18T19:50:32.675Z","log.origin":{"file.name":"mqtt-kafka-bridge/main.go","file.line":95},"message":"Kafka sent: 0 (0/s), Kafka recv: 0 (0/s) | MQTT sent: 0 (0/s), MQTT recv: 0 (0/s) | Cached: 0/100000 (0.00%), Cached raw: 0/1000000 (0.00%) | MqttToKafka chan: 0 | KafkaToMqtt chan: 0","ecs.version":"1.6.0"} {"log.level":"error","@timestamp":"2023-07-18T19:50:42.627Z","log.origin":{"file.name":"mqtt-kafka-bridge/main.go","file.line":59},"message":"MQTT connection lost","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-07-18T19:50:42.628Z","log.origin":{"file.name":"mqtt-kafka-bridge/main.go","file.line":44},"message":"Shutting down","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-07-18T19:50:42.628Z","log.origin":{"file.name":"kafka_processor/kafka.go","file.line":71},"message":"Shutting down kafka client","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-07-18T19:50:42.663Z","log.origin":{"file.name":"kafka_processor/kafka.go","file.line":76},"message":"Kafka client shut down","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-07-18T19:50:42.663Z","log.origin":{"file.name":"mqtt_processor/mqtt.go","file.line":205},"message":"Shutdown requested","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-07-18T19:50:42.666Z","log.origin":{"file.name":"mqtt_processor/mqtt.go","file.line":207},"message":"MQTT disconnected","ecs.version":"1.6.0"} panic: sync /dev/stdout: invalid argument goroutine 1 [running]: main.main.func1(0x0?) github.com/united-manufacturing-hub/united-manufacturing-hub/cmd/mqtt-kafka-bridge/main.go:24 +0x76 main.main() github.com/united-manufacturing-hub/united-manufacturing-hub/cmd/mqtt-kafka-bridge/main.go:47 +0x22b
j
This means it was killed by Kubernetes. Is there anything else in lens e.g. a warning, an exit code, etc? It happens sometimes if the system has not enough memory and is OOM killed. The exit code is then not 0, but like 128 or something
d
the bridge lost connection to mqtt broker, therefore it restarted. you should investigate on why mqtt was shut down though. could be, like jeremy said, an oom problem
d
well. hive is running fine.. only 2 restarts.. mqttkaftabrigde have 352 restarts in the same time.. memory is not maxed out.. still plenty of memory left.
d
mmm.. i very rarely got a similar situation. if there was no data coming from mqtt for some time, then the bridge lost the connection. i didn't worry about it because if there is no data coming, there won't be data loss, and the moment data started to flow again everything worked smoothly. was that you case?
d
well. atm i have no data at all to the database.. this is my home server which i am currently redoing so i have the umh on flatcar updated with latest k3s and started installing home assistant but i was using an old helm chart so now home assistant is removed and i am trying to write my own helm chart for home assistant..i could start the simulator to push some data and see if it stops or i just leave it until i start to push more data.
d
if you can i would try to send data with the simulator to see if it fixes itself, then you could delete the data if you want to have it clean
d
not sure excatlly what you mean
d
so the problem could be that if there is no data flowing in MQTT for some time, mqtt-kafka-bridge automatically restarts. it's not a real issue, since you can't lose data if there is no data in the first place. what you can do to test if this is the actual problem, is to enable the mqtt simulator to send fake data into mqtt, in order to "activate" mqtt-kafka-bridge. after the data starts to flow again, mqtt-kafka-bridge should not shutdown automatically
ps sorry for the late response, i was on vacation
d
yes. i discussed this with jeremy and i think he added change in the log message to state that the shutdown is due to no messages comming in just to make it more clear what is happening.
d
ok perfect 👍
3 Views