Articles in this section

Roundcube inaccessible when LiteSpeed is running: Connection to storage server failed

Plesk Obsidian for Linux ext: litespeed roundcube

Symptoms

  • The following error shows when trying to access a mail account in Roundcube:

PLESK_INFO: Connection to storage server failed.

  • The dovecot service is running.
  • There are no errors in the /var/log/plesk-roundcube/errors file.
  • There are no related errors in the /var/log/maillog file.
  • The /usr/share/psa-roundcube/config/config.inc.php file is the default one.
  • Errors like below are reported to /var/log/httpd/error_log file:
...
[NOTICE] [1872] [T0] [203.0.113.2:61471-H3:BB57493EA70916C9-8#APVH_webmail.example.com:443] [STDERR] PHP Warning:  stream_socket_client(): php_network_getaddresses: getaddrinfo for localhost failed: No address associated with hostname in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_imap_generic.php on line 1059\n 
[NOTICE] [1872] [T0] [203.0.113.2:61471-H3:BB57493EA70916C9-8#APVH_webmail.example.com:443] [STDERR] PHP Warning:  stream_socket_client(): Unable to connect to ssl://localhost:993 (php_network_getaddresses: getaddrinfo for localhost failed: No address associated with hostname) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_imap_generic.php on line 1059\n 
[NOTICE] [1872] [T0] [203.0.113.2:61471-H3:BB57493EA70916C9-8#APVH_webmail.example.com:443] [STDERR] PHP Warning:  file_put_contents(/var/log/plesk-roundcube//errors): Failed to open stream: No such file or directory in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1380\n 
[NOTICE] [1872] [T0] [203.0.113.2:61471-H3:BB57493EA70916C9-8#APVH_webmail.example.com:443] [STDERR] PHP Warning:  Login failed for john_doe@example.com against localhost from 203.0.113.2. Could not connect to ssl://localhost:993: php_network_getaddresses: getaddrinfo for localhost failed: No address associated with hostname in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1503\n
...
  • LiteSpeed is used as web-server.

Cause

Unclear issue on LiteSpeed PHP side.

Resolution

Contact LiteSpeed support for further investigation of the issue.

Workaround 1 - Switch from LiteSpeed to Apache:
  1. Log into Plesk

  2. Go to Extensions > LiteSpeed Extension > Open > Switch to Apache

Workaround 2 - Reconfigure Roundcube to connect via 127.0.0.1 IP address:
  1. Connect to the server via SSH

  2. Create /usr/share/psa-roundcube/config/config.local.php file:

    # touch /usr/share/psa-roundcube/config/config.local.php

  3. Set the correct permissions/ownership for the file:

    # chown root:roundcube_sysgroup /usr/share/psa-roundcube/config/config.local.php

    # chmod 640 /usr/share/psa-roundcube/config/config.local.php

  4. Add the following content into /usr/share/psa-roundcube/config/config.local.php file:

    <?php
    $config['db_dsnw'] = 'mysql://roundcube:password@127.0.0.1/roundcubemail';
    $config['imap_host'] = 'ssl://127.0.0.1:993';
    $config['smtp_host'] = 'ssl://127.0.0.1:465';
    

    Note: the password for db_dsnw should be copied from /usr/share/psa-roundcube/config/config.inc.php

  5. Using vi (or other editor), open /usr/share/psa-roundcube/config/config.inc.php and comment out db_dsnw variable.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.