Failed to open socket #0.

Get help from the community here.

Moderator: Developers

Posts: 1
Joined: Mon Jun 05, 2017 9:15 pm

Failed to open socket #0.

Postby bertii » Mon Jun 05, 2017 9:26 pm

Hi everyone,

I'm getting problems using GO when trying to connect to GSuite's IMAP services. This came about after an upgrade of the OS from Ubuntu 14.04 to 16.04.

Whenever I try to establish a connection to on SSL, I get the error message:
"Failed to open socket #0."

I happen to have a second account I use for testing which doesn't use Gmail, and (rather scarily) doesn't force SSL. This works fine, doesn't error, and I can view and process email as normal.

Because Gmail force SSL for all of their mail connections, I obviously cannot disable SSL for my actual email account. At first I thought it might be the IMAP settings with PHP, but these show the following in phpinfo:

Code: Select all

[b]PHP Version[/b]
IMAP c-Client Version 	2007f
SSL Support 	enabled
Kerberos Support 	enabled 
So that all looks good to me.

Next I thought, perhaps there's some verification issues or the ports are blocked on my firewall. So I borrowed an example PHP IMAP file from ... ext-failed. That was able to connect to my gmail account without any problems, using SSL and using either cert verification or no cert verification. So that rules out completely my PHP, Apache, firewall, and Gmail. The problem seems to be with GO.

I noticed that there's a key.txt file written to the root of the /home/groupoffice directory, this does get created and populates with a short key.

There's no other errors with GO debug logging enabled:

Code: Select all

Firing listener: email::check_mail
imap::connect(, 993, office@??????????.com, ***, 1, 0)
Failed to open socket #0.
What am I missing? What else can I check?

Many thanks,

Who is online

Users browsing this forum: No registered users and 7 guests