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

[Question] Generate Report node in rule chain refuses connection at Edge #59

Open
akseerali opened this issue May 29, 2023 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@akseerali
Copy link

akseerali commented May 29, 2023

Component

  • Rule Engine

Description
I am trying to generate reports on cloud and edge. On the cloud, the reports can be easily scheduled; however, on the edge I am getting "connection refused" error in the Generate Report node in rule chain. The edge also can't export the dashboard.

Please share any hints on how to clear this error. I have also tried to configure the edge reporting parameters in docker compose file but its not solving the problem.

image

image

Environment

  • OS: Ubuntu 22.04
  • ThingsBoard Edge: 3.5.0EDGEPE
  • Browser: Google Chrome 113.0.5672.126
@akseerali akseerali added the question Further information is requested label May 29, 2023
@volodymyr-babak
Copy link
Collaborator

Hello @akseerali,

In order to generate reports on ThingsBoard Edge, there are a few critical steps that need to be carried out. Primarily, you'll need to initiate the web-report service and ensure that your Edge can access this service. Furthermore, the web-report service must be able to access the Edge in order to open dashboards, take 'screenshots' of these dashboards, and generate reports based on this data.

To aid in the configuration, I've attached a sample docker compose file. This example pertains to an Edge that is connected to thingsboard.cloud and has the capability to generate reports:

image

docker-compose.yml.txt

Please note that to ensure the web-report service can access the Edge container running inside Docker, it's necessary to access Edge using the IP address of your host machine:

image

One potential pitfall to be aware of is that if you open the Edge UI using localhost:8080, the web-report service will interpret the baseUrl as localhost and attempt to open the dashboard within its own Docker container. However, it needs to open the dashboard in the Edge container for the correct operation.

I hope this information aids in resolving your issue. Should you have further questions or encounter additional problems, please don't hesitate to reach out.

@akseerali
Copy link
Author

Hi @volodymyr-babak

I have a query regarding the scheduled reporting feature at the edge.

Background:
We are using a schedule to generate a dashboard report, which is then sent to a user via email. Please see the diagram below for the feature reporting implemented at the edge.
image
Figure: Overview of reporting feature implemented at the edge.

Issue:
When we generate a dashboard report consisting of time series data using a scheduler, it generates the dashboard report with blank widgets that show time series data, such as a bar chart, line chart, or time series table. The entity table or the widgets with only the latest values are generated normally.

This issue is observed when the user does not monitor the edge. For example, if the user has not logged in to monitor the edge UI for a few days, the edge is unable to generate scheduled reports for the time series data. Please check the two figures below, which show an example of the normal dashboard view and the dashboard view generated from a scheduled report.

image
Figure: Overview of a normal dashboard consisting of time series widget and entity table.

image
Figure: Overview of a dashboard generated from scheduled report feature.

Question:
Is it possible to solve this issue?

@akseerali akseerali reopened this May 8, 2024
@volodymyr-babak
Copy link
Collaborator

Hi @akseerali,

please provide your Scheduler configuration.

Additionally, please check the same behavior on TB server, if possible. In this way we'll understand if the root cause is in the Edge or in TB Report generation in general.

@akseerali
Copy link
Author

There was an issue with the rule chain configuration.
Issue was cleared after following the correct steps.
https://thingsboard.io/docs/pe/user-guide/reporting/

@akseerali
Copy link
Author

Hi @volodymyr-babak

The issue is appearing again.

We have gone through some troubleshooting steps and presented some insights for better understanding.

  • When we generate the same dashboard report continuously every 5 minutes, it shows a complete graph at the second/third attempt.
  • The issue seems to be linked to the browser's cache. Once there is a timeout for report generation, it generates the report with an empty time-series graph.

Here are some detailed steps for the scheduler configuration and to reproduce this issue:

  1. Configuration of reporting schedule - part 1
    image

  2. Configuration of reporting schedule - part 2
    image

  3. Configuration of edge root rule chain - part 1
    image

  4. Configuration of edge root rule chain - part 2
    image

  5. Configuration of edge root rule chain - part 3
    image

@akseerali akseerali reopened this Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants