Do not give up on external POP3 account after connection failure

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
User avatar
opsystem
Posts: 33
Joined: Mon Nov 20, 2017 6:32 pm

Do not give up on external POP3 account after connection failure

Post by opsystem »

Hi all!

As title says, I added an external POP3 source to an account on my 8.7 CE installation. Everything runs fine, until the POP3 server sometimes goes offline and stays unreachable for some hours. We can do nothing about that.

Problem is that Zimbra stops trying to connect to the external source after a couple of failed attempts, like this:

Code: Select all

WARN  [ScheduledTask-6] [name=external.account@external.domain;mid=10;ds= external.account@external.domain;] datasource - Scheduled DataSource import failed.
com.zimbra.common.service.ServiceException: system failure: Unable to connect to POP3 server: LdapDataSource{id=d821c15a-f882-4e86-96cb-ec6c8a996419, type=pop3, enabled=true, name= external.account@external.domain, host=external.pop.server, port=110, connectionType=cleartext, username=externausername, folderId=2, smtpEnabled=false, smtpHost=null, smtpPort=-1}
ExceptionId:ScheduledTask-6:1539938484351:55781522b09e0731
Code:service.FAILURE
	at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:286)
	at com.zimbra.cs.datasource.Pop3Sync.connect(Pop3Sync.java:160)
	at com.zimbra.cs.datasource.Pop3Sync.importData(Pop3Sync.java:128)
	at com.zimbra.cs.datasource.DataSourceManager.importData(DataSourceManager.java:379)
	at com.zimbra.cs.datasource.DataSourceManager.importData(DataSourceManager.java:335)
	at com.zimbra.cs.datasource.DataSourceTask.call(DataSourceTask.java:83)
	at com.zimbra.cs.datasource.DataSourceTask.call(DataSourceTask.java:31)
	at com.zimbra.common.util.TaskScheduler$TaskRunner.call(TaskScheduler.java:79)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
	at java.net.SocketInputStream.read(SocketInputStream.java:171)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
	at sun.security.ssl.InputRecord.read(InputRecord.java:503)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
	at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
	at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
	at sun.security.ssl.AppInputStream.read(AppInputStream.java:71)
	at com.zimbra.cs.mailclient.MailInputStream.read(MailInputStream.java:116)
	at com.zimbra.cs.mailclient.MailInputStream.readLine(MailInputStream.java:93)
	at com.zimbra.cs.mailclient.pop3.Pop3Response.readResponse(Pop3Response.java:53)
	at com.zimbra.cs.mailclient.pop3.Pop3Response.read(Pop3Response.java:44)
	at com.zimbra.cs.mailclient.pop3.Pop3Connection.sendCommand(Pop3Connection.java:301)
	at com.zimbra.cs.mailclient.pop3.Pop3Connection.sendCommandCheckStatus(Pop3Connection.java:317)
	at com.zimbra.cs.mailclient.pop3.Pop3Connection.sendLogin(Pop3Connection.java:109)
	at com.zimbra.cs.mailclient.MailConnection.login(MailConnection.java:205)
	at com.zimbra.cs.mailclient.pop3.Pop3Connection.login(Pop3Connection.java:89)
	at com.zimbra.cs.datasource.Pop3Sync.connect(Pop3Sync.java:154)
	... 12 more
If I login into Zimbra account I get a message saying that messages could not be retrieved “since [failure date]” and the affected account would not be updated until the problem is corrected. Re-entering username and password gives connection test successful but Zimbra will not re-start downloading messages. I have to manually perform a zmmailboxdctl restart to get things working again.

Please I need some advice to change this behavior and keep the task runner trying to connect to POP3 source without manual intervention. Is this behavior by design?

Thanks
Gabriele
User avatar
opsystem
Posts: 33
Joined: Mon Nov 20, 2017 6:32 pm

Re: Do not give up on external POP3 account after connection failure

Post by opsystem »

*bump*
anyone?
:?
User avatar
DualBoot
Elite member
Elite member
Posts: 1326
Joined: Mon Apr 18, 2016 8:18 pm
Location: France - Earth
ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers
Contact:

Re: Do not give up on external POP3 account after connection failure

Post by DualBoot »

Hello,

it seems it is a network problem between or the account you tried to pop has no POP capability.
See the message in the log : aused by: java.net.SocketTimeoutException: Read timed out

Regards,
User avatar
opsystem
Posts: 33
Joined: Mon Nov 20, 2017 6:32 pm

Re: Do not give up on external POP3 account after connection failure

Post by opsystem »

DualBoot wrote:Hello,

it seems it is a network problem between or the account you tried to pop has no POP capability.
See the message in the log : aused by: java.net.SocketTimeoutException: Read timed out

Regards,
Yes, the read timeout accurs because the POP server is unreachable.
What I want here is that the download routine doesn't stop attempting the connection so fast.
Post Reply