I get error "Failed to connect to server ..."

User Help for Mozilla Thunderbird
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

I get error "Failed to connect to server ..."

Post by geohei »

Hi.

TB 52.7.0 (32-bit)

I get error "Failed to connect to server ..." after having successfully downloaded my emails from the Dreamhost (provider) POP3 account.

The fact that I could download the emails shows that the settings are correct.
I have 2 POP accounts at Dreamhost. Both react like that.
I didn't change anything in the TB settings.
Nor did I on the server side.
The TB message started showing up some 6 months ago (after a TB upgrade?).

Any ideas?

Thanks,
Cu, geohei
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: I get error "Failed to connect to server ..."

Post by tanstaafl »

"Failed to connect to server" can occur if it can't make a tcp-ip connection to the POP server. If you have a poor connection that might occur intermittently. Try pinging the mail server from a console window (aka DOS box) the next time this occurs and see if any of the packets were lost.

A temporary workaround might be to add a Gmail IMAP account and configure the optional "mail fetcher" to automatically fetch mail from your two POP accounts and merge them into the Gmail inbox. See https://support.google.com/mail/answer/ ... 49496&rd=1 . Or see http://kb.mozillazine.org/Replace_sever ... ne_account (a more extreme case, you will need to skip some of its steps such as deleting your existing POP accounts)

http://kb.mozillazine.org/Gmail
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

My Internet connection is super fast. It might be that the server response is somewhat slow.

If a slow connection to the server is the reason, then TB timeout values should be changed (can these be changed?).
IMAP works fine on the same server.
Hmmm ... weird!

Your Gmail workaround is not an option for me (thanks for the explanation though).
This problem never occured. I'm using TB for years.
Might be the time to change ...
Last edited by geohei on July 9th, 2018, 7:18 pm, edited 1 time in total.
Cu, geohei
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: I get error "Failed to connect to server ..."

Post by tanstaafl »

If you have no problems using a IMAP account with the same mail server I'd suspect the POP server is overloaded or something similar.
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

POP3 access takes 3-4 seconds.
This is from pushing the Get Messages button till exchange terminated.
All this for 1 small text-only email.
This can't be too long ?!

Besides this, no other email client has issues with Dreamhost mail servers (Apple, iOS, Ubuntu, ...).

Does TB have tweakable timeout values?
Cu, geohei
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

I tripple checked all my TB settings. All good.

"Failed to connect to server ..." is simply not true because I get my emails. Just at the end of the email downloads, this message popos up. Hence TB is in error!

Does TB generate some logs which might possibly help?
Cu, geohei
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: I get error "Failed to connect to server ..."

Post by tanstaafl »

It might be in error, or it might be that the connection is lost after it downloaded the new mail while its trying to do something else.

See http://kb.mozillazine.org/Session_logging_for_mail/news for how to enable POP3 logging. If you get that error message in the log file please post that line plus two dozen lines preceding it (no need for the whole log file). The following is the end of a POP log file showing that after downloading the new mail it sends a QUIT message and then fetches a +OK Farewell response. If the connection times out during those two commands that would be consistent with your symptoms.

2018-07-11 17:40:14.460000 UTC - 12152[1312140]: POP3: [this=156fbb40] RECV: .
2018-07-11 17:40:14.460000 UTC - 12152[1312140]: POP3: [this=156fbb40] RECV: (null)
2018-07-11 17:40:14.460000 UTC - 12152[1312140]: POP3: [this=156fbb40] Entering state: 15
2018-07-11 17:40:14.476000 UTC - 12152[1312140]: POP3 sink: [this=1838ab30] Calling ReleaseFolderLock from EndMailDelivery
2018-07-11 17:40:14.476000 UTC - 12152[1312140]: POP3 sink: [this=1838ab30] ReleaseFolderLock haveSemaphore = TRUE
2018-07-11 17:40:14.476000 UTC - 12152[1312140]: POP3: [this=156fbb40] Entering state: 22
2018-07-11 17:40:14.476000 UTC - 12152[1312140]: POP3: [this=156fbb40] SEND: QUIT

2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Entering NET_ProcessPop3 15
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Entering state: 3
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] RECV: +OK Farewell.
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Entering state: 40
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Entering state: 23
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Entering state: 25
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Clearing server busy in POP3_FREE
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Clearing running protocol in POP3_FREE
2018-07-11 17:40:14.664000 UTC - 12152[1312140]: POP3: [this=156fbb40] Clearing server busy in nsPop3Protocol::OnStopRequest
2018-07-11 17:40:22.538000 UTC - 12152[1312140]: POP3: [this=156fbb40] ~nsPop3Protocol()
2018-07-11 17:40:22.538000 UTC - 12152[1312140]: POP3 sink: [this=1838ab30] Calling ReleaseFolderLock from ~nsPop3Sink
2018-07-11 17:40:22.538000 UTC - 12152[1312140]: POP3 sink: [this=1838ab30] ReleaseFolderLock haveSemaphore = FALSE
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

Hi.

I don't want to post logs when not 100% confident whether sensible information is included.
I sent you a log via PM (Dropbox link).
I don't see any error.

I have 237 messages on the server.
I keep them there.
Might this (somehow) be the reason of the failure message?

Thanks,
Cu, geohei
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: I get error "Failed to connect to server ..."

Post by tanstaafl »

I downloaded the log file and took a look at it. No errors or any sign of a connection problem. The entire transaction took 1 minute 6 seconds so it seems too early for a subsequent "Failed to connect to server ..." to be due to trying to check for new mail after 5 minutes and failing, unless it spent a lot of time downloading messages in the two other accounts when starting up Thunderbird.

I only saw mention of one account in the log file. I assume that is because you unchecked the check for new mail... checkboxes for the two other accounts.
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

1. The "Failed to connect to server ..." error appears 1-2 seconds (the time to download possible new messages) after I pressed "Get messages".

2. I have the "Check for new messages at startup" as well as "Automatically download new messages" unchecked for testing purpose. Hence the download takes place completely manually.

3. It doesn't matter if new messages are on the server or not. Subject failure message appears or doesn't appear. No scheme visible when or when not.

4. I keep the messages on the server (around 240). So, no delete after download.

Does this help?
Cu, geohei
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: I get error "Failed to connect to server ..."

Post by tanstaafl »

"1. The "Failed to connect to server ..." error appears 1-2 seconds (the time to download possible new messages) after I pressed "Get messages"."

It took over a minute to download the 237 messages. Are you sure it didn't fail to connect to the POP server the first time it tried to check for new mail, displayed the error, and then succeeded on the second attempt? I can only speculate as the logging is basically just for the global database and network traffic, and it if fails to make a connection the log file is empty (no record of the attempt).

You might want to try using a IMAP account instead. It can co-exist with the existing POP account and after you've used the IMAP account for a few days decide which one you want to keep. IMAP accounts avoid some problems such as a logjam if Thunderbird tries to download a "bad" message, and you could use a message filter to copy messages to the inbox in Local Folders if you want to download messages.

http://kb.mozillazine.org/IMAP
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

1. The "Failed to connect to server ..." error appears 1-2 seconds (the time to download possible new messages) after I pressed "Get messages".

2. I have the "Check for new messages at startup" as well as "Automatically download new messages" unchecked for testing purpose. Hence the download takes place completely manually.

3. It doesn't matter if new messages are on the server or not. Subject failure message appears or doesn't appear. No scheme visible when or when not.

4. I keep the messages on the server (around 240). So, no delete after download.

Does this help?
Cu, geohei
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

Regarding your suggestion for IMAP. I do have IMAP since a long time in parallel on this account. However there are reasons for POP. I would like to stick to POP, and Thunderbird should be able to deal properly with it (like other email clients do).

Your log didn't reveal any issues.

What can I do next to get POP 3 working without any error messages?

Thanks,
Last edited by geohei on July 19th, 2018, 11:03 pm, edited 1 time in total.
Cu, geohei
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: I get error "Failed to connect to server ..."

Post by tanstaafl »

I don't know. I can't find a related bug report.

You could add a POP account with a major free email provider such as outlook or gmail and see if it has the same problem. But if it doesn't have the same problem that is not going to provide any useful information. You could install an older version of Thunderbird in a different directory using custom setup and see if it has the same problem. If that works around the problem then I'd suggest submitting a bug report at https://bugzilla.mozilla.org along with a POP log file for both versions. The bug report supports adding files as attachments. If you do that please post a link to the bug report.

http://kb.mozillazine.org/Go_back_to_an ... hunderbird
geohei
Posts: 252
Joined: March 6th, 2005, 2:59 pm

Re: I get error "Failed to connect to server ..."

Post by geohei »

I'll check this with the older TB version at a later stage when all the rest fails. Thanks.

I tried to get POP access to my gmail account. This worked, but only after I disabled the gmail "Access for less secure apps has been turned off". So Google thinks that TB is not secure enough ?!?!

Anyways ... after "Access for less secure apps has been turned off", the POP access worked at the end, and the subject message did NOT show up.

Presently, I check with my provider Dreamhost if they changed siomething at their end.
Cu, geohei
Post Reply