Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not log auth issues in background jobs as error #6511

Merged
merged 1 commit into from
May 20, 2022

Conversation

ChristophWurst
Copy link
Member

The admin can't do anything about them. A warning is sufficient.

Prevents

{
  "reqId": "9PVIFEfiGqcjCOP87p8S",
  "level": 3,
  "time": "2022-05-20T06:00:51+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "mail",
  "method": "",
  "url": "--",
  "message": "Cron mail sync failed for account 22",
  "userAgent": "--",
  "version": "24.0.1.1",
  "exception": {
    "Exception": "OCA\\Mail\\Exception\\ServiceException",
    "Message": "IMAP error synchronizing account 22: Authentication failed.",
    "Code": 102,
    "Trace": [
      {
        "file": "/var/www/html/apps/mail/lib/BackgroundJob/SyncJob.php",
        "line": 119,
        "function": "sync",
        "class": "OCA\\Mail\\IMAP\\MailboxSync",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
        "line": 79,
        "function": "run",
        "class": "OCA\\Mail\\BackgroundJob\\SyncJob",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
        "line": 95,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/var/www/html/cron.php",
        "line": 151,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      }
    ],
    "File": "/var/www/html/apps/mail/lib/IMAP/MailboxSync.php",
    "Line": 108,
    "Previous": {
      "Exception": "Horde_Imap_Client_Exception",
      "Message": "Authentication failed.",
      "Code": 102,
      "Trace": [
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 4565,
          "function": "_responseCode",
          "class": "Horde_Imap_Client_Socket",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 4313,
          "function": "_getLine",
          "class": "Horde_Imap_Client_Socket",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 4241,
          "function": "_sendCmdChunk",
          "class": "Horde_Imap_Client_Socket",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 849,
          "function": "_sendCmd",
          "class": "Horde_Imap_Client_Socket",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
          "line": 512,
          "function": "_tryLogin",
          "class": "Horde_Imap_Client_Socket",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php",
          "line": 838,
          "function": "_login",
          "class": "Horde_Imap_Client_Socket",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php",
          "line": 1389,
          "function": "login",
          "class": "Horde_Imap_Client_Base",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/mail/lib/IMAP/FolderMapper.php",
          "line": 60,
          "function": "listMailboxes",
          "class": "Horde_Imap_Client_Base",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/lib/IMAP/MailboxSync.php",
          "line": 105,
          "function": "getFolders",
          "class": "OCA\\Mail\\IMAP\\FolderMapper",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/lib/BackgroundJob/SyncJob.php",
          "line": 119,
          "function": "sync",
          "class": "OCA\\Mail\\IMAP\\MailboxSync",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
          "line": 79,
          "function": "run",
          "class": "OCA\\Mail\\BackgroundJob\\SyncJob",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
          "line": 95,
          "function": "execute",
          "class": "OCP\\BackgroundJob\\Job",
          "type": "->"
        },
        {
          "file": "/var/www/html/cron.php",
          "line": 151,
          "function": "execute",
          "class": "OCP\\BackgroundJob\\TimedJob",
          "type": "->"
        }
      ],
      "File": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
      "Line": 5029
    },
    "CustomMessage": "Cron mail sync failed for account 22"
  },
  "id": "62873c35db6f8"
}

and

{
  "reqId": "9PVIFEfiGqcjCOP87p8S",
  "level": 3,
  "time": "2022-05-20T06:00:28+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "mail",
  "method": "",
  "url": "--",
  "message": "Cron mail sync failed for account 20",
  "userAgent": "--",
  "version": "24.0.1.1",
  "exception": {
    "Exception": "OCA\\Mail\\Exception\\ServiceException",
    "Message": "IMAP error synchronizing account 20: Mail server denied authentication.",
    "Code": 102,
    "Trace": [
      {
        "file": "/var/www/html/apps/mail/lib/BackgroundJob/SyncJob.php",
        "line": 119,
        "function": "sync",
        "class": "OCA\\Mail\\IMAP\\MailboxSync",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
        "line": 79,
        "function": "run",
        "class": "OCA\\Mail\\BackgroundJob\\SyncJob",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
        "line": 95,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/var/www/html/cron.php",
        "line": 151,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\TimedJob",
        "type": "->"
      }
    ],
    "File": "/var/www/html/apps/mail/lib/IMAP/MailboxSync.php",
    "Line": 108,
    "Previous": {
      "Exception": "Horde_Imap_Client_Exception",
      "Message": "Mail server denied authentication.",
      "Code": 102,
      "Trace": [
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php",
          "line": 838,
          "function": "_login",
          "class": "Horde_Imap_Client_Socket",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php",
          "line": 1389,
          "function": "login",
          "class": "Horde_Imap_Client_Base",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/mail/lib/IMAP/FolderMapper.php",
          "line": 60,
          "function": "listMailboxes",
          "class": "Horde_Imap_Client_Base",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/lib/IMAP/MailboxSync.php",
          "line": 105,
          "function": "getFolders",
          "class": "OCA\\Mail\\IMAP\\FolderMapper",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/mail/lib/BackgroundJob/SyncJob.php",
          "line": 119,
          "function": "sync",
          "class": "OCA\\Mail\\IMAP\\MailboxSync",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
          "line": 79,
          "function": "run",
          "class": "OCA\\Mail\\BackgroundJob\\SyncJob",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
          "line": 95,
          "function": "execute",
          "class": "OCP\\BackgroundJob\\Job",
          "type": "->"
        },
        {
          "file": "/var/www/html/cron.php",
          "line": 151,
          "function": "execute",
          "class": "OCP\\BackgroundJob\\TimedJob",
          "type": "->"
        }
      ],
      "File": "/var/www/html/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
      "Line": 572
    },
    "CustomMessage": "Cron mail sync failed for account 20"
  },
  "id": "62873ca7e7033"
}

The admin can't do anything about them. A warning is sufficient.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Member Author

/backport to stable1.13

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@ChristophWurst ChristophWurst merged commit 51a9b5b into main May 20, 2022
@ChristophWurst ChristophWurst deleted the fix/no-auth-error-logs-background-job branch May 20, 2022 07:56
@backportbot-nextcloud
Copy link

The backport to stable1.13 failed. Please do this backport manually.

@ChristophWurst
Copy link
Member Author

/backport to stable1.13

@backportbot-nextcloud
Copy link

The backport to stable1.13 failed. Please do this backport manually.

@ChristophWurst
Copy link
Member Author

I'm too weak.

Nevermind then.

@nickvergessen
Copy link
Member

/backport to stable1.12

@nickvergessen
Copy link
Member

there is no 1.13 branch yet, typo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants