Bug 375151 - Network Error: connection closed by remote host
Summary: Network Error: connection closed by remote host
Status: RESOLVED WORKSFORME
Alias: None
Product: trojita
Classification: Unmaintained
Component: IMAP (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Trojita default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-16 18:40 UTC by Tao Hansen
Modified: 2017-02-05 14:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
IMAP protocol logs (12.69 KB, text/plain)
2017-01-16 18:40 UTC, Tao Hansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tao Hansen 2017-01-16 18:40:53 UTC
Created attachment 103443 [details]
IMAP protocol logs

Trojita 0.7.1 on Arch Linux accessing outlook.com 

Notified approximately every five minutes of a Network Error with the following error message: `Socket disconnected: The underlying socket is having troubles when processing connection to imap-mail.outlook.com:993: The remote host closed the connection.`

INBOX empties following this error. Highlighting INBOX restores emails until next periodic close.
Comment 1 Thomas Lübking 2017-01-16 21:19:38 UTC
try lower the imap idle timeout to (apparently) "2" in the imap page of the settings dialog.
Comment 2 Jan Kundrát 2017-01-16 21:52:23 UTC
Yeah, this is either the IMAP server imposing a ~150 second timeout for IDLE (the standard requires at least thirty minutes), or some network middlebox along the way breaking the TCP connection -- and that sounds much more likely, given that the server doesn't send a "* BYE".

Are you sure that there's nothing like a crappy wifi router or an overly restrictive NAT box on your connection? If so, then activating the option that Thomas suggested will help Trojita work on despite the network flakiness.
Comment 3 Tao Hansen 2017-01-16 22:45:53 UTC
(In reply to Thomas Lübking from comment #1)
> try lower the imap idle timeout to (apparently) "2" in the imap page of the
> settings dialog.

This seems to have solved this issue. Thank you both!
Comment 4 Tao Hansen 2017-01-16 22:56:15 UTC
I wrote too soon. The issue remains.
Comment 5 Thomas Lübking 2017-01-17 03:08:23 UTC
The 150 seconds looked too compelling :)

Please attach two or three more logs of connection breaks.
Then add "IDLE" to the extension blacklist and also elaborate on mentioned possible network instabilities (though IDLE support on outlook.com seems fairly new and the entire thing far from a real IMAP server - maybe even less one than gmail)
Comment 6 Jan Kundrát 2017-02-05 14:14:27 UTC
The IMAP protocol states that the minimal timeout is 30 minutes. If your server (or some network middlebox) imposes shorter, non-standard timeouts, you can as a workaround use the timeout value as per comment #1. If that still doesn't work as you suggest, please attach a new log and reopen.