Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28443 Action logging improvements META
  3. MDL-26824

SMTP connection error causes "Error: Could not insert a new entry to the Moodle log"

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      To reproduce....

      1. in Server > Mail, set the server to something invalid (to force a connection error)
      2. in a course, ensure some users are enrolled, create a forum and force subscribe users
      3. Do a test posting and check "Mail now"
      4. On the command line run 'php /path/to/moodle/admin/cli/cron.php'

      Result is...

      ERROR: SMTP Error: Could not connect to SMTP host.
      ++ Error: Could not insert a new entry to the Moodle log ++

      • line 1695 of /lib/datalib.php: call to debugging()
      • line 4741 of /lib/moodlelib.php: call to add_to_log()
      • line 63 of /message/output/email/message_output_email.php: call to email_to_user()
      • line 152 of /lib/messagelib.php: call to message_output_email->send_message()
      • line 644 of /mod/forum/lib.php: call to message_send()
      • line 87 of /lib/cronlib.php: call to forum_cron()
      • line 61 of /admin/cli/cron.php: call to cron_run()
        ++ Error calling message processor email ++
      • line 153 of /lib/messagelib.php: call to debugging()
      • line 644 of /mod/forum/lib.php: call to message_send()
      • line 87 of /lib/cronlib.php: call to forum_cron()
      • line 61 of /admin/cli/cron.php: call to cron_run()

      An intermittent failure to access an SMTP server is fairly common so we have already seen this logging error a few times.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                howardsmiller Howard Miller
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: