Roundcube SOAP Error: Could not connect to host
This article details how to fix the Roundcube SOAP error: “could not connect to host” when integrating with ISPConfig.
Environment: Debian 8 Jessie, ISPConfig3 with Apache. Roundcube plugin installed as per the tutorial featured here on HowToForge.
This error in particular is down to the ISPConfig plugin config file
/opt/roundcube/plugins/ispconfig3_account/config/config.inc.php which in its default state looks something like this:
$rcmail_config[‘identity_limit’] = false;
$rcmail_config[‘remote_soap_user’] = ’roundcube’;
$rcmail_config[‘remote_soap_pass’] = ’roundcube’;
$rcmail_config[‘soap_url’] = ‘http://myserver.example.com:8080/remote/’;
Everything comes down to the last line in this config file – the soap_url parameter; all the steps below need to be carried out for successful
- The SOAP url must start with https not http:
$rcmail_config['soap_url'] = 'https://myserver.example.com:8080/remote/';
- The local machine must be able to resolve the soap_url address hostname:
root@jessie:~# ping myserver.example.com PING myserver.example.com (192.168.20.50) 56(84) bytes of data.
- The hostname must match the hostname of the SSL certificate of the ISPConfig interface:
- check the hostname of the ISPConfig SSL certificate: openssl x509 -in /usr/local/share/ca-certificates/ispserver.crt -text -noout | grep Subject:
- You should see something like this: Subject: C=GB, ST=Greater London, L=London, O=Empirion, OU=IT, CN=myserver.example.com/emailAddressfirstname.lastname@example.org
- The server’s fully qualified domain name in the “CN” field must match the soap_url in the config line.
If you are still seeing the error despite having followed all the steps, it may be that the ISPConfig certificate is not available to the roundcube plugin. Check out the footnotes at the bootom of this article for details on how to update the certificate share with the ISPConfig certificate and configure Apache’s php.ini.
This should now be working, please leave a comment if you observe different results and we can troubleshoot!