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.73k stars 837 forks source link

[BUG] ThingsBoard Gateway does not send telemetry #1052

Closed Steampunkery closed 7 months ago

Steampunkery commented 1 year ago

Describe the bug More recent installations of thingsboard gateway are not sending telemetry from our BLE devices. The gateway will connect to the device. It will print a log saying that it can't find an attribute characteristic (normal), but it will never send any telemetry. Installations installed back in May of 2022 are still functional.

Things we have tried:

This leads us to believe that this is either a dependency issue or an OS issue. See logs below for more context. We have been working on this issue for many hours, so please don't hesitate to ask if we've tried something.

Connector name (If bug in the some connector): BLE connector (others untested)

LOGS https://pastebin.com/meN4yVn6 The issue starts around line 134 and again at 247.

Versions (please complete the following information):

samson0v commented 1 year ago

Hi @Steampunkery, thanks for your interest in ThingsBoard IoT Gateway. Send, please, your configuration files.

Steampunkery commented 1 year ago

Here are my relevant configuration files.

config.zip

samson0v commented 1 year ago

Hi @Steampunkery, are you sure that you send the right config files? Because there is a difference between logs char and config char.

Steampunkery commented 1 year ago

Those configuration files are identical to the configurations used with the exception of the characteristic value. The bug appears no matter the value of the characteristic. Even if you use one of the bluetooth standard device information characteristics.

samson0v commented 1 year ago

@Steampunkery, make sure that your Gateway uses the right config files. Because of logs, I can see that you also use MQTT Connector but in the config file, you are using only BLE Connector. I recommend you delete all Gateway folders and make a clean installation.

Steampunkery commented 1 year ago

Hi, thanks for the suggestion. We have taken these steps more than 10 times. We are fairly sure it is an issue with dependencies or some other systemic issue because we are able to copy a working version from an older OS installation to a newer OS installation, and the problem still persists.

samson0v commented 1 year ago

@Steampunkery, "clean installation", I mean this instruction: https://github.com/thingsboard/thingsboard-gateway/issues/977#issuecomment-1300244839

samson0v commented 1 year ago

@Steampunkery, any updates?

Steampunkery commented 1 year ago

Hi, I haven't had a chance to take those steps yet. Has anyone looked into the bug on your side? I'll try to execute the steps soon.

Steampunkery commented 1 year ago

One of our team members has run the installation on a completely fresh version of Debian 11 (bullseye), and is experiencing the same error. We have some bullseye machines that are working, and some that aren't. The only discernable difference is that the working machines were set up before the non-working machines. This points to an error in the system or the way that thingsboard gateway is configured.

samson0v commented 1 year ago

Hi @Steampunkery, let's continue our chat on the email. Please, send me a message to vbidochka@thingsboard.io

Mannetjie commented 1 year ago

Have this been resolved as I am experiencing exactly the same issue. Clean install, following the getting started guide. The device gets created, clean logs, BUT absolutely no telemetry data. Although I am using Mqtt.

Steampunkery commented 1 year ago

No, it hasn't been resolved on my end yet.

Thomas ASCII and ye shall receive

On Mon, Mar 20, 2023, 07:35 Mannetjie (Klaas) van Rooyen < @.***> wrote:

Have this been resolved as I am experiencing exactly the same issue. Clean install, following the getting started guide. The device gets created, all logs clean (no errors) BUT absolutely no telemetry data

— Reply to this email directly, view it on GitHub https://github.com/thingsboard/thingsboard-gateway/issues/1052#issuecomment-1476066052, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3IOUYWJZUBC4WJKZGCFDLW5A6GVANCNFSM6AAAAAAUPNRUM4 . You are receiving this because you were mentioned.Message ID: @.***>

Mannetjie commented 1 year ago

Hi Thomas

I got mine working. Here is what I did so far and I hope this helps you. 1: I stopped the gateway service. 2: Ran the thingsboard-gateway manually. This showed me that there is some error in the statistics file. So I disabled that for now in the config file and ran it again manually. Then all of the sudden things started flowing. I did get an error on one of the threads at this stage and it stopped working again. Ran it again manually and all goes well.

I started the service again and it did run for a few messages and then just stopped working again. Stopped the service and started it manually again and all is fine again. I am trying to reproduce the thread error and then I will have a look at the statistics error.

I truly hope this helps you. I will keep you up to date on my findings.

Regards Mannetjie

On Mon, 20 Mar 2023 at 15:23, Steampunkery @.***> wrote:

No, it hasn't been resolved on my end yet.

Thomas ASCII and ye shall receive

On Mon, Mar 20, 2023, 07:35 Mannetjie (Klaas) van Rooyen < @.***> wrote:

Have this been resolved as I am experiencing exactly the same issue. Clean install, following the getting started guide. The device gets created, all logs clean (no errors) BUT absolutely no telemetry data

— Reply to this email directly, view it on GitHub < https://github.com/thingsboard/thingsboard-gateway/issues/1052#issuecomment-1476066052 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AC3IOUYWJZUBC4WJKZGCFDLW5A6GVANCNFSM6AAAAAAUPNRUM4

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/thingsboard/thingsboard-gateway/issues/1052#issuecomment-1476226630, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADYVSD2N4UEQ6HZ3MASXCFTW5BK33ANCNFSM6AAAAAAUPNRUM4 . You are receiving this because you commented.Message ID: @.***>

--

Mannetjie Van Rooyen Senior Developer

011 317 4900 060 076 6750 Google Certified Professional Cloud Architect Google Certified Professional Data Engineer Google Certified Professional Developer Certified Kubernetes Application Developer monday.com Developers Badge @.*** www.opennetworks.com Johannesburg, Cape Town, South Africa