thingsboard: Failed to initialize rule node after stack restart

Describe the bug After restarting the MSA stack rule chains are not able to process JavaScript nodes. The error Failed to initialize rule node! pops up for various rule chains in Rule Engine Statistics Dashboard. Enabling DEBUG for the failing nodes fixes the problem. Even after disabling DEBUG again the nodes are working as expected.

Your Server Environment

  • own setup
    • Deployment: microservices
    • Deployment type: docker-compose
    • ThingsBoard Version 3.7.0
    • Community Edition
    • SLES 15

Expected behavior Rule chain nodes must be processed even after restarting the MSA stack.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (9 by maintainers)

Most upvoted comments

You can use Redpanda https://github.com/thingsboard/thingsboard-ce-k8s/tree/master/tools/kafka or Kafka Exporter to monitor Kafka queues

Yes, TBEL scripts are executed inside the Rules Engine and run much faster than JS scripts.

You can find JS scripts with a query:

select rule_node.name as rule_node_name, rule_chain.name as rule_chain_name, tenant.title as tenant_name from rule_node 
join rule_chain on rule_chain.id=rule_node.rule_chain_id
join tenant on tenant.id=rule_chain.tenant_id
where rule_node.configuration like '%"scriptLang":"JS"%';