Re: Regression in notification mails? (keepalived 1.3.4)
Timo <[email protected]> Tue, 14 Mar 2017 15:46:38 +0100
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
On 03/14/2017 03:33 PM, Quentin Armitage wrote: > On Tue, 2017-03-14 at 14:32 +0100, Timo wrote: >> Hi, >> >> accidentally I enabled notification via mail on a new setup (I usually >> monitor keepalived differently). >> >> I got a mail like this: >> >> => CHECK failed on service : Read timeout from server %s <= >> >> (This is being emitted by a TCP_CHECK.) >> >> I use keepalived 1.3.4 built from source on CentOS 7.3.1611 – I'm pretty >> sure that this worked as intended some releases ago. Hi, > This looks to me as though it is the first call of smtp_final() in > smtp_get_line_cb() in check_smtp.c. Then in smtp_final(), the first call > of snprintf is > snprintf(smtp_buf, 542, "=>CHECK failed on service : %s <=", error_buff > + 11); > which amounts to: > snprintf(smtp_buf, 542, "=>CHECK failed on service : %s <=", "Read > timeout from server %s"); > and hence the email contents you are getting. > > I assume that the syslog entry is correctly formatted, since about 27 > lines above the snprintf() a varg_list is passed to the vlog_message(). > > I think what is needed is, instead of: > snprintf(smtp_buff, 542, "=> CHECK > failed on service : %s <=", > error_buff + 11); > is something like: > snprintf(smtp_buff, 542, "=> CHECK > failed on service : %s <=", > error_buff + 11); > strcpy(error_buff, smtp_buff); > va_start(varg_list, format); > vsnprintf(smtp_buf, 542, error_buff, > varg_list); > va_end(varg_list); > since there needs to be the double expansion for printf format specifiers. > > If my interpretation is correct, this looks like it is reporting a read > timeout from the SMTP server. Can you check if there are any > corresponding syslog entries that might help determine what it is. I don't see any problems in the logfiles, neither in /var/log/maillog nor /var/log/messages, where keepalived reports to. Postfix running locally, so timeout is very unlikely. Timo > It looks as though the existing code has been around since at least 2011. > > Quentin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Keepalived-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/keepalived-devel