Seeing error when opening webmail such as roundcube and squirrelmail

Any idea? Thanks.

ERROR: Could not complete request. Query: SELECT "INBOX" Reason Given: Internal error occurred. Refer to server log for more information. [2011-10-01 05:55:48]

Status: 
Active

Comments

Howdy -- you may want to take a look at the mail logs, those should contain the errors that are occurring.

You can find those in /var/log/maillog.

What errors do you see in there during the times when you tried logging into the webmail apps?

is a dovecot problem. please find the log below:

----- tail -f /var/log/maillog ------ Oct 1 09:50:46 whmcs-04 dovecot: imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Oct 1 09:50:46 whmcs-04 dovecot: IMAP(helpmin): mmap() failed with file /mnt/replicated-vol-whmcs/home/helpmin/Maildir/dovecot.index.log: No such device Oct 1 09:50:46 whmcs-04 dovecot: IMAP(helpmin): mmap() failed with file /mnt/replicated-vol-whmcs/home/helpmin/Maildir/dovecot.index.log: No such device Oct 1 09:50:46 whmcs-04 dovecot: IMAP(helpmin): Unexpected transaction log desync with index (in-memory index) Oct 1 09:50:46 whmcs-04 dovecot: IMAP(helpmin): mmap() failed with file /mnt/replicated-vol-whmcs/home/helpmin/Maildir/.Trash/dovecot.index.log: No such device Oct 1 09:50:46 whmcs-04 dovecot: IMAP(helpmin): mmap() failed with file /mnt/replicated-vol-whmcs/home/helpmin/Maildir/.Trash/dovecot.index.log: No such device Oct 1 09:50:46 whmcs-04 dovecot: IMAP(helpmin): Unexpected transaction log desync with index (in-memory index) Oct 1 09:50:46 whmcs-04 dovecot: IMAP(helpmin): Disconnected: Logged out Oct 1 09:50:49 whmcs-04 dovecot: imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Oct 1 09:50:49 whmcs-04 dovecot: IMAP(helpmin): mmap() failed with file /mnt/replicated-vol-whmcs/home/helpmin/Maildir/dovecot.index.log: No such device Oct 1 09:50:49 whmcs-04 dovecot: IMAP(helpmin): mmap() failed with file /mnt/replicated-vol-whmcs/home/helpmin/Maildir/dovecot.index.log: No such device Oct 1 09:50:49 whmcs-04 dovecot: IMAP(helpmin): Unexpected transaction log desync with index (in-memory index) Oct 1 09:50:49 whmcs-04 dovecot: IMAP(helpmin): Connection closed ----- tail -f /var/log/maillog ------

[root@whmcs-04 Maildir]# ll /mnt/replicated-vol-whmcs/home/helpmin/Maildir/dovecot.index.log -rw------- 1 helpmin helpmin 24 Oct 1 09:50 /mnt/replicated-vol-whmcs/home/helpmin/Maildir/dovecot.index.log [root@whmcs-04 Maildir]# ll /mnt/replicated-vol-whmcs/home/helpmin/Maildir/.Trash/dovecot.index.log -rw------- 1 helpmin helpmin 24 Oct 1 09:51 /mnt/replicated-vol-whmcs/home/helpmin/Maildir/.Trash/dovecot.index.log [root@whmcs-04 Maildir]#

It looks like something is corrupted... what about other users, are other users able to login without problems?

If so, and the problem is limited to just this user, that may mean it's just a Dovecot index file issue.

how to fix it?

i recreated the domain, recreated the mailbox but still showing the same problem.

Well, we first need to figure out if the problem is limited to one user, or if all your users are having that problem.

Are you able to log in as other users? Is it just this one user having problems?

Or do all your users have problems checking email?

i just checked, all user having the same issue. the next step is.... reinstall dovecot?

One thing you could try is stopping dovecot, then deleting all index files under the /var/lib/dovecot/index directory, then starting it again.

i dont see any index directory under:

[root@whmcs-01 ~]# cd /var/lib/dovecot/ [root@whmcs-01 dovecot]# ls -lah total 20K drwxr-x--- 2 dovecot dovecot 4.0K Sep 27 18:32 . drwxr-xr-x 36 root root 4.0K Sep 14 05:27 .. -rw-r--r-- 2 root root 230 Sep 27 18:32 ssl-parameters.dat [root@whmcs-01 dovecot]#

I've been trying to research causes for the problems you're seeing... I haven't seen all Dovecot index files become corrupted in a way that no user can log in and check emails, so this seems pretty unusual.

One question that came during my research -- what filesystem are your home directories running on? A good way to determine that would be to run the command "mount", and paste the output in here.

Depending on the filesystem, and whether it's local or not, there are some Dovecot options we can tweak to get it to handle that better.

home is hosted on a glusterfs mounted on /mnt/replicated-vol-whmcs buster glusterfs is based on ext3. is there a way to fix it?

[root@whmcs-01 ~]# mount /dev/sda3 on / type ext3 (rw,grpquota,usrquota) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) glusterfs#vip:/replicated-vol-whmcs on /mnt/replicated-vol-whmcs type fuse (rw,allow_other,default_permissions,max_read=131072) /dev/sdb1 on /mnt/local_backup type ext3 (rw,_netdev) [root@whmcs-01 ~]#

Ah, it may indeed be the glusterfs filesystem.

What you could try is edit /etc/dovecot.conf, and set these two options:

mmap_disable = yes
dotlock_use_excl = no

Once you set that, restart Dovecot by running this:

/etc/init.d/dovecot restart

After that, are you able to login with the errors?

cool. it works without any issue now. means need to alter the dovecot configuration if homedir is on network file system?

Yeah, Dovecot doesn't always play nice with network filesystems by default.

There's some details on using Dovecot on NFS (and other network filesystems) here:

http://wiki.dovecot.org/NFS