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.72k stars 829 forks source link

[BUG] Docker image error #676

Closed l33tkrew closed 2 years ago

l33tkrew commented 2 years ago

Describe the bug I am getting an error while installing the latest docker image. Due to this error, this docker container does not start.

my docker-compose file content;

version: '3.0'
services:
  tb-gateway:
    restart: always
    image: "thingsboard/tb-gateway"
    # Ports (Required for REST connector)
    ports:
      - "5000:5000"
    volumes:
      - ~/.tb-gateway/config:/thingsboard_gateway/config
      - ~/.tb-gateway/logs:/thingsboard_gateway/logs
      - ~/.tb-gateway/extensions:/thingsboard_gateway/extensions

I created the necessary directories and set permission.

I was able to install thingsboard/tb-gateway:2.0 but 3.0 image version causes an error.

Connector name (If bug in the some connector):

Error traceback (If available):

> Executing task: docker logs --tail 1000 -f 836e0bad18d861cf25ea170324f16fee69b2a73edd71bb5b1d60c10e1090ac03 <

Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'
Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'
Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'
Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'
Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'
Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'
Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'

Versions (please complete the following information):

imbeacon commented 2 years ago

Hi @l33tkrew ,

It may be caused by one bug, we have updated docker image. Please try to download latest docker image and run again.

zhuyujie1993 commented 2 years ago

Hi @l33tkrew ,

It may be caused by one bug, we have updated docker image. Please try to download latest docker image and run again.

Please provide the source address of docker warehouse. I tried “ https://registry.hub.docker.com/r/thingsboard/tb-gateway

Retry or fail to start

zhuyujie1993 commented 2 years ago

Hi @l33tkrew ,

It may be caused by one bug, we have updated docker image. Please try to download latest docker image and run again.

OS:linux/arm64

tianke3477 commented 2 years ago

have same error in centos7.9

l33tkrew commented 2 years ago

@zbeacon It is still the same. I cannot start tb-gateway. I installed the latest version with both docker pull and docker-compose. They gave same error.

You can see it is not starting.

18783c0d520c   thingsboard/tb-gateway   "/bin/sh ./start-gat…"   3 days ago   Restarting (1) 5 seconds ago                                                                                          tb-gateway

Log

Traceback (most recent call last):
  File "//./thingsboard_gateway/tb_gateway.py", line 17, in <module>
    from thingsboard_gateway.gateway.tb_gateway_service import TBGatewayService
ModuleNotFoundError: No module named 'thingsboard_gateway'
greg-mcnamara commented 2 years ago

@zbeacon I have the same error, see #685. Sorry I didn't see this issue earlier, didn't mean to duplicate.

imbeacon commented 2 years ago

Hi, Please try to use the latest docker image now.

greg-mcnamara commented 2 years ago

Hi @zbeacon the latest image works for me now. Thanks!