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

thin-edge.io does not handle mosquitto bridge status 1/0 status correctly #3488

Closed
reubenmiller opened this issue Mar 20, 2025 · 3 comments
Closed
Assignees
Labels
bug Something isn't working theme:aws Theme: AWS cloud related topics theme:mqtt Theme: mqtt and mosquitto related topics
Milestone

Comments

@reubenmiller
Copy link
Contributor

Describe the bug

The following local MQTT messages were observed from the mosquitto bridge connection to c8y (where the bridge is down).

[c8y/s/us] 102,TST_glance_nullary_function:device:main:service:mosquitto-c8y-bridge,service,mosquitto-c8y-bridge,down
[te/device/main/service/mosquitto-c8y-bridge/status/health] 0
[te/errors] invalid type: integer `0`, expected a map at line 1 column 1

The above messages look like there is an error when there is not, as mosquitto can only send either a 1 or 0 for the bridge status, then thin-edge.io should not treat this as an error.

To Reproduce

It was observed whilst testing an AWS system test, however I don't believe it will be difficult to spot the parsing error in the code.

Expected behavior

Screenshots

Environment (please complete the following information):

Property Value
OS [incl. version] Debian GNU/Linux 12 (bookworm)
Hardware [incl. revision] unknown
System-Architecture Linux b7ddf1fe142a 6.8.0-39-generic #39-Ubuntu SMP PREEMPT_DYNAMIC Sat Jul 6 02:50:39 UTC 2024 aarch64 GNU/Linux
thin-edge.io version tedge 1.4.3~229+g0aaa4d8

Additional context

@reubenmiller reubenmiller added bug Something isn't working theme:mqtt Theme: mqtt and mosquitto related topics labels Mar 20, 2025
@reubenmiller
Copy link
Contributor Author

From further observations, it appears that the error messages may be limited to just the 0 mosquitto bridge health status.

[te/device/main/service/mosquitto-aws-bridge/status/health] 0
[c8y/s/us] 102,TST_glance_nullary_function:device:main:service:mosquitto-aws-bridge,service,mosquitto-aws-bridge,down
[te/device/main/service/mosquitto-aws-bridge/status/health] 1
[c8y/s/us] 102,TST_glance_nullary_function:device:main:service:mosquitto-aws-bridge,service,mosquitto-aws-bridge,up
[te/device/main/service/mosquitto-c8y-bridge/status/health] 0
[te/errors] invalid type: integer `0`, expected a map at line 1 column 1
[c8y/s/us] 102,TST_glance_nullary_function:device:main:service:mosquitto-c8y-bridge,service,mosquitto-c8y-bridge,down

@reubenmiller
Copy link
Contributor Author

@albinsuresh hinted that the source may be coming from the tedge-mapper-aws also parsing the status messages of the c8y mapper, which lead to inspecting the tedge-mapper-aws logs to show that this is the case:

# journalctl -fu tedge-mapper-aws
Mar 20 09:32:36 b7ddf1fe142a tedge-mapper[2137]: 2025-03-20T09:32:36.309686298Z ERROR aws_mapper_ext::converter: Mapping error: invalid type: integer `0`, expected a map at line 1 column 1
Mar 20 09:33:07 b7ddf1fe142a tedge-mapper[2137]: 2025-03-20T09:33:07.292669766Z ERROR aws_mapper_ext::converter: Mapping error: invalid type: integer `0`, expected a map at line 1 column 1

@reubenmiller reubenmiller added the theme:aws Theme: AWS cloud related topics label Mar 20, 2025
@Ruadhri17 Ruadhri17 self-assigned this Mar 24, 2025
@reubenmiller
Copy link
Contributor Author

The tedge-mapper aws seems to handle this situation cleanly now.

@reubenmiller reubenmiller added this to the 1.5.0 milestone Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working theme:aws Theme: AWS cloud related topics theme:mqtt Theme: mqtt and mosquitto related topics
Projects
None yet
Development

No branches or pull requests

2 participants