[HELP]
Describe the issue I have added a odbc connector via thingsboard pe web ui and have installed v3.7.0 thingsboard iot gateway. Both is running on a bare metal kubernetes cluster. Connection between thingsboard pe and thingsboard iot gateway is working fine, but on the thingsboard iot gateway side I get following error:
[notice] A new release of pip is available: 25.0 -> 25.0.1
[notice] To update, run: pip install --upgrade pip
ODBC library not found - installing...
2025-02-12 09:33:59 - |ERROR| - [tb_loader.py] - tb_loader - import_module - 77 - libodbc.so.2: cannot open shared object file: No such file or directory
2025-02-12 09:33:59 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - _load_connectors - 897 - Connector implementation not found for Postgres Chirpstack
2025-02-12 09:33:59 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - _load_connectors - 900 - The following error occurred during importing connector class: libodbc.so.2: cannot open shared object file: No such file or directory
NoneType: None
Requirement already satisfied: pyodbc in /root/.local/lib/python3.11/site-packages (5.2.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
I checked, the pyodbc package is installed, but the shared object file 'libodbc.so.2' is nowhere...
Connector name (If you need help with some connector/converter): ODBC Connector
Versions (please complete the following information):
- OS: Docker container
- Thingsboard IoT Gateway version 3.7.0
Hi @hoffi085,
Thank you for your interest in ThingsBoard IoT Gateway.
Unfortunately at the moment - in case of using docker - you need to manually install odbc driver for your database inside of container, we have a task to add automatic installation of it in out backlog, but it is not implemented yet.
Hi @imbeacon, thanks for that hint. I have now installed the odbc driver inside the container. Now I get following error:
2025-02-12 16:00:39 - |ERROR| - [odbc_connector.py] - odbc_connector - __init_connection - 336 - [Postgres Chirpstack] Failed to connect to database: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'PostgreSQL' : file not found (0) (SQLDriverConnect)")