thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.67k stars 809 forks source link

[BUG] The did not docker, connection FAIL with error 5 not authorised because no judgment env #1232

Closed sanliakeman123 closed 6 months ago

sanliakeman123 commented 8 months ago

Describe the bug The credentials used are information from environment variables

Error traceback (If available):

2023-11-17 19:25:36 - |ERROR| - [tb_device_mqtt.py] - tb_device_mqtt - _on_connect - 222 - connection FAIL with error 5 not authorised

Versions (please complete the following information):

code location thingsboard_gateway\gateway\tb_gateway_service.py line 193 self.__modify_main_config()

imbeacon commented 8 months ago

Hi @sanliakeman123,

Thank you for your interest in Thingsboard IoT Gateway. You are right, environment variables have more priority than configuration parameters. If you don't pass the variable, the gateway will not use it and it will use values from the configuration file.

DuXiaoChuang commented 5 months ago

how to resolve this problem?? 微信图片_20240129090649

tangchengxiang666 commented 1 month ago

如何规划? 微信图片_20240129090649

The self.__modify_main_config() method in the tb_gateway_service.py file overrides the current tb_gateway configuration with environment variables