At 23:42 +0200 25/7/08, Arkadiusz Miskiewicz wrote:
This may be a silly question but how to correctly stop dovecot and be sure that it's possible to start it again?
kill -TERM
cat /var/run/dovecot/master.pid
doesn't work well.I have imap-login processes staying arround and occupying port which leads to Fatal: listen(0.0.0.0, 993) failed: Address already in use when trying to start again 2s after stopping.
The key is '2s after stopping'. It'll take longer than that for a port to be released the default 'tidyup' way. This happens with all sorts of services on all sorts of Unixy systems. Maybe it's the fault of the app not tidying up as it terminates, but it's far from uncommon.
David
-- David Ledger - Freelance Unix Sysadmin in the UK. HP-UX specialist of hpUG technical user group (www.hpug.org.uk) david.ledger@ivdcs.co.uk www.ivdcs.co.uk