Sonata Stats 1.0.1-4 : mail settings trouble, reports not sent

VitalPBX Community Support Reporting an Issue Sonata Stats 1.0.1-4 : mail settings trouble, reports not sent

  • Post
    giovanni.v
    Participant
    IT
    I’m unable to properly set-up smtp in Sonata Stats getting an error both when saving setting and at testing using “Send email test”. The very same settings works on the pbx side (vitalbpx 3.0.4-2) .
    Also report scheduling doesn’t work, shedules are set but nothing sent. Using the “Send now” button says the job is queued but nothing will be sent.

    However cron jobs seem to run wihout issues:

    ov 23 08:01:02 ipbx run-parts(/etc/cron.hourly)[31880]: starting 0anacron
    Nov 23 08:01:02 ipbx run-parts(/etc/cron.hourly)[31891]: finished 0anacron
    Nov 23 08:01:02 ipbx run-parts(/etc/cron.hourly)[31880]: starting vpbx_check_disk
    Nov 23 08:01:02 ipbx run-parts(/etc/cron.hourly)[31898]: finished vpbx_check_disk
    Nov 23 08:01:02 ipbx run-parts(/etc/cron.hourly)[31880]: starting vpbx_dynamic_routing
    Nov 23 08:01:03 ipbx run-parts(/etc/cron.hourly)[31926]: finished vpbx_dynamic_routing
    Nov 23 08:02:01 ipbx CROND[32021]: (root) CMD (cd /usr/share/sonata/queues-stats/backend && php artisan schedule:run >> /dev/null 2>&1)
    Nov 23 08:03:01 ipbx CROND[32129]: (root) CMD (cd /usr/share/sonata/queues-stats/backend && php artisan schedule:run >> /dev/null 2>&1)
    Nov 23 08:04:02 ipbx CROND[32236]: (root) CMD (cd /usr/share/sonata/queues-stats/backend && php artisan schedule:run >> /dev/null 2>&1)
    Nov 23 08:05:01 ipbx CROND[32346]: (root) CMD (/usr/share/vitalpbx/scripts/update_tc >/dev/null 2>&1)

    Attachments:
    You must be logged in to view attached files.
    0
Viewing 14 replies - 1 through 14 (of 14 total)
  • Replies
    giovanni.v
    Participant
    IT
    Up
    0
    Down
    Running the scheduled command manually also does nothing:

    [root@ipbx ~]# cd /usr/share/sonata/queues-stats/backend
    [root@ipbx backend]# php artisan schedule:run
    Running scheduled command: App\Jobs\SendScheduledReport
    [root@ipbx backend]#

    0
    Up
    0
    Down
    We will release an update soon for fixing this!
    0
    giovanni.v
    Participant
    IT
    Up
    0
    Down

    We will release an update soon for fixing this!

    Thanks for looking at this issue. I need this module for a customer site but unfortunately the scheduled reports is the most important request.

    0
    giovanni.v
    Participant
    IT
    Up
    0
    Down
    We will release an update soon for fixing this!

    Any news about fixing this isssue?

    0
    GitsTel
    Participant
    Up
    0
    Down
    We also have this issue, when do you think the update will happen?
    0
    giovanni.v
    Participant
    IT
    Up
    0
    Down
    Updated to version 1.0.2-1 this issue is still here.

    Really disapponted that an advertised feature doesn’work at all and not fixed after a quite long time.

    • This reply was modified 1 month ago by giovanni.v.
    0
    Roger Gaitan
    Participant
    none
    Up
    0
    Down
    Please try this on the console systemctl restart sonata-stats.
    0
    giovanni.v
    Participant
    IT
    Up
    0
    Down
    Done but still doesn’t works, same issue. Any way to help debugging?

    It is possible to create reports from command line?

    0
    Roger Gaitan
    Participant
    none
    Up
    0
    Down
    At the moment is only possible to create reports using the user interface

    Try this systemctl status sonata-stats at the bottom do you see something similar to this example? that indicates if an email was processed and also have you tried using a different email configuration?

    Dec 19 16:38:03 stats.vitalpbx.org php[23622]: [2020-12-19 10:38:03][55359] Processing: App\Jobs\SendScheduledReport
    Dec 19 16:38:03 stats.vitalpbx.org php[23622]: [2020-12-19 10:38:03][55359] Processed: App\Jobs\SendScheduledReport

    0
    Roger Gaitan
    Participant
    none
    Up
    0
    Down
    We can also assist you trough anydesk monday to friday from 8:00 AM to 5:30 PM us central time.
    0
    giovanni.v
    Participant
    IT
    Up
    0
    Down
    As stated in the very first post also sending the test email doesn’t work but the same settings on the pbx works.

    systemctl status sonata-stats

    [root@ipbx ~]# systemctl status sonata-stats
    ● sonata-stats.service - Sonata Stats
    Loaded: loaded (/usr/lib/systemd/system/sonata-stats.service; enabled; vendor preset: disabled)
    Active: active (running) since Tue 2020-12-22 10:48:30 CET; 4h 54min ago
    Main PID: 24873 (php)
    CGroup: /system.slice/sonata-stats.service
    └─24873 /usr/bin/php artisan queue:work

    Dec 22 15:41:17 ipbx.local php[24873]: [2020-12-22 15:41:17][233435] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:41:25 ipbx.local php[24873]: [2020-12-22 15:41:25][233436] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:41:32 ipbx.local php[24873]: [2020-12-22 15:41:32][233437] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:41:39 ipbx.local php[24873]: [2020-12-22 15:41:39][233437] Failed: App\Jobs\SendScheduledReport
    Dec 22 15:42:03 ipbx.local php[24873]: [2020-12-22 15:42:03][233438] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:42:10 ipbx.local php[24873]: [2020-12-22 15:42:10][233439] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:42:17 ipbx.local php[24873]: [2020-12-22 15:42:17][233440] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:42:23 ipbx.local php[24873]: [2020-12-22 15:42:23][233441] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:42:30 ipbx.local php[24873]: [2020-12-22 15:42:30][233442] Processing: App\Jobs\SendScheduledReport
    Dec 22 15:42:38 ipbx.local php[24873]: [2020-12-22 15:42:38][233442] Failed: App\Jobs\SendScheduledReport

    This says the service is running from 4h 54 min despite the fact this service was reloaded 2 days ago.

    1
    Roger Gaitan
    Participant
    none
    Up
    0
    Down
    Could you please attach the files located in /usr/share/sonata/queues-stats/backend/storage/logs to check for errors.
    0
    giovanni.v
    Participant
    IT
    Up
    0
    Down

    Roger Gaitan: /usr/share/sonata/queues-stats/backend/storage/logs

    This was helpful!

    [2020-12-23 11:29:09] production.ERROR: stream_socket_enable_crypto(): Peer certificate CN=*.postassl.it' did not match expected CN=smtp.xxxyyy.it' {"exception":"[object] (ErrorException(code: 0): stream_socket_enable_crypto(): Peer certificate CN=*.postassl.it' did not match expected CN=`smtp.xxxyyy.it' at /usr/share/sonata/queues-stats/backend/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:94)

    So I was forced to use another SMTP service to get reports sent successfully despite the fact that the old settings for smtp.xxxyyy.it above works without issues in core pbx settings. Please compare the attached image with the one I posted in the first post.

    My guess is that the code in sonata stats does a strict check on the ssl certificate but the pbx core doesn’t.

    • This reply was modified 1 week ago by giovanni.v.
    Attachments:
    You must be logged in to view attached files.
    0
    Roger Gaitan
    Participant
    none
    Up
    0
    Down
    Thank you we’ll take a look.
    • This reply was modified 5 days, 11 hours ago by Roger Gaitan.
    0
Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.