Skip to content

Report Scheduler has a problem sending emails #259

@Swomie0815

Description

@Swomie0815

Describe the bug

The scheduler does not send any SLA report emails, or it works until the first error occurs and then the debug log fills up with errors. Reports in the web interface are displayed quickly and manual sending also works.

Expected behavior

Reports were sent without any problems using older versions of Icinga and PHP.

Screenshots

Scheduling job Schedule6 to run at 2025-08-27 13:28:00
Running job Schedule6
Scheduling job Schedule6 to run at 2025-08-27 13:29:00
Running job Schedule6
Scheduling job Schedule6 to run at 2025-08-27 13:30:00
Running job Schedule6
Scheduling job Schedule6 to run at 2025-08-27 13:31:00
Failed to run job Schedule6: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
#0 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(401): PDO->prepare('SELECT (get_sla...')
#1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(418): ipl\Sql\Connection->prepexec('SELECT (get_sla...', Array)
#2 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/Query.php(710): ipl\Sql\Connection->select(Object(ipl\Sql\Select))
#3 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/ResultSet.php(139): ipl\Orm\Query->yieldResults()
#4 [internal function]: ipl\Orm\ResultSet->yieldTraversable(Object(Generator))
#5 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/ResultSet.php(122): Generator->valid()
#6 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/ResultSet.php(114): ipl\Orm\ResultSet->advance()
#7 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/ProvidedHook/Reporting/SlaReport.php(123): ipl\Orm\ResultSet->rewind()
#8 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/ProvidedHook/Reporting/SlaReport.php(213): Icinga\Module\Icingadb\ProvidedHook\Reporting\SlaReport->fetchReportData(Object(Icinga\Module\Reporting\Timerange), Array)
#9 /usr/share/icingaweb2/modules/reporting/library/Reporting/Report.php(185): Icinga\Module\Icingadb\ProvidedHook\Reporting\SlaReport->getData(Object(Icinga\Module\Reporting\Timerange), Array)
#10 /usr/share/icingaweb2/modules/reporting/library/Reporting/Actions/SendMail.php(65): Icinga\Module\Reporting\Report->toCsv()
#11 /usr/share/icingaweb2/modules/reporting/library/Reporting/Schedule.php(140): Icinga\Module\Reporting\Actions\SendMail->execute(Object(Icinga\Module\Reporting\Report), Array)
#12 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): Icinga\Module\Reporting\Schedule->Icinga\Module\Reporting{closure}()
#13 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/StreamSelectLoop.php(183): React\EventLoop\Tick\FutureTickQueue->tick()
#14 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/Loop.php(55): React\EventLoop\StreamSelectLoop->run()
#15 [internal function]: React\EventLoop\Loop::React\EventLoop{closure}()
#16 {main}

Your Environment

  • Module version: 1.0.5
  • Dependent module versions: icinga-php-library 0.17.0 icinga-php-thirdparty 0.13.1
  • Icinga Web 2 version and modules (System - About): 2.12.5 php-icinga 2.12.5
  • Icinga 2 version used (icinga2 --version): 2.15.0 icingadb 1.4.0 icingadb-web 1.2.2
  • PHP version used (php --version): php 8.2.25
  • Server operating system and version: rhel 8

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions