Skip to content

[HELP]Local MQTT connector ModuleMQTT (configuration moduleMqtt.json) is not loaded when remoteConfiguration is false #2041

@JamesLebron

Description

@JamesLebron

Describe the issue

I am running ThingsBoard IoT Gateway on an embedded ARM Linux board (Buildroot-based, Rockchip RK3566).

During development, I configured and tested an MQTT connector using Remote Configuration in the ThingsBoard UI. It worked correctly.

Now I want to productize this connector so that all gateways use a local connector configuration instead of remote configuration.

I did the following:

  1. Copied the working MQTT connector configuration from remote configuration to a local file moduleMqtt.json under /etc/thingsboard-gateway/config/.
  2. Updated /etc/thingsboard-gateway/config/tb_gateway.json to register this connector:
    "connectors": [
      {
        "type": "mqtt",
        "name": "ModuleMQTT",
        "configuration": "moduleMqtt.json"
      }
    ]
  3. Set "remoteConfiguration": false in tb_gateway.json because I want to use only local configuration.
  4. Started the gateway manually with:
    thingsboard-gateway 

Expected behavior

  • The local MQTT connector ModuleMQTT should be loaded on startup.
  • I expect to see log lines like Starting MQTT connector ModuleMQTT ... and connector-specific logs in connector.log.
  • In statistics, connectorsStats should contain an entry for ModuleMQTT.
  • The gateway should try to connect to the external MQTT broker defined in moduleMqtt.json.

Actual behavior

  • The gateway itself starts successfully and connects to ThingsBoard, but the local MQTT connector does not appear to be loaded.
  • Console output shows messages like:
    Connector with id c5cdde8b-9ca5-4035-b4f5-b3fe261ccc0f not found, trying to use default connector...
    Connector with id c5cdde8b-9ca5-4035-b4f5-b3fe261ccc0f not found, trying to use default connector...
    Connector with id c5cdde8b-9ca5-4035-b4f5-b3fe261ccc0f not found, trying to use default connector...
    Cannot use TLS connection on this port. Client will try to connect without TLS.
    [STRLAN ONLY] 2025-12-08 16:58:38,277 - INFO - tb_gateway_service - Start checking new gateway attributes...
    [STRLAN ONLY] 2025-12-08 16:58:38,284 - INFO - tb_gateway_service - Gateway core started
    [STRLAN ONLY] 2025-12-08 16:58:38,293 - INFO - tb_gateway_service - Gateway connected to ThingsBoard
    [STRLAN ONLY] 2025-12-08 16:58:38,303 - INFO - tb_gateway_service - Persistent device storage created
    [STRLAN ONLY] 2025-12-08 16:58:38,305 - INFO - tb_gateway_service - Gateway started.
    [STRLAN ONLY] 2025-12-08 16:58:38,319 - INFO - statistics_service - Collected requests statistics...
    
  • connectorsStats is always {}, which suggests that no connector is actually active.
  • I do not see any log line indicating that ModuleMQTT is started, nor any connection attempts to the external MQTT broker defined in moduleMqtt.json.
  • The UUID c5cdde8b... looks like it belongs to an old remotely-configured connector. My understanding, however, is that when "remoteConfiguration": false is set, the gateway should ignore any remote connector definitions and only use the local connectors array from tb_gateway.json.

So the core issue is:

Even though the local MQTT connector ModuleMQTT (configuration file moduleMqtt.json) is correctly listed in tb_gateway.json and the file exists in the config directory, it is not loaded/started when using local configuration mode.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions