thingsboard / thingsboard-edge

Apache License 2.0
93 stars 71 forks source link

Edge PE errors related to "change originator" node #113

Closed akseerali closed 2 weeks ago

akseerali commented 3 weeks ago

Component

Description The TB Edge PE 3.6.3 container throws errors for the change originator node. After checking the Rule Engine Statistics under the API Usage, it was found that most of the Change Originator nodes show "Failed to initialize rule node." Another node, the "Flow Rule Chain", was also found to be affected. Some of the error logs from edge container are attached. tb-edge-originator error-logs.txt

The following steps are tried to clear this issue:

Further observations:

Queries:

Environment


Disclaimer

We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.

AndriiLandiak commented 3 weeks ago

Hi, @akseerali.

Based on the logs, you are using ThingsBoard 3.7.0 and Edge 3.6.3/3.6.4. The ### forwardMsgToDefaultRuleChain field for the Change Originator node was added in 3.7.0. To fix this issue, please upgrade for compatibility.

We are committed to ensuring backward compatibility, but sometimes new features cause issues. The recent refactoring in the Major 3.7.0 release has impacted compatibility with Edge 3.6.3/3.6.4. Upgrading to 3.7.0 will resolve this and bring additional improvements.

akseerali commented 2 weeks ago

Hi @AndriiLandiak

Thanks for the response.

The issue persists.

akseerali commented 2 weeks ago

Hi @AndriiLandiak

Here is an update.

In our previous attempt, we upgraded the edge pe instance from 3.6.3 to 3.6.4; however, the upgrade was unsuccessful when we tried to upgrade the version to 3.7.0 due to the duplicate key value errors. To solve this issue, we have reverted back to 3.6.3 and removed the duplicated key value entries from the postgres database using SQL script. Below are the detailed steps for removing the duplicated key value appearing during the upgrade to 3.7.0, as discussed in the previous logs attached here.

logs-when-upgrading-to-3.7.0.txt

Steps to clear the duplication issue using SQL queries

Duplication of email issue The logs in Edge version 3.6.3 also showed the duplicated key value error for an email address assigned to Edge from the cloud. We simply removed the user from the cloud to clear this error, which solved the issue.

Upgradation of edge version to 3.7.0 After resolving the issue of duplicated key value errors, we were able to successfully upgrade the edge from 3.6.4 to 3.7.0 this time. Here is file containing logs obtained during the upgradation of edge from 3.6.4 to 3.7.0. logs-when-upgrading-to-3.7.0-v2.txt

After upgrading the edge, we started the edge instance. The edge container stopped after a few seconds, indicating the software version does not support this license. Please find below the logs from the edge container after running the first time post-upgrade. logs-after-upgrading-to-3.7.0.txt

Queries

AndriiLandiak commented 2 weeks ago

Hi, @akseerali!

Great job on resolving the issue with the attribute_kv constraints.

Based on the logs, there's a problem regarding the perpetual rule of "1 year of software updates."

Could you please create a ticket on the customer portal with your information, including the license ID for your current subscription? Alternatively, you can email me at alandiak@thingsboard.io. We will generate a new license for you to upgrade the Edge to version 3.7.0.

If you would like to continue receiving new updates, you might consider purchasing a new perpetual subscription for the entire year.

akseerali commented 2 weeks ago

The issue is resolved after upgrading the edge pe version from 3.6.3 to 3.7.0.