I’m getting problem after CWP mail server migration from existing cPanel server. It’s showing “Connection to storage server failed” message. Please check and fix!
That was a recent customer request in our Help-desk for Server Migration Services.
Server migrations often create critical errors with websites, emails, etc. Roundcube errors typically happen due to bad file permissions, service failures, etc. And, to fix them quickly, we need to know the exact reason for the error.
Today, we’ll discuss the major causes for “Roundcube connection to storage server failed” error and how our Migration Engineers fix them.
How does the Roundcube error look?
RoundCube is a webmail application that allows quick access to mails.
Let’s get a brief idea of the scenario of the error. Here, the customer migrated his cPanel account to CentOS Web Panel. Although the migration was successful, the customer could not log in to Webmail. Accessing RoundCube webmail from the new server resulted in the error “Connection to storage server failed“.
Again, the same error can happen while trying to access the new email accounts as well.
What causes “Connection to the storage server failed” error?
By default, RoundCube comes with a default configuration file. However, to make it work, we normally tweak the config file available at config/config.inc.php in the installation folder.
Now, let’s check on what exactly causes the “Connection to storage server failed” error in RoundCube.
1. Dovecot not running
Many times, the “Connection to storage server failed” error happens when Dovecot service is not running on the server. This can be due to service failure or even Dovecot config file corruption.
2. Missing MySQL extensions
Similarly, RoundCube errors often pop up after migration due to MySQL version changes. Or, it can be a result of missing modules too. This can stop the Dovecot installation from working. Dovecot requires the dovecot-MySQL package to run MySQL authentication.
3. File permissions
Yet another common reason for “Connection to storage server failed” is the wrong permissions of the mail folders. For mail to work, the mail server should be able to read and write to the files. When these folders have wrong permissions, this does not happen.
4. Configuration mismatch
Similarly, migration causes a change in the server environment. Recently, when a customer reported problems with RoundCube after migration, the error happened as IMAP and IMAPS were disabled on the new server.
How we fixed Roundcube
Now, it’s time to see how our Migration Engineers fixed RoundCube for the customer.
1. Verifying Dovecot status
We started the investigation by checking the status of Dovecot on the server. For this, we ran the command :
ps auxw|grep "dovecot"
The output showed that Dovecot was running fine on the server.
root 7245 0.1 0.1 2308 1096 pts/0 S+ 19:53 0:00 dovecot
dovecot 7246 0.0 0.0 2084 824 pts/0 S+ 19:53 0:00 dovecot/anvil
root 7247 0.0 0.0 2044 908 pts/0 S+ 19:53 0:00 dovecot/log
root 7250 0.0 0.3 4988 3740 pts/0 S+ 19:53 0:00 dovecot/config
root 7251 0.0 0.2 10024 2672 pts/0 S+ 19:53 0:00 dovecot/auth
vmail 7255 0.0 0.1 3228 1596 pts/0 S+ 19:54 0:00 dovecot/pop3
dovenull 7260 0.0 0.1 4028 1940 pts/0 S+ 19:54 0:00 dovecot/imap-login
dovenull 7262 0.0 0.1 4016 1916 pts/0 S+ 19:54 0:00 dovecot/pop3-login
In cases where Dovecot is not running, we restart it using the command:
/etc/init.d/dovecot restart
Again, when the Devcot config files are corrupted, we fix by recreating the new config file. After that, the login to RoundCube will start working again.
2. Confirming dependencies
Further, we confirmed that the server has the dovecot-mysql package. Therefore, we concluded that the problem was something else.
When it is found missing, we install it. For example, in Ubuntu server, we use the following commands:
sudo apt-get install dovecot-mysql
sudo service dovecot restart
Additionally, we verified that the RoundCube configuration has IMAP and IMAPS enabled.
3. Log analysis
Then, to get a clue on the error, our Migration Engineers checked the log files at /var/log/dovecot.log and /var/log/mail.log. We looked for warnings and errors and found the entries that showed permission problems.
Jan 27 16:53:54 h2004156 dovecot: imap-login: Login: user=<abc@domain.com>, method=PLAIN, rip=89.xx.xx.57, lip=85.xx.xx.164, mpid=14496, TLS
Jan 27 16:53:54 h2004156 dovecot: imap(test@domain.com): Error: chdir(/var/vmail/user/abc/) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +x perm: /var/vmail, dir owned by 150:8 mode=0770)
The permissions set for the mail folder of the domain was wrong. Therefore, to correct the permissions, we executed:
chown -R vmail:mail /var/vmail
That fixed the Roundcube connection to storage server failed error.
[Having errors after migrating your account? Our Migration Specialists can help you to move websites seamlessly.]
Conclusion
To be precise, RoundCubee connection to storage server failed error happens due to wrong mail folder permissions, missing MySQL modules, etc. Today, we saw the various reasons for this migration error and how our Migration Engineers fixed it for one of our customers.
0 Comments