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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to