The tedge-mapper-c8y process stops sending data to Cumulocity IoT when using the built-in bridge.
The device where the problem was seen includes a special MQTT subscription which looks at the tedge-mapper-bridge-c8y service status, and the log shows that the status was toggling between up and down, though it is currently showing as up even though the device is not responding to operations or sending measurements.
The tedge connect c8y --test mostly fails, but sporadically passes (e.g. it will receive a jwt every now and then), below shows both the failed connection test.
# tedge connect c8y --test
The system config file '/etc/tedge/system.toml' doesn't exist. Using '/bin/systemctl' as the default service manager
Detected mosquitto version >= 2.0.0
Sending packets to check connection. This may take up to 2 seconds.
ERROR: Local MQTT publish has timed out.
Error: failed to test connection to Cumulocity cloud.
Caused by:
Operation timed out. Is mosquitto running?
Symptoms
measurements are not being published to Cumulocity IoT though the messages are visible on the c8y/# topic
restarting the tedge-mapper-c8y service seemed to resume normal function (e.g. operations were processed and measurements were sent)
no obvious ERROR messages in the log (though a few disconnect events were present)
To Reproduce
It is unclear how to reproduce the bug. This section will be expanded once more information is known.
Expected behavior
The built-in bridge should reliably reconnect to the IoT Cloud, and the status of the bridge should be faithfully represented on the associated service topic.
Screenshots
Environment (please complete the following information):
Jun 20 17:03:34 rackfslot2 systemd[1]: Starting tedge-mapper-c8y.service - tedge-mapper-c8y converts Thin Edge JSON measurements to Cumulocity JSON format....
Jun 20 17:03:34 rackfslot2 systemd[1]: Started tedge-mapper-c8y.service - tedge-mapper-c8y converts Thin Edge JSON measurements to Cumulocity JSON format..
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: The system config file '/etc/tedge/system.toml' doesn't exist. Using '/bin/systemctl' as the default service manager
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.497365785Z INFO Runtime: Started
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.497500376Z INFO Runtime: Running Signal-Handler-0
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.497563912Z INFO Runtime: Running HealthMonitorActor-1
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.503755952Z INFO Runtime: Running MQTT-2
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.503843821Z INFO Runtime: Running C8YJwtRetriever-3
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.503879598Z INFO Runtime: Running HTTP-4
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.503900487Z INFO Runtime: Running C8Y-REST-5
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.503920209Z INFO Runtime: Running C8yAuthProxy-6
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.503944079Z INFO Runtime: Running FsWatcher-7
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.503969153Z INFO Runtime: Running Timer-8
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.504152299Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=Some("tedge-mapper-c8y")
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.504521591Z INFO C8Y-REST: start initialisation
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.504651811Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=None
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.505064788Z INFO HTTP Server: Cumulocity proxy has HTTPS disabled (configured in `c8y.proxy.cert_path`/`c8y.proxy.key_path`) and certificate authentication disabled (configured in `c8y.proxy.ca_path`)
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.505098362Z INFO c8y_auth_proxy::server: Launching on port 8001 with HTTP
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.506125609Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.506328607Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.508222437Z INFO tedge_api::entity_store: Loading the entity store from the log
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.508325584Z INFO tedge_api::entity_store: Finished loading the entity store from the log
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.508681783Z INFO Runtime: Running CumulocityMapper-9
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.508748764Z INFO Runtime: Running MQTT-10
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.50877406Z INFO Runtime: Running Uploader-11
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.508795837Z INFO Runtime: Running Downloader-12
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.508819319Z INFO Runtime: Running OldAgentAdapter-13
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.508948299Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=Some("last_will_c8y_mapper")
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.509721512Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.527473602Z INFO c8y_api::http_proxy: JWT token requested
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.537850778Z INFO c8y_api::http_proxy: JWT token received
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.53836105Z INFO mqtt_channel::connection: MQTT connection closed
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.550569649Z INFO c8y_mapper_ext::inventory: Could not read inventory fragments from file "/etc/tedge/device/inventory.json"
Jun 20 17:03:34 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:34.631698097Z INFO C8Y-REST: initialisation done.
Jun 20 17:03:47 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:47.222033473Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=None
Jun 20 17:03:47 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:47.223673769Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:03:47 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:47.245669143Z INFO c8y_api::http_proxy: JWT token requested
Jun 20 17:03:47 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:47.288658237Z INFO c8y_api::http_proxy: JWT token received
Jun 20 17:03:47 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:03:47.289498191Z INFO mqtt_channel::connection: MQTT connection closed
Jun 20 17:04:05 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:04:05.996223181Z INFO c8y_auth_proxy::server: Closed websocket proxy from Cumulocity to client
Jun 20 17:04:05 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:04:05.996428031Z INFO c8y_auth_proxy::server: Closed websocket proxy from client to Cumulocity
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.381344014Z ERROR mqtt_channel::connection: MQTT connection error: Mqtt state: Io error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.381958044Z ERROR mqtt_channel::connection: MQTT connection error: Mqtt state: Io error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
Jun 20 17:05:32 rackfslot2 systemd[1]: Stopping tedge-mapper-c8y.service - tedge-mapper-c8y converts Thin Edge JSON measurements to Cumulocity JSON format....
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.48686931Z INFO Runtime: Shutting down
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.487805207Z INFO c8y_auth_proxy::actor: Shutdown
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.487926039Z INFO Runtime: Actor has finished: HTTP-4
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.487954001Z INFO Runtime: Actor has finished: Signal-Handler-0
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.487972038Z INFO Runtime: Actor has finished: MQTT-2
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488007945Z INFO Runtime: Actor has finished: C8Y-REST-5
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488024556Z INFO Runtime: Actor has finished: FsWatcher-7
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.4880425Z INFO Runtime: Actor has finished: CumulocityMapper-9
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488059389Z INFO Runtime: Actor has finished: MQTT-10
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488076963Z INFO Runtime: Actor has finished: Uploader-11
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488094852Z INFO Runtime: Actor has finished: Downloader-12
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488113851Z INFO Runtime: Actor has finished: OldAgentAdapter-13
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488131277Z INFO Runtime: Actor has finished: HealthMonitorActor-1
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488148981Z INFO Runtime: Actor has finished: Timer-8
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.48816624Z INFO Runtime: Actor has finished: C8yAuthProxy-6
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488182869Z INFO Runtime: Actor has finished: C8YJwtRetriever-3
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488198721Z INFO Runtime: All actors have finished
Jun 20 17:05:32 rackfslot2 tedge-mapper[156097]: 2024-06-20T15:05:32.488515884Z INFO c8y_auth_proxy::server: Closed websocket proxy from client to Cumulocity
Jun 20 17:05:32 rackfslot2 systemd[1]: tedge-mapper-c8y.service: Deactivated successfully.
Jun 20 17:05:32 rackfslot2 systemd[1]: Stopped tedge-mapper-c8y.service - tedge-mapper-c8y converts Thin Edge JSON measurements to Cumulocity JSON format..
Jun 20 17:22:53 rackfslot2 systemd[1]: Starting tedge-mapper-c8y.service - tedge-mapper-c8y converts Thin Edge JSON measurements to Cumulocity JSON format....
Jun 20 17:22:53 rackfslot2 systemd[1]: Started tedge-mapper-c8y.service - tedge-mapper-c8y converts Thin Edge JSON measurements to Cumulocity JSON format..
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: The system config file '/etc/tedge/system.toml' doesn't exist. Using '/bin/systemctl' as the default service manager
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.227942193Z INFO Runtime: Started
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.228030655Z INFO Runtime: Running Signal-Handler-0
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.228080747Z INFO Runtime: Running HealthMonitorActor-1
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.252049339Z INFO Runtime: Running MQTT-Bridge-2
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.252193596Z INFO Runtime: Actor has finished: MQTT-Bridge-2
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.254629661Z INFO tedge_mqtt_bridge::health: MQTT bridge connected to local broker
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.254717808Z INFO tedge_mqtt_bridge: Bridge cloud connection "local" subscribing to [Filter = c8y/s/ut/#, Qos = AtLeastOnce, Filter = c8y/s/us, Qos = AtLeastOnce, Filter = c8y/s/us/#, Qos = AtLeastOnce, Filter = c8y/t/us/#, Qos = AtLeastOnce, Filter = c8y/q/us/#, Qos = AtLeastOnce, Filter = c8y/c/us/#, Qos = AtLeastOnce, Filter = c8y/s/uc/#, Qos = AtLeastOnce, Filter = c8y/t/uc/#, Qos = AtLeastOnce, Filter = c8y/q/uc/#, Qos = AtLeastOnce, Filter = c8y/c/uc/#, Qos = AtLeastOnce, Filter = c8y/inventory/managedObjects/update/#, Qos = AtLeastOnce, Filter = c8y/measurement/measurements/create/#, Qos = AtLeastOnce, Filter = c8y/event/events/create/#, Qos = AtLeastOnce, Filter = c8y/alarm/alarms/create/#, Qos = AtLeastOnce, Filter = c8y/s/uat, Qos = AtLeastOnce]
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.25770768Z INFO Runtime: Running MQTT-3
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.257806031Z INFO Runtime: Running C8YJwtRetriever-4
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.257843938Z INFO Runtime: Running HTTP-5
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.257864586Z INFO Runtime: Running C8Y-REST-6
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.257885401Z INFO Runtime: Running C8yAuthProxy-7
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.257907604Z INFO Runtime: Running FsWatcher-8
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.257934826Z INFO Runtime: Running Timer-9
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.2582241Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=Some("tedge-mapper-c8y")
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.258314025Z INFO C8Y-REST: start initialisation
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.258454857Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=None
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.259033258Z INFO HTTP Server: Cumulocity proxy has HTTPS disabled (configured in `c8y.proxy.cert_path`/`c8y.proxy.key_path`) and certificate authentication disabled (configured in `c8y.proxy.ca_path`)
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.259071535Z INFO c8y_auth_proxy::server: Launching on port 8001 with HTTP
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.261873299Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.262224461Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.263520113Z INFO tedge_api::entity_store: Loading the entity store from the log
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.263669074Z INFO tedge_api::entity_store: Finished loading the entity store from the log
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.263819443Z INFO Runtime: Running CumulocityMapper-10
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.263875016Z INFO Runtime: Running MQTT-11
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.263900257Z INFO Runtime: Running Uploader-12
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.26392583Z INFO Runtime: Running Downloader-13
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.263951534Z INFO Runtime: Running OldAgentAdapter-14
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.26402144Z INFO c8y_mapper_ext::inventory: Could not read inventory fragments from file "/etc/tedge/device/inventory.json"
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.264143976Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=Some("last_will_c8y_mapper")
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.265645811Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.284181632Z INFO c8y_api::http_proxy: JWT token requested
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.359685403Z INFO tedge_mqtt_bridge::health: MQTT bridge connected to cloud broker
Jun 20 17:22:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:53.359765606Z INFO tedge_mqtt_bridge: Bridge cloud connection "cloud" subscribing to [Filter = s/dt, Qos = AtLeastOnce, Filter = s/dat, Qos = AtLeastOnce, Filter = s/ds, Qos = AtLeastOnce, Filter = s/e, Qos = AtLeastOnce, Filter = devicecontrol/notifications, Qos = AtLeastOnce, Filter = error, Qos = AtLeastOnce]
Jun 20 17:22:54 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:54.839198292Z INFO c8y_api::http_proxy: JWT token received
Jun 20 17:22:54 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:54.839690323Z INFO mqtt_channel::connection: MQTT connection closed
Jun 20 17:22:54 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:54.928795899Z INFO C8Y-REST: initialisation done.
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.09824282Z INFO tedge_downloader_ext::actor: Downloading from url http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-benchmark-c8y-mapper-10719676 to location /tmp/.tmpi4dZ8t/tedge-benchmark-c8y-mapper-10719676
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.104853817Z INFO download::download: Downloading file from url="http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-benchmark-c8y-mapper-10719676", len=0
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.227900018Z INFO tedge_uploader_ext::actor: Uploading from /tmp/.tmpi4dZ8t/tedge-benchmark-c8y-mapper-10719676 to url: http://127.0.0.1:8001/c8y/event/events/10721033/binaries
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.23419463Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=None
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.235024472Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.256439668Z INFO c8y_api::http_proxy: JWT token requested
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.271527492Z INFO c8y_api::http_proxy: JWT token received
Jun 20 17:22:55 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:22:55.271820971Z INFO mqtt_channel::connection: MQTT connection closed
Jun 20 17:23:38 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:23:38.32350921Z INFO c8y_auth_proxy::server: Closed websocket proxy from Cumulocity to client
Jun 20 17:23:38 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:23:38.323627745Z INFO c8y_auth_proxy::server: Closed websocket proxy from client to Cumulocity
Jun 20 17:34:59 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:34:59.527175156Z INFO tedge_downloader_ext::actor: Downloading from url http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-bridge-monitor-c8y-mapper-10719678 to location /tmp/.tmpROm28s/tedge-bridge-monitor-c8y-mapper-10719678
Jun 20 17:34:59 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:34:59.539579641Z INFO download::download: Downloading file from url="http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-bridge-monitor-c8y-mapper-10719678", len=0
Jun 20 17:34:59 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:34:59.805034646Z INFO tedge_uploader_ext::actor: Uploading from /tmp/.tmpROm28s/tedge-bridge-monitor-c8y-mapper-10719678 to url: http://127.0.0.1:8001/c8y/event/events/10722429/binaries
Jun 20 17:35:14 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:35:14.168481808Z INFO c8y_auth_proxy::server: Closed websocket proxy from Cumulocity to client
Jun 20 17:35:14 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:35:14.168642325Z INFO c8y_auth_proxy::server: Closed websocket proxy from client to Cumulocity
Jun 20 17:36:20 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:36:20.442482192Z INFO c8y_auth_proxy::server: Closed websocket proxy from Cumulocity to client
Jun 20 17:36:20 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:36:20.442756818Z INFO c8y_auth_proxy::server: Closed websocket proxy from client to Cumulocity
Jun 20 17:43:48 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:43:48.531968053Z INFO tedge_downloader_ext::actor: Downloading from url http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-bridge-monitor-c8y-mapper-10719685 to location /tmp/.tmpU0U5jS/tedge-bridge-monitor-c8y-mapper-10719685
Jun 20 17:43:48 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:43:48.537914947Z INFO download::download: Downloading file from url="http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-bridge-monitor-c8y-mapper-10719685", len=0
Jun 20 17:43:48 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:43:48.864344056Z INFO tedge_uploader_ext::actor: Uploading from /tmp/.tmpU0U5jS/tedge-bridge-monitor-c8y-mapper-10719685 to url: http://127.0.0.1:8001/c8y/event/events/10721057/binaries
Jun 20 17:49:09 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:49:09.700932928Z INFO c8y_auth_proxy::server: Closed websocket proxy from Cumulocity to client
Jun 20 17:49:09 rackfslot2 tedge-mapper[161550]: 2024-06-20T15:49:09.701162611Z INFO c8y_auth_proxy::server: Closed websocket proxy from client to Cumulocity
Jun 20 19:20:11 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:11.946831011Z INFO tedge_downloader_ext::actor: Downloading from url http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-bridge-monitor-c8y-mapper-10720145 to location /tmp/.tmphA209Z/tedge-bridge-monitor-c8y-mapper-10720145
Jun 20 19:20:11 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:11.953721892Z INFO download::download: Downloading file from url="http://127.0.0.1:8000/tedge/file-transfer/osadl-rackfslot2/log_upload/tedge-bridge-monitor-c8y-mapper-10720145", len=0
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.365733179Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=None
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.366532781Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.388017398Z INFO c8y_api::http_proxy: JWT token requested
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.419273048Z INFO c8y_api::http_proxy: JWT token received
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.41962021Z INFO mqtt_channel::connection: MQTT connection closed
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.494457975Z INFO tedge_uploader_ext::actor: Uploading from /tmp/.tmphA209Z/tedge-bridge-monitor-c8y-mapper-10720145 to url: http://127.0.0.1:8001/c8y/event/events/10726885/binaries
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.549364809Z INFO mqtt_channel::connection: MQTT connecting to broker: host=127.0.0.1:1883, session_name=None
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.550023468Z INFO mqtt_channel::connection: MQTT connection established
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.573671707Z INFO c8y_api::http_proxy: JWT token requested
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.587474044Z INFO c8y_api::http_proxy: JWT token received
Jun 20 19:20:12 rackfslot2 tedge-mapper[161550]: 2024-06-20T17:20:12.588204202Z INFO mqtt_channel::connection: MQTT connection closed
Jun 20 21:03:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T19:03:53.618862846Z ERROR tedge_mqtt_bridge::health: MQTT bridge failed to connect to cloud broker: Mqtt state: Io error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
Jun 20 21:03:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T19:03:53.618988363Z INFO tedge_mqtt_bridge: Waiting 27.642985678s until attempting reconnection to cloud broker
Jun 20 21:04:22 rackfslot2 tedge-mapper[161550]: 2024-06-20T19:04:22.152490306Z INFO tedge_mqtt_bridge::health: MQTT bridge connected to cloud broker
Jun 20 21:04:22 rackfslot2 tedge-mapper[161550]: 2024-06-20T19:04:22.152604824Z INFO tedge_mqtt_bridge: Bridge cloud connection "cloud" subscribing to [Filter = s/dt, Qos = AtLeastOnce, Filter = s/dat, Qos = AtLeastOnce, Filter = s/ds, Qos = AtLeastOnce, Filter = s/e, Qos = AtLeastOnce, Filter = devicecontrol/notifications, Qos = AtLeastOnce, Filter = error, Qos = AtLeastOnce]
Jun 20 23:47:14 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:47:14.194441041Z ERROR tedge_mqtt_bridge::health: MQTT bridge failed to connect to cloud broker: Mqtt state: Io error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
Jun 20 23:47:14 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:47:14.194537799Z INFO tedge_mqtt_bridge: Waiting 27.988953577s until attempting reconnection to cloud broker
Jun 20 23:47:42 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:47:42.684690841Z INFO tedge_mqtt_bridge::health: MQTT bridge connected to cloud broker
Jun 20 23:47:42 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:47:42.684805784Z INFO tedge_mqtt_bridge: Bridge cloud connection "cloud" subscribing to [Filter = s/dt, Qos = AtLeastOnce, Filter = s/dat, Qos = AtLeastOnce, Filter = s/ds, Qos = AtLeastOnce, Filter = s/e, Qos = AtLeastOnce, Filter = devicecontrol/notifications, Qos = AtLeastOnce, Filter = error, Qos = AtLeastOnce]
Jun 20 23:57:14 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:57:14.191316602Z ERROR tedge_mqtt_bridge::health: MQTT bridge failed to connect to cloud broker: Mqtt state: Io error: Custom { kind: ConnectionAborted, error: "connection closed by peer" }
Jun 20 23:57:14 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:57:14.191429174Z INFO tedge_mqtt_bridge: Waiting 31.295359722s until attempting reconnection to cloud broker
Jun 20 23:57:45 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:57:45.770261234Z INFO tedge_mqtt_bridge::health: MQTT bridge connected to cloud broker
Jun 20 23:57:45 rackfslot2 tedge-mapper[161550]: 2024-06-20T21:57:45.770369399Z INFO tedge_mqtt_bridge: Bridge cloud connection "cloud" subscribing to [Filter = s/dt, Qos = AtLeastOnce, Filter = s/dat, Qos = AtLeastOnce, Filter = s/ds, Qos = AtLeastOnce, Filter = s/e, Qos = AtLeastOnce, Filter = devicecontrol/notifications, Qos = AtLeastOnce, Filter = error, Qos = AtLeastOnce]
Jun 21 00:00:01 rackfslot2 tedge-mapper[161550]: 2024-06-20T22:00:01.97419309Z ERROR tedge_mqtt_bridge::health: MQTT bridge failed to connect to cloud broker: Mqtt state: Io error: Custom { kind: ConnectionAborted, error: "connection closed by peer" }
Jun 21 00:00:01 rackfslot2 tedge-mapper[161550]: 2024-06-20T22:00:01.974285422Z INFO tedge_mqtt_bridge: Waiting 51.48150879s until attempting reconnection to cloud broker
Jun 21 00:00:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T22:00:53.767722196Z INFO tedge_mqtt_bridge::health: MQTT bridge connected to cloud broker
Jun 21 00:00:53 rackfslot2 tedge-mapper[161550]: 2024-06-20T22:00:53.767827714Z INFO tedge_mqtt_bridge: Bridge cloud connection "cloud" subscribing to [Filter = s/dt, Qos = AtLeastOnce, Filter = s/dat, Qos = AtLeastOnce, Filter = s/ds, Qos = AtLeastOnce, Filter = s/e, Qos = AtLeastOnce, Filter = devicecontrol/notifications, Qos = AtLeastOnce, Filter = error, Qos = AtLeastOnce]
Jun 24 15:06:07 rackfslot2 tedge-mapper[161550]: 2024-06-24T13:06:07.165885116Z ERROR tedge_mqtt_bridge::health: MQTT bridge failed to connect to cloud broker: Mqtt state: Io error: Custom { kind: ConnectionAborted, error: "connection closed by peer" }
Jun 24 15:06:07 rackfslot2 tedge-mapper[161550]: 2024-06-24T13:06:07.169332687Z INFO tedge_mqtt_bridge: Waiting 19.892776233s until attempting reconnection to cloud broker
Jun 24 15:06:27 rackfslot2 tedge-mapper[161550]: 2024-06-24T13:06:27.298274083Z INFO tedge_mqtt_bridge::health: MQTT bridge connected to cloud broker
Jun 24 15:06:27 rackfslot2 tedge-mapper[161550]: 2024-06-24T13:06:27.298333397Z INFO tedge_mqtt_bridge: Bridge cloud connection "cloud" subscribing to [Filter = s/dt, Qos = AtLeastOnce, Filter = s/dat, Qos = AtLeastOnce, Filter = s/ds, Qos = AtLeastOnce, Filter = s/e, Qos = AtLeastOnce, Filter = devicecontrol/notifications, Qos = AtLeastOnce, Filter = error, Qos = AtLeastOnce]
Describe the bug
The tedge-mapper-c8y process stops sending data to Cumulocity IoT when using the built-in bridge.
The device where the problem was seen includes a special MQTT subscription which looks at the
tedge-mapper-bridge-c8y
service status, and the log shows that the status was toggling betweenup
anddown
, though it is currently showing asup
even though the device is not responding to operations or sending measurements.The
tedge connect c8y --test
mostly fails, but sporadically passes (e.g. it will receive a jwt every now and then), below shows both the failed connection test.Symptoms
c8y/#
topictedge-mapper-c8y
service seemed to resume normal function (e.g. operations were processed and measurements were sent)To Reproduce
It is unclear how to reproduce the bug. This section will be expanded once more information is known.
Expected behavior
The built-in bridge should reliably reconnect to the IoT Cloud, and the status of the bridge should be faithfully represented on the associated service topic.
Screenshots
Environment (please complete the following information):
Debian GNU/Linux 12 (bookworm)
Raspberry Pi 4 Model B Rev 1.5
Linux rackfslot2 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux
tedge 1.1.2~129+gdc64912
Additional context
journalctl -fu tedge-mapper-c8y