You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/20 10:49:48 UTC

[GitHub] [superset] Mohtasim878 opened a new issue, #19789: Unable to trigger reports & alerts in Superset

Mohtasim878 opened a new issue, #19789:
URL: https://github.com/apache/superset/issues/19789

   Hi All,
   I have enabled alerts reports in superset version:1.4.2.
   I am able to create them but they arent triggering (Nothing Triggered). I tried multiple ways but still cant.
   
   Below is the Log
   
   **Log:
   
   2022-04-15 15:25:08,868:**DEBUG:cron_descriptor.GetText:Failed to find locale None**
   2022-04-15 15:25:08,898:INFO:werkzeug:127.0.0.1 - - [15/Apr/2022 15:25:08] "←[37mGET /api/v1/report/?q=(filters:!((col:type,opr:eq,value:Report)),order_column:name,order_direction:desc,page:0,page_size:25) HTTP/1.1←[0m" 200 -**
   **Also here config.py file if some one can review and resend if am missing anything thanks:**
   **[config.txt](https://github.com/apache/superset/files/8520815/config.txt)**
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] kishan7492 commented on issue #19789: Unable to trigger reports & alerts in Superset

Posted by "kishan7492 (via GitHub)" <gi...@apache.org>.
kishan7492 commented on issue #19789:
URL: https://github.com/apache/superset/issues/19789#issuecomment-1537604049

   I'm having the same issue. I'm using the https://hub.docker.com/r/apache/superset Docker Image with a 2.1.0 flag. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Unable to trigger reports & alerts in Superset [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #19789:
URL: https://github.com/apache/superset/issues/19789#issuecomment-1852565387

   The original post is pretty stale now and the replies have various contributing factors.  "Unable to trigger reports & alerts in Superset" is too broad to be actionable.  I'm going to close this.
   
   If people are looking for debugging help on configuring Alerts & Reports, please post a GitHub Discussion or join the Superset Slack chat (link on main Superset repo page).  If you believe you've found a bug in the Superset software, please create a new, specific issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] M3gar00 commented on issue #19789: Unable to trigger reports & alerts in Superset

Posted by GitBox <gi...@apache.org>.
M3gar00 commented on issue #19789:
URL: https://github.com/apache/superset/issues/19789#issuecomment-1256512430

   Any updates on this issue? Were you able to get it to work? I'm seeing the same behavior and I have a similar configuration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Unable to trigger reports & alerts in Superset [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke closed issue #19789: Unable to trigger reports & alerts in Superset
URL: https://github.com/apache/superset/issues/19789


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Mohtasim878 commented on issue #19789: Unable to trigger reports & alerts in Superset

Posted by GitBox <gi...@apache.org>.
Mohtasim878 commented on issue #19789:
URL: https://github.com/apache/superset/issues/19789#issuecomment-1103918860

   Hey @cemremengu thanks for your response i followed doc and  those in config file .
   As Am beginner so could you please guide me how to start its instance. I installed superset on windows.
   
   Config File:
   class CeleryConfig:  # pylint: disable=too-few-public-methods
       BROKER_URL = "sqla+sqlite:///celerydb.sqlite"
       CELERY_IMPORTS = ("superset.sql_lab", "superset.tasks")
       CELERY_RESULT_BACKEND = "db+sqlite:///celery_results.sqlite"
       CELERYD_LOG_LEVEL = "DEBUG"
       CELERYD_PREFETCH_MULTIPLIER = 1
       CELERY_ACKS_LATE = False
       CELERY_ANNOTATIONS = {
           "sql_lab.get_sql_results": {"rate_limit": "100/s"},
           "email_reports.send": {
               "rate_limit": "1/s",
               "time_limit": int(timedelta(seconds=120).total_seconds()),
               "soft_time_limit": int(timedelta(seconds=150).total_seconds()),
               "ignore_result": True,
           },
       }
       CELERYBEAT_SCHEDULE = {
           "email_reports.schedule_hourly": {
               "task": "email_reports.schedule_hourly",
               "schedule": crontab(minute=1, hour="*"),
           },
           "reports.scheduler": {
               "task": "reports.scheduler",
               "schedule": crontab(minute="*", hour="*"),
           },
           "reports.prune_log": {
               "task": "reports.prune_log",
               "schedule": crontab(minute=0, hour=0),
           },
       }
   
   
   CELERY_CONFIG = CeleryConfig  # pylint: disable=invalid-name


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] cemremengu commented on issue #19789: Unable to trigger reports & alerts in Superset

Posted by GitBox <gi...@apache.org>.
cemremengu commented on issue #19789:
URL: https://github.com/apache/superset/issues/19789#issuecomment-1103912891

   Have you started a celery worker and a celery beat instance/container? If so, you need to check worker logs.
   
   see https://superset.apache.org/docs/installation/alerts-reports/#docker-compose


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] ya-msh commented on issue #19789: Unable to trigger reports & alerts in Superset

Posted by "ya-msh (via GitHub)" <gi...@apache.org>.
ya-msh commented on issue #19789:
URL: https://github.com/apache/superset/issues/19789#issuecomment-1632958386

   Hi,
   I have 2.1.0 installed from scratch via pip on Ubuntu and had a similar experience.
   At the start point, the only difference in the log is that a locale is found:
   `2023-07-12 16:48:12,235:DEBUG:cron_descriptor.GetText:./cron_descriptor/locale/fr_FR.mo Loaded`
   
   But next it happens nothing indeed, so I investigated…
   It seems Celery is not managed by Superset processes, so we have to start manually Celery worker and beat.
   I did it with these commands:
   ```
   celery --app superset.tasks.celery_app:app worker --pool=prefork --max-tasks-per-child=128 -O fair &
   celery --app superset.tasks.celery_app:app beat &
   ```
   Connection with Superset is established: I see my scheduled reports logged in terminal: it is a good thing.
   Example:
   `Scheduling alert Test mail text eta: 2023-07-12 15:37:00`
   
   Unfortunately after that I had a lot of other issues.
   
   1°) KeyError: 'email_reports.schedule_hourly'
   Lines 778 -> 781 in config.py are not recognized.
   => I commented it and error disappeared
   
   2°) TypeError: Parser must be a string or character stream, not datetime
   In superset/tasks/scheduler.py, I replaced line 81 by
   `scheduled_dttm_ = scheduled_dttm`
   
   And I think I progressed because logs go much further:
   ```
   [2023-07-12 19:08:00,253: INFO/ForkPoolWorker-2] Scheduling alert Test mail text eta: 2023-07-12 17:08:00
   [2023-07-12 19:08:01,256: INFO/ForkPoolWorker-4] Executing alert/report, task id: 3405cd9d-5624-48ef-be0a-3b6e7b4a2cca, scheduled_dttm: 2023-07-12 17:08:00
   [2023-07-12 19:08:01,257: INFO/ForkPoolWorker-4] session is validated: id 3, executionid: 3405cd9d-5624-48ef-be0a-3b6e7b4a2cca
   [2023-07-12 19:08:01,275: INFO/ForkPoolWorker-4] Running report schedule 3405cd9d-5624-48ef-be0a-3b6e7b4a2cca as user admin
   [2023-07-12 19:08:01,331: INFO/ForkPoolWorker-4] Getting chart from http://0.0.0.0:8080/api/v1/chart/7/data/?format=json&type=post_processed&force=false as user admin
   ```
   
   Ultimately I have other errors, among others:
   ```
   [2023-07-12 19:08:01,357: WARNING/ForkPoolWorker-4] SupersetError(message='[Errno -2] Name or service not known', error_type=<SupersetErrorType.REPORT_NOTIFICATION_ERROR: 'REPORT_NOTIFICATION_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra=None)
   ConnectionRefusedError: [Errno 111] Connection refused
   ```
   
   But the good news is that finally, the run is returned in "Alerts & Report" page
   => see screenshot
   ![Superset_Reports_last_run_KO](https://github.com/apache/superset/assets/137871159/5081c139-0838-4440-b0f3-2d4b3af5948a)
   
   To be continued…
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org