[Dovecot] dovecot 1.2 and logging start failures
Hi,
I've got report about issue when dovecot fails to start and there is no error logged (error goes only to stderr)
situation:
- dovecot is running
- dovecot is automatically updated to new version (by yum update daemon), after update, dovecot is restarted (it's part of update script)
- new dovecot fails to start (for whatever reason)
result: dovecot not running and no error message has been logged because (at least some) errors were written to stderr only and not syslog
another situation (original issue) was when dovecot was configured to listen for ipv4 and ipv6 connections. ipv6 support was disabled. After server reboot, dovecot failed to start, producing
dovecot: Fatal: listen(::, 143) failed: Address already in use
only to stderr, nothing in logs.
Would it be possible to use syslog for error output sooner or there are any cons?
Regards, Michal Hlavinka
On Tue, 2009-09-01 at 16:57 +0200, Michal Hlavinka wrote:
Would it be possible to use syslog for error output sooner or there are any cons?
On Monday 07 September 2009 04:18:06 Timo Sirainen wrote:
On Tue, 2009-09-01 at 16:57 +0200, Michal Hlavinka wrote:
Would it be possible to use syslog for error output sooner or there are any cons?
Thanks for looking at this!
Unfortunately this does not work
backtrace: (gdb) bt #0 0x00000034bca489d7 in _IO_vfprintf_internal (s=0x7fffffffe020, format=<value optimized out>, ap=0x7fffffffe350) at vfprintf.c:1580 #1 0x00000034bca6f232 in _IO_vsnprintf (string=0x63f718 "listen(", maxlen=<value optimized out>, format=0x63f6e8 "listen(%s, %d) failed: Address already in use", args=0x7fffffffe350) at vsnprintf.c:120 #2 0x000000000042605c in t_noalloc_strdup_vprintf (format=0x63f6e8 "listen(%s, %d) failed: Address already in use", args=0x7fffffffe350, size_r=0x7fffffffe22c) at strfuncs.c:120 #3 0x0000000000426152 in p_strdup_vprintf (pool=0x63c780, format=0x42bd69 "listen(%s, %d) failed: %m", args=0x7fffffffe350) at strfuncs.c:139 #4 0x00000000004266c2 in t_strdup_vprintf (format=0x42bd69 "listen(%s, %d) failed: %m", args=0x7fffffffe350) at strfuncs.c:254 #5 0x00000000004171c6 in syslog_handler (level=2, type=LOG_TYPE_FATAL, format=0x42bd69 "listen(%s, %d) failed: %m", args=0x7fffffffe350) at failures.c:298 #6 0x0000000000417274 in i_syslog_fatal_handler (type=LOG_TYPE_FATAL, status=89, fmt=0x42bd69 "listen(%s, %d) failed: %m", args=0x7fffffffe350) at failures.c:311 #7 0x000000000040d783 in tee_fatal_handler (type=LOG_TYPE_FATAL, status=89, fmt=0x42bd69 "listen(%s, %d) failed: %m", args=0x7fffffffe350) at main.c:152 #8 0x0000000000416d87 in i_fatal (format=0x42bd69 "listen(%s, %d) failed: %m") at failures.c:216 #9 0x0000000000407616 in listener_array_listen_missing (proto=0x42bc64 "imap", listens_arr=0x647720, retry=false) at listener.c:335 #10 0x000000000040769d in listener_listen_missing (set=0x6474d8, proto=0x42bc64 "imap", retry=false) at listener.c:346 #11 0x00000000004077e1 in listeners_open_fds (old_set=0x0, retry=false) at listener.c:371 #12 0x000000000040e50c in main (argc=1, argv=0x7fffffffe658) at main.c:649
reproducer:
listen for ipv4 and ipv6 connections on system, where ipv6 is disabled, start dovecot:
Fatal: listen(::, 143) failed: Address already in use
Program received signal SIGSEGV, Segmentation fault.
Cheers, Michal
On Sep 7, 2009, at 6:01 AM, Michal Hlavinka wrote:
On Monday 07 September 2009 04:18:06 Timo Sirainen wrote:
On Tue, 2009-09-01 at 16:57 +0200, Michal Hlavinka wrote:
Would it be possible to use syslog for error output sooner or
there are any cons?Thanks for looking at this!
Unfortunately this does not work
It worked in Ubuntu, but I guess these fix it:
http://hg.dovecot.org/dovecot-1.2/rev/cc0d7c00c6ce http://hg.dovecot.org/dovecot-1.2/rev/5f9782109fcf
On Monday 07 September 2009 17:48:13 Timo Sirainen wrote:
On Sep 7, 2009, at 6:01 AM, Michal Hlavinka wrote:
On Monday 07 September 2009 04:18:06 Timo Sirainen wrote:
On Tue, 2009-09-01 at 16:57 +0200, Michal Hlavinka wrote:
Would it be possible to use syslog for error output sooner or there are any cons?
Thanks for looking at this!
Unfortunately this does not work
It worked in Ubuntu, but I guess these fix it:
http://hg.dovecot.org/dovecot-1.2/rev/cc0d7c00c6ce http://hg.dovecot.org/dovecot-1.2/rev/5f9782109fcf
confirmed, now it works
thanks
participants (2)
-
Michal Hlavinka
-
Timo Sirainen