Auto fetch mail failed

Moderator: crythias

Post Reply
alextem
Znuny newbie
Posts: 2
Joined: 11 Nov 2016, 03:13
Znuny Version: 5.0.11
Real Name: Alexander

Auto fetch mail failed

Post by alextem »

Hello,

I have a problem about auto fetch mail ticket. I must fetch the tickets manually.
My otrs system has run about 1 year without problem and regulary updating the patch (5.0.11 now, not the newest).
After i run the ./otrs.Console.pl Maint::Daemon::Summary command, this is what i got :

Code: Select all

Gathering all daemons summary...

  Tasks to be executed in future:
    There are currently no tasks to be executed in future

  Recurrent cron tasks:
     NAME                                     LAST EXECUTION       LAST STATUS  LAST DURATION      NEXT EXECUTION
     CoreCacheCleanup                         2016-11-06 00:20:00  Success      26.0 Second(s)     2016-11-13 00:20:00
     GenerateDashboardStats                   2016-11-11 07:05:00  Success      < 1 Second         2016-11-11 08:05:00
     LoaderCacheDelete                        2016-11-06 00:30:00  Success      < 1 Second         2016-11-13 00:30:00
     MailAccountFetch                         2016-11-07 20:30:00  Fail         12.0 Second(s)     2016-11-11 08:00:00
     OTRSBusinessAvailabilityCheck            2016-11-11 07:35:00  Success      < 1 Second         2016-11-11 07:55:00
     OTRSBusinessEntitlementCheck             2016-11-11 07:45:00  Success      < 1 Second         2016-11-11 08:25:00
     RegistrationUpdateSend                   2016-11-11 07:30:00  Success      < 1 Second         2016-11-11 08:30:00
     SessionDeleteExpired                     2016-11-11 06:55:00  Success      < 1 Second         2016-11-11 08:55:00
     SpoolMailsReprocess                      2016-11-11 00:10:00  Success      < 1 Second         2016-11-12 00:10:00
     SupportDataCollectAsynchronous           2016-11-11 07:01:00  Success      < 1 Second         2016-11-11 08:01:00
     TicketAcceleratorRebuild                 2016-11-11 01:01:00  Success      < 1 Second         2016-11-12 01:01:00
     TicketPendingCheck                       2016-11-11 06:45:00  Success      1.0 Second(s)      2016-11-11 08:45:00
     TicketUnlockTimeout                      2016-11-11 07:35:00  Success      < 1 Second         2016-11-11 08:35:00
     EscalationCheck                          2016-11-11 07:50:00  Success      1.0 Second(s)      2016-11-11 07:55:00

  Recurrent generic agent tasks:
     NAME                                     LAST EXECUTION       LAST STATUS  LAST DURATION      NEXT EXECUTION
     Delete JUNK Tickets                      2016-11-05 00:00:00  Success      < 1 Second         2016-11-12 00:00:00

  Unhandled Worker Tasks:
    There are currently no tasks waiting to be executed

  Handled Worker Tasks:
     NAME                                     TYPE                 NID  PID       DURATION
     MailAccountFetch                         Cron                 001  00062865  3.5 Day(s)
The mail account fetch is failed. Before this happening, i didn't do any change.

This is the error messages i got before the autofetch failed :

Code: Select all

Nov  7 20:20:23 its OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-42[62773]: [Error][Kernel::System::MailAccount::IMAP::_Fetch][Line:142]: IMAPS: Auth for user thisis@thewrongpasswordemail.com/ma
il.wrong.password.com failed!

Nov  7 20:20:24 its OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-42[62773]: [Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][Line:51]: There was an error exe
cuting Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch: ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-42 Perl: 5.16.3 OS: linux Time: Mon Nov  7
 20:20:23 2016#012#012 Message: IMAPS: Auth for user thisis@thewrongpasswordemail.com/ma
il.wrong.password.com failed!#012#012 Traceback (62773): #012   Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 14
2#012   Module: Kernel::System::MailAccount::IMAP::Fetch Line: 86#012   Module: Kernel::System::MailAccount::MailAccountFetch Line: 440#012   Module: Kernel::System::Console::Command::Maint::PostMa
ster::MailAccountFetch::Run Line: 94#012   Module: (eval) Line: 444#012   Module: Kernel::System::Console::BaseCommand::Execute Line: 438#012   Module: (eval) Line: 147#012   Module: Kernel::System
::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 131#012   Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 259#012   Module: (eval) Line: 316#012   Module
: main::Start Line: 316#012   Module: ./otrs.Daemon.pl Line: 138
The user of the thisis@thewrongpasswordemail.com never told me that he changed the password from october. I don't know if this is one of the auto fecth problem root cause. Because from october - 7 nov, the otrs system still running without a problem.
I restarted the otrs daemons, restarted the cron job. The problem still there. The mail password is corrected though.

How to fix this auto fetch problem?
Thank you.
klausneil
Znuny superhero
Posts: 682
Joined: 29 May 2012, 22:47
Znuny Version: 6.0.24
Real Name: Klaus Salazar
Location: Perú

Re: Auto fetch mail failed

Post by klausneil »

Hi, you can tel me what's you mail server? you can try change the protocol to pop3 and try login? if this not work you try a telnet example telnet ip.server.mail 110 and put your username and password, tell me if this work.
alextem
Znuny newbie
Posts: 2
Joined: 11 Nov 2016, 03:13
Znuny Version: 5.0.11
Real Name: Alexander

Re: Auto fetch mail failed

Post by alextem »

klausneil wrote:Hi, you can tel me what's you mail server? you can try change the protocol to pop3 and try login? if this not work you try a telnet example telnet ip.server.mail 110 and put your username and password, tell me if this work.
oh i forgot to mention that before. my mail server is zimbra 8 and otrs connect using IMAPS.
manually fetch is working perfectly. Just the autofetch not working at all because the MailAutoFetch cron task is failed.
i'm still digging the logs to find whats wrong...
Wes
Znuny newbie
Posts: 3
Joined: 21 Mar 2012, 16:54
Znuny Version: 30011
Real Name: Wesley C Smith
Company: Reaching Across Illinois Library System

Re: Auto fetch mail failed

Post by Wes »

Having this same problem, I recently generated a new self signed cert for the Zimbra server and since about that time POP3TLS just stopped working through Cron. It works just fine on manual fetch. Did you ever find a solution to this?
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Auto fetch mail failed

Post by root »

If you get an Handled Worker Tasks like MailAccountFetch running for a long time this is by an not terminated daemon process. You can check this by stopping the daemon and execute

Code: Select all

ps -u otrs
Is there a process id (PID) of an otrs.Daemon.pl you can kill the process, maybe with -9.

Execute the summary again and the Handled Worker Tasks should be gone. Your daemon logs could provide more details.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
sujeeva
Znuny newbie
Posts: 46
Joined: 23 Jul 2012, 13:17
Znuny Version: 5.0.8
Real Name: Sujeeva Tissaarachchi
Company: SEwBP International
Location: Australia
Contact:

Re: Auto fetch mail failed

Post by sujeeva »

root wrote:If you get an Handled Worker Tasks like MailAccountFetch running for a long time this is by an not terminated daemon process. You can check this by stopping the daemon and execute

Code: Select all

ps -u otrs
Is there a process id (PID) of an otrs.Daemon.pl you can kill the process, maybe with -9.

Execute the summary again and the Handled Worker Tasks should be gone. Your daemon logs could provide more details.
My problem solved. The issue was one email contained hundreds of incoming emails making the MailAccountFetch job taking too long. I have disabled the problematic email account and now job runs properly in every 3 minutes
Best Regards,
Sujeeva Tissaarachchi
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Auto fetch mail failed

Post by root »

sujeeva wrote:The issue was one email contained hundreds of incoming emails making the MailAccountFetch job taking too long. I have disabled the problematic email account and now job runs properly in every 3 minutes
The issue was definitely not the amount of e-mails in the account, it belongs to network interruption during fetching them.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply