Skip to content

[BUG] Remote config not working #2061

@apachler

Description

@apachler

It seems that there is a problem with updating the gateway config remotely through Thingsboard v3.9.1, see following logs

2026-01-12 10:19:49.140 - |DEBUG| - [client.py] - client - _easy_log - 3264 - Received PUBLISH (d0, q1, r0, m2), 'v1/devices/me/attributes', properties=[], ...  (3881 bytes)
2026-01-12 10:19:49.141 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _attribute_update_callback - 1862 - Attribute request received with content: "{'RemoteLoggingLevel': 'INFO', 'logs_configuration': {'version': 1, 'disable_existing_loggers': False, 'formatters': {'LogFormatter': {'class': 'logging.Formatter', 'format': '%(asctime)s.%(msecs)03d - |%(levelname)s| - [%(filename)s] - %(module)s - %(funcName)s - %(lineno)d - %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S'}}, 'handlers': {'consoleHandler': {'class': 'logging.StreamHandler', 'formatter': 'LogFormatter', 'level': 0, 'stream': 'ext://sys.stdout'}, 'databaseHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/database.log', 'backupCount': 1, 'encoding': 'utf-8'}, 'serviceHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/service.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'connectorHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/connector.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'converterHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/converter.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'tb_connectionHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/tb_connection.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'storageHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/storage.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'extensionHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/extension.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}}, 'loggers': {'database': {'handlers': ['databaseHandler', 'consoleHandler'], 'level': 'DEBUG', 'propagate': False}, 'service': {'handlers': ['serviceHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'connector': {'handlers': ['connectorHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'converter': {'handlers': ['converterHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'tb_connection': {'handlers': ['tb_connectionHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'storage': {'handlers': ['storageHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'extension': {'handlers': ['extensionHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}}, 'root': {'level': 'ERROR', 'handlers': ['consoleHandler']}, 'ts': 1768213188948}, 'grpc_configuration': {'enabled': False, 'serverPort': 9595, 'keepAliveTimeMs': 10000, 'keepAliveTimeoutMs': 5000, 'keepalivePermitWithoutCalls': True, 'maxPingsWithoutData': 0, 'minTimeBetweenPingsMs': 10000, 'minPingIntervalWithoutDataMs': 5000, 'ts': 1768213188948}, 'storage_configuration': {'type': 'memory', 'read_records_count': 100, 'max_records_count': 100000, 'data_folder_path': './data/', 'max_file_count': 10, 'max_read_records_count': 10, 'max_records_per_file': 10000, 'data_file_path': './data/data.db', 'messages_ttl_check_in_hours': 1, 'messages_ttl_in_days': 7, 'ts': 1768213188948}, 'general_configuration': {'host': 'demu-thingsboard-test.itc.global.mahle', 'port': 1883, 'remoteShell': False, 'remoteConfiguration': True, 'checkConnectorsConfigurationInSeconds': 60, 'statistics': {'enable': True, 'statsSendPeriodInSeconds': 3600, 'customStatsSendPeriodInSeconds': 3600, 'commands': []}, 'maxPayloadSizeBytes': 8196, 'minPackSendDelayMS': 50, 'minPackSizeToSend': 500, 'handleDeviceRenaming': True, 'checkingDeviceActivity': {'checkDeviceInactivity': False, 'inactivityTimeoutSeconds': 300, 'inactivityCheckPeriodSeconds': 10}, 'security': {'type': 'accessToken', 'accessToken': 'nokkojaisygzktc'}, 'qos': 1, 'ts': 1768213188948}, 'mode': 'basic'}"
2026-01-12 10:19:49.141 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _attribute_update_callback - 1863 - (None,)
2026-01-12 10:19:49.141 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __process_remote_logging_update - 693 - Remote logging level set to: INFO
2026-01-12 10:19:49.141 - |DEBUG| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - _on_decoded_message - 178 - Unexpected message from topic 'v1/devices/me/attributes', content: {'RemoteLoggingLevel': 'INFO', 'logs_configuration': {'version': 1, 'disable_existing_loggers': False, 'formatters': {'LogFormatter': {'class': 'logging.Formatter', 'format': '%(asctime)s.%(msecs)03d - |%(levelname)s| - [%(filename)s] - %(module)s - %(funcName)s - %(lineno)d - %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S'}}, 'handlers': {'consoleHandler': {'class': 'logging.StreamHandler', 'formatter': 'LogFormatter', 'level': 0, 'stream': 'ext://sys.stdout'}, 'databaseHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/database.log', 'backupCount': 1, 'encoding': 'utf-8'}, 'serviceHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/service.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'connectorHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/connector.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'converterHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/converter.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'tb_connectionHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/tb_connection.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'storageHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/storage.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}, 'extensionHandler': {'class': 'thingsboard_gateway.tb_utility.tb_handler.TimedRotatingFileHandler', 'formatter': 'LogFormatter', 'filename': './logs/extension.log', 'backupCount': 7, 'interval': 3, 'when': 'D', 'encoding': 'utf-8'}}, 'loggers': {'database': {'handlers': ['databaseHandler', 'consoleHandler'], 'level': 'DEBUG', 'propagate': False}, 'service': {'handlers': ['serviceHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'connector': {'handlers': ['connectorHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'converter': {'handlers': ['converterHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'tb_connection': {'handlers': ['tb_connectionHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'storage': {'handlers': ['storageHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}, 'extension': {'handlers': ['extensionHandler', 'consoleHandler'], 'level': 'INFO', 'propagate': False}}, 'root': {'level': 'ERROR', 'handlers': ['consoleHandler']}, 'ts': 1768213188948}, 'grpc_configuration': {'enabled': False, 'serverPort': 9595, 'keepAliveTimeMs': 10000, 'keepAliveTimeoutMs': 5000, 'keepalivePermitWithoutCalls': True, 'maxPingsWithoutData': 0, 'minTimeBetweenPingsMs': 10000, 'minPingIntervalWithoutDataMs': 5000, 'ts': 1768213188948}, 'storage_configuration': {'type': 'memory', 'read_records_count': 100, 'max_records_count': 100000, 'data_folder_path': './data/', 'max_file_count': 10, 'max_read_records_count': 10, 'max_records_per_file': 10000, 'data_file_path': './data/data.db', 'messages_ttl_check_in_hours': 1, 'messages_ttl_in_days': 7, 'ts': 1768213188948}, 'general_configuration': {'host': 'demu-thingsboard-test.itc.global.mahle', 'port': 1883, 'remoteShell': False, 'remoteConfiguration': True, 'checkConnectorsConfigurationInSeconds': 60, 'statistics': {'enable': True, 'statsSendPeriodInSeconds': 3600, 'customStatsSendPeriodInSeconds': 3600, 'commands': []}, 'maxPayloadSizeBytes': 8196, 'minPackSendDelayMS': 50, 'minPackSizeToSend': 500, 'handleDeviceRenaming': True, 'checkingDeviceActivity': {'checkDeviceInactivity': False, 'inactivityTimeoutSeconds': 300, 'inactivityCheckPeriodSeconds': 10}, 'security': {'type': 'accessToken', 'accessToken': 'nokkojaisygzktc'}, 'qos': 1, 'ts': 1768213188948}, 'mode': 'basic'}
I just tried to enable remote logging with INFO level.

Config change is not written to disk ... this also happens if i try to add a new connector named Test ...

2026-01-12 10:37:03.490 - |DEBUG| - [client.py] - client - _easy_log - 3264 - Received PUBLISH (d0, q1, r0, m4), 'v1/devices/me/attributes', properties=[], ...  (42 bytes)
2026-01-12 10:37:03.490 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _attribute_update_callback - 1862 - Attribute request received with content: "{'active_connectors': ['PlcV1Wago', 'Test']}"
2026-01-12 10:37:03.490 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _attribute_update_callback - 1863 - (None,)
2026-01-12 10:37:03.490 - |DEBUG| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - _on_decoded_message - 178 - Unexpected message from topic 'v1/devices/me/attributes', content: {'active_connectors': ['PlcV1Wago', 'Test']}
2026-01-12 10:37:03.490 - |DEBUG| - [client.py] - client - _easy_log - 3264 - Sending PUBACK (Mid: 4)
2026-01-12 10:37:03.538 - |DEBUG| - [client.py] - client - _easy_log - 3264 - Received PUBLISH (d0, q1, r0, m5), 'v1/devices/me/attributes', properties=[], ...  (174 bytes)
2026-01-12 10:37:03.538 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _attribute_update_callback - 1862 - Attribute request received with content: "{'Test': {'type': 'ble', 'name': 'Test', 'logLevel': 'INFO', 'useDefaults': False, 'sendDataOnlyOnChange': False, 'configurationJson': {}, 'configuration': 'test.json', 'ts': 1768214223373}}"
2026-01-12 10:37:03.538 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _attribute_update_callback - 1863 - (None,)
2026-01-12 10:37:03.538 - |DEBUG| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - _on_decoded_message - 178 - Unexpected message from topic 'v1/devices/me/attributes', content: {'Test': {'type': 'ble', 'name': 'Test', 'logLevel': 'INFO', 'useDefaults': False, 'sendDataOnlyOnChange': False, 'configurationJson': {}, 'configuration': 'test.json', 'ts': 1768214223373}}
2026-01-12 10:37:03.538 - |DEBUG| - [client.py] - client - _easy_log - 3264 - Sending PUBACK (Mid: 5)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions