Jürgen Obermann
2010-Aug-06 09:52 UTC
[Dovecot] Problem creating sockets after Solaris Live Upgrade
Hello, I use Solaris Live Upgrade to install solaris patches in an alternate boot environment. Unfortunately the dovecot sockets /opt/local/var/run/dovecot/dict-server and /opt/local/var/run/dovecot/login/default are created as normal files in the ABE. After switching to the ABE dovecot will not start because of the existence of these two files. After removing these files dovecot starts normally. I think that dovecot should create the sockets even if there exist files with the same names. Here is the protocol of this: Dovecot uses two sockets in the running system: # ls -al /opt/local/var/run/dovecot/login/default /opt/local/var/run/dovecot/dict-server srwxrwxrwx 1 root root 0 Aug 4 10:07 /opt/local/var/run/dovecot/dict-server srw-rw---- 1 root dovecot 0 Aug 4 10:07 /opt/local/var/run/dovecot/login/default In the Alternate Boot Environment created with Solaris Live Upgrade there are normal files instead of the sockets: # ls -al /a/opt/local/var/run/dovecot/login/default /a/opt/local/var/run/dovecot/login/default -rw-rw---- 1 root dovecot 0 Jul 7 17:01 /a/opt/local/var/run/dovecot/login/default -rw-rw---- 1 root dovecot 0 Jul 7 17:01 /a/opt/local/var/run/dovecot/login/default During booting this ABE dovecot will not start, unless both files are removed: Aug 6 06:55:30 hostname dovecot: Fatal: Socket already exists: /opt/local/var/run/dovecot/dict-server # ls -al /opt/local/var/run/dovecot/dict-server -rwxrwxrwx 1 root root 0 Aug 4 10:09 /opt/local/var/run/dovecot/dict-server # rm /opt/local/var/run/dovecot/dict-server # /etc/init.d/dovecot start Last died with error (see error log for more information): Socket already exists: /opt/local/var/run/dovecot/dict-server Aug 6 06:57:50 hostname dovecot: [ID 583609 local0.info] Dovecot v1.2.12 starting up Aug 6 06:57:50 hostname dovecot: [ID 583609 local0.error] net_listen_unix(/opt/local/var/run/dovecot/login/default) failed: Address already in use Aug 6 06:57:50 hostname dovecot: [ID 583609 local0.crit] Fatal: Couldn't create auth process listener # ls -al /opt/local/var/run/dovecot/dict-server srwxrwxrwx 1 root other 0 Aug 6 06:57 /opt/local/var/run/dovecot/dict-server # ls -al /opt/local/var/run/dovecot/login/default -rw-rw---- 1 root dovecot 0 Aug 4 10:09 /opt/local/var/run/dovecot/login/default # rm /opt/local/var/run/dovecot/login/default # /etc/init.d/dovecot start # ls -al /opt/local/var/run/dovecot/login/default srw-rw---- 1 root dovecot 0 Aug 6 07:00 /opt/local/var/run/dovecot/login/default Both sockets are created by dovecot if they don't exist. Greetings, J?rgen Obermann -- Hochschulrechenzentrum der | Mail: Juergen.Obermann at hrz.uni-giessen.de Justus-Liebig-Universitaet | WWW: http://www.uni-giessen.de/obermann/ Heinrich-Buff-Ring 44 | Tel: 0641-99-13054 (0641-99-13001) D-35392 Giessen, Germany | Fax: 0641-99-13009 ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Timo Sirainen
2010-Aug-06 14:42 UTC
[Dovecot] Problem creating sockets after Solaris Live Upgrade
On Fri, 2010-08-06 at 11:52 +0200, J?rgen Obermann wrote:> During booting this ABE dovecot will not start, unless both files are removed: > > Aug 6 06:55:30 hostname dovecot: Fatal: Socket already exists: /opt/local/var/run/dovecot/dict-serverDoesn't it say something about "Socket operation on non-socket"? Anyway.. I thought about this, and I don't think I want to change how it works. Dovecot shouldn't go deleting files that exist, just in case someone accidentally configured some socket to point to wrong location. Just create a wrapper script that deletes the entire /opt/local/var/run/dovecot/ directory at startup.