Page 1 of 2

Fresh Install Vesta cant connect to roundcube

Posted: Thu Jun 21, 2018 8:16 am
by KingRichard
Hi there,

Recently testing installing vesta fresh install on ubuntu 16.04 in which usually have no problem. However since yesterday all my fresh install fail to allow my new domain login to roundcube with the same error Connection to storage server failed.

https://ibb.co/eGEN5T

Unsure how to fixed this.

Current install Ubuntu 16.04 on DigitalOcean
VestaCP 0.9.8-21 with NGINX + PHP-FPM + Dovecot + Exim + Spam Assassin + Remi + named + iptables + fail2ban + quota

Nothing being done accept for its main domain with SSL on running script https://git.scit.ch/rs/VestaCP-SystemSSL

TIA

Dovecot errorlog:
Jun 21 14:29:15 master: Info: Dovecot v2.2.22 (fe789d2) starting up for imap, pop3 (core dumps disabled)
Jun 21 14:29:15 ssl-params: Info: Generating SSL parameters
Jun 21 14:29:26 ssl-params: Info: SSL parameters regeneration completed
Jun 21 14:40:53 imap-login: Info: Login: user=<>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=18869, secured, session=<l3f8CCJvjt1/AAAB>
Jun 21 14:40:53 imap(): Error: User initialization failed: namespace configuration error: Duplicate namespace prefix: ""
Jun 21 14:40:53 imap: Error: Invalid user settings. Refer to server log for more information.

Roundcube error:
[21-Jun-2018 08:05:08 +0000]: <vf7utk1v> PHP Error: Failed to load config from /var/lib/roundcube/plugins/jqueryui/config.inc.php in /usr/share/roundcube/program/lib/Roundcube/rcube_plugin.php on line 157 (POST /webmail/?_task=login?_task=login&_action=login)
[21-Jun-2018 08:05:08 +0000]: <vf7utk1v> IMAP Error: Login failed for from . AUTHENTICATE PLAIN: * BYE Internal error occurred. Refer to server log for more information. in /usr/share/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /webmail/?_task=login?_task=login&_action=login)

Re: Fresh Install Vesta cant connect to roundcube

Posted: Fri Jun 22, 2018 5:53 pm
by danielz
Do you have this file:
PHP Error: Failed to load config from /var/lib/roundcube/plugins/jqueryui/config.inc.php
??

Re: Fresh Install Vesta cant connect to roundcube

Posted: Sat Jun 23, 2018 1:53 pm
by napcok
I have exactly the same error on Ubuntu 16.04 + current VestaCP (0.9.8-21) fresh install.

Re: Fresh Install Vesta cant connect to roundcube

Posted: Sat Jun 23, 2018 5:55 pm
by napcok
Fresh install CentOS7 + Vestacp 0.9.8-21

Code: Select all

cat /var/log/roundcubemail/errors.log 
[23-Jun-2018 17:48:39 +0000]: <3bf26pr9> IMAP Error: Login failed for [email protected] from 77.254.23.178(X-Forwarded-For: 77.254.23.178). AUTHENTICATE PLAIN: * BYE Internal error occurred. Refer to server log for more information. in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 196 (POST /webmail/?_task=login&_action=login)
Dovecot logs:

Code: Select all

tail /var/log/dovecot.log 
Jun 23 19:40:56 master: Info: Dovecot v2.2.10 starting up for imap, pop3 (core dumps disabled)
Jun 23 19:48:39 imap-login: Info: Login: user=<>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19074, secured, session=<c8sowlJvpAB/AAAB>
Jun 23 19:48:39 imap(): Error: user [email protected]: Initialization failed: namespace configuration error: inbox=yes namespace missing
Jun 23 19:48:39 imap(): Error: Invalid user settings. Refer to server log for more information.
Update:
On CentOS....
I'm able to fix that by adding inbox = yes
to /etc/dovecot/conf.d/15-mailboxes.conf
Forum post with fix -> viewtopic.php?t=13395 from December 2016

Why this is still not fixed in installer ?

Re: Fresh Install Vesta cant connect to roundcube

Posted: Sat Jun 23, 2018 8:36 pm
by hdavis84
napcok wrote:
Sat Jun 23, 2018 1:53 pm
I have exactly the same error on Ubuntu 16.04 + current VestaCP (0.9.8-21) fresh install.
Same here. None of the inbox = yes tricks work for me

Re: Fresh Install Vesta cant connect to roundcube

Posted: Sat Jun 23, 2018 10:07 pm
by snoflod
Same here, tried different versions of Ubuntu, CentOS, but to no avail. Do you guys have any ideas on how to fix it?

Re: Fresh Install Vesta cant connect to roundcube

Posted: Sat Jun 23, 2018 11:39 pm
by snoflod
I found a fix:


the problem is caused by a bug in Dovecot which has been fixed in its later versions (probably 2.2.24 or 2.2.26). All you need to do is install Vesta on a system which is both supported by Vesta AND shipped with Dovecot >=2.2.24 or, preferably, >=2.2.26, such as Debian 9, for example. Therefore, Vesta is not fully workable on Ubuntu at this point, as its Vesta-compatible versions feature an older version of Dovecot, namely 2.2.2, and you cannot upgrade it to 17.04 (only to 18.04), which is, on other hand, not yet supported by Vesta.

Hope it will be helpful.

Re: Fresh Install Vesta cant connect to roundcube

Posted: Tue Jun 26, 2018 3:55 am
by murderousone
snoflod wrote:
Sat Jun 23, 2018 11:39 pm
I found a fix:


the problem is caused by a bug in Dovecot which has been fixed in its later versions (probably 2.2.24 or 2.2.26). All you need to do is install Vesta on a system which is both supported by Vesta AND shipped with Dovecot >=2.2.24 or, preferably, >=2.2.26, such as Debian 9, for example. Therefore, Vesta is not fully workable on Ubuntu at this point, as its Vesta-compatible versions feature an older version of Dovecot, namely 2.2.2, and you cannot upgrade it to 17.04 (only to 18.04), which is, on other hand, not yet supported by Vesta.

Hope it will be helpful.
This def helped me alot.. I was previously on Ubuntu 16.04 LTS, but kept getting a error trying to login to roundcube (Connection to storage server failed). I tried all the recommended editing of dovecot configs and none of them worked. I finally came across and read your post and since i only have x2 small sites running on the vesta panel i decided to take the leap and try Debian 9 instead of Ubuntu. Reinstallation of VestaCP and the new debian 9 wasn't to bad since there was only x2 sites and debian is very much the same as ubuntu. I can confirm, with Debian 9 that the error is no longer produced and is fixed with dovecot's newer versions. Also, Debian 9 shipped with Dovecot 2.2.27 just in case you were wondering, which im guessing fixed that issue as you mentioned it got fixed in either 2.2.24 or 2.2.26. Dovecot 2.2.27 def has the fix for the issue i was experiencing..
Thanks for the recommendation and information regarding the Bug in Dovecot.

Re: Fresh Install Vesta cant connect to roundcube

Posted: Sun Jul 15, 2018 2:35 pm
by FrazzledPenguin
the problem is caused by a bug in Dovecot which has been fixed in its later versions (probably 2.2.24 or 2.2.26). All you need to do is install Vesta on a system which is both supported by Vesta AND shipped with Dovecot >=2.2.24 or, preferably, >=2.2.26, such as Debian 9, for example. Therefore, Vesta is not fully workable on Ubuntu at this point, as its Vesta-compatible versions feature an older version of Dovecot, namely 2.2.2, and you cannot upgrade it to 17.04 (only to 18.04), which is, on other hand, not yet supported by Vesta.
This is not true in all cases. I have two Vesta servers on Ubuntu Server 16.04.4 LTS. The first one has no issues with dovecot, the second one does. Also, there are different issues and. The inbox = yes solution is for a different problem than the blank namespace error (Error: User initialization failed: namespace configuration error: Duplicate namespace prefix: "").

Just in case, I did try the inbox = yes and it did not help. I checked the versions of dovecot on both servers and they're both the same. The only thing that seems to be different is that there are more config files on the server with the non-working roundcube. My next step is to compare the file sets and see what's different. If I find out what the issue is I'll post an update.

Re: Fresh Install Vesta cant connect to roundcube

Posted: Sun Jul 15, 2018 6:18 pm
by FrazzledPenguin
I've resolved my issue. I'm not sure why these two installs were different but there's a good chance that I used two slightly different install options. Either way, I thought I'd post what happened just in case someone else bumps up against this edge case.

The error I was getting was:

Code: Select all

Error: User initialization failed: namespace configuration error: Duplicate namespace prefix: ""
I compared my working VestaCP Ubuntu 16.04.4 install to my new (non-working dovecot) Ubuntu 16.04.4 install. The default namespace found in /etc/dovecot/dovecot.conf already included the inbox = yes option so there was no need to include this elsewhere (at least in my scenario). Also, the version of Dovecot in both installs is 2.2.22, and yes it is functional despite past comments. VestaCP is functional/compatible with Ubuntu 16.04.4.

When comparing the files in each, I noticed that the working install did not have the file:

Code: Select all

/etc/dovecot/conf.d/15-mailboxes.conf
This file looks to be declaring a new namespace "inbox". The settings appear to a re-statement of what is in the default namespace in /etc/dovecot.conf file and shouldn't be needed. I presume this is why dovecot was giving a duplicate namespace "" error. The "" being the default namespace. I removed this file (after backing it up), and restarted dovecot

Code: Select all

systemctl restart dovecot
and I was now able to log in via roundcube.

I hope this helps someone else should they bump into this edge case.