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

[BUG] V3.2 Docker Image Fails on Raspberry Pi When Using Connectors With gRPC Transport #978

Closed
helsmore opened this issue Nov 3, 2022 · 0 comments · Fixed by #979
Closed
Assignees
Labels

Comments

@helsmore
Copy link

helsmore commented Nov 3, 2022

Describe the bug
When using the v3.2 Docker image on a Raspberry Pi with the gRPC Modbus connector an error occurs because GLIBC_2.33 was not found.

Possibly related: The Dockerfile used to install a particular version of grpcio (v1.40.0), the line that did this was removed recently in b2e3dc7 but the comment that has been left behind after that commit may be relevant here:

# The default grpcio version of 1.43.0 was broken on ARM v7
# See this thread: https://groups.google.com/g/grpc-io/c/vjbL3IdZ2Vk?pli=1

The linked discussion thread from that comment suggests pinning the grpcio version at v1.40.0 to fix the GLIBC_2.33 not found error. I suppose that a more proper way to pin the version would be to set it in the docker/requirements.txt file (compared to doing it in the Dockerfile).

If you agree that version pinning is required (to allow use of gRPC connectors when running in Docker on a Pi) then I'm happy to submit a PR.

Connector name (If bug in the some connector):
Modbus

Error traceback (If available):

tb-gateway-tb-gateway-1  | ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /usr/local/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-arm-linux-gnueabihf.so)

Full log since container restart:

tb-gateway-tb-gateway-1  | Cannot load GRPC connector!
tb-gateway-tb-gateway-1  | ""2022-11-03 12:09:35" - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 148 - Gateway starting..."
tb-gateway-tb-gateway-1  | ""2022-11-03 12:09:35" - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 153 - ThingsBoard IoT gateway version: 3.2"
tb-gateway-tb-gateway-1  | ""2022-11-03 12:09:35" - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_subscribe_to_attribute - 185 - Subscribed to *|* with id 1 for device *"
tb-gateway-tb-gateway-1  | ""2022-11-03 12:09:35" - |ERROR| - [tb_loader.py] - tb_loader - import_module - 72 - /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /usr/local/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-arm-linux-gnueabihf.so)"
tb-gateway-tb-gateway-1  | Traceback (most recent call last):
tb-gateway-tb-gateway-1  |   File "/thingsboard_gateway/tb_utility/tb_loader.py", line 65, in import_module
tb-gateway-tb-gateway-1  |     module_spec.loader.exec_module(module)
tb-gateway-tb-gateway-1  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
tb-gateway-tb-gateway-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
tb-gateway-tb-gateway-1  |   File "/thingsboard_gateway/grpc_connectors/modbus/modbus_connector.py", line 29, in <module>
tb-gateway-tb-gateway-1  |     from thingsboard_gateway.grpc_connectors.gw_grpc_connector import GwGrpcConnector, log
tb-gateway-tb-gateway-1  |   File "/thingsboard_gateway/grpc_connectors/gw_grpc_connector.py", line 23, in <module>
tb-gateway-tb-gateway-1  |     from thingsboard_gateway.grpc_connectors.gw_grpc_client import GrpcClient
tb-gateway-tb-gateway-1  |   File "/thingsboard_gateway/grpc_connectors/gw_grpc_client.py", line 17, in <module>
tb-gateway-tb-gateway-1  |     import grpc
tb-gateway-tb-gateway-1  |   File "/usr/local/lib/python3.10/site-packages/grpc/__init__.py", line 22, in <module>
tb-gateway-tb-gateway-1  |     from grpc import _compression
tb-gateway-tb-gateway-1  |   File "/usr/local/lib/python3.10/site-packages/grpc/_compression.py", line 15, in <module>
tb-gateway-tb-gateway-1  |     from grpc._cython import cygrpc
tb-gateway-tb-gateway-1  | ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /usr/local/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-arm-linux-gnueabihf.so)
tb-gateway-tb-gateway-1  | ""2022-11-03 12:09:35" - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import ModbusConnector from /thingsboard_gateway/connectors/modbus."
tb-gateway-tb-gateway-1  | ""2022-11-03 12:09:36" - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 252 - Gateway started."

Versions (please complete the following information):

  • OS: Raspbian GNU/Linux 11 (bullseye)
  • Thingsboard IoT Gateway version 3.2
  • Python version set by Dockerfile (python:3.10-slim)
@helsmore helsmore added the bug label Nov 3, 2022
@helsmore helsmore changed the title [BUG] V3.2 Docker Image Fails on Raspberry Pi When Using Connectors In gRPC Mode [BUG] V3.2 Docker Image Fails on Raspberry Pi When Using Connectors With gRPC Transport Nov 3, 2022
@samson0v samson0v linked a pull request Nov 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants