How to disable messages from syslogd ?

Hi,

I have sometimes this kind of messages that are displayed on every opened console when building an application with distcc:

Message from syslogd@computer1 at Apr  9 13:54:49 ...
 stcc[28186] (resolve_reply) Warning: Failed to resolve service 'distcc@computer2': Timeout reached

I looked on the web but solutions are I found are not working:

  • https://serverfault.com/questions/776330/disabling-syslogd-messages: openSUSE seems not having the same syntax, but, I found some code in /etc/rsyslog.conf saying “print most important on tty10 and on the xconsole pipe” and tried to add a “and not $msg contains ‘distcc’” but it is not working, and, anyway, reading solution answer it seems it is not working in this OS too, and someone leads to another post (that I’ve seen before), see next point,
  • https://superuser.com/questions/351387/how-to-stop-kernel-messages-from-flooding-my-console: not working at all,
  • I also found (not remember where) that, when specifying distcc should log in a file giving a --log-file parameter in distccd service when starting /usr/bin/distccd these messages should be gone, but it is also not working.

Anyone has a solution to filter those very annoying messages that pollutes all my opened consoles (and I forgot to mention, also makes my computer beep) ?

Thanks

Check your syslog configuration files (depends on which syslog software you have installed).

For me, looking in “/etc/rsyslog.conf” only emergency messages are sent to all users. It is not standard to send warnings to all users. And the message you are seeing is only a warning.

A possible hint is that your error references a remote machine, not your local machine.

Do you have any log aggregation software installed?
Monitoring from a remote machine like Nagios?

TSU

Thanks,

@nrickert: indeed, I think this is rsyslog that manages the syslog in my case, since the file you mention is present and I have a rsyslog running service, and, when looking at the file I can see where logs are sent to console here, including some warnings (that is what I didn’t see before):

###
# print most important on tty10 and on the xconsole pipe
#
if    ( \
        /* kernel up to warning except of firewall  */ \
        ($syslogfacility-text == 'kern')      and      \
        ($syslogseverity <= 4 /* warning */ ) and not  \
        ($msg contains 'IN=' and $msg contains 'OUT=') \
    ) or ( \
        /* up to errors except of facility authpriv */ \
        ($syslogseverity <= 3 /* errors  */ ) and not  \
        ($syslogfacility-text == 'authpriv')           \
    ) \
then {
    /dev/tty10
    |/dev/xconsole
}

And this is the standard configuration for what I know since nobody changed it, I’ll then try this and hopefully these kind of message will not be raised anymore:

###
# print most important on tty10 and on the xconsole pipe
#
if    ( \
        /* kernel up to warning except of firewall  */ \
        ($syslogfacility-text == 'kern')      and      \
        ($syslogseverity <= 4 /* warning */ ) and not  \
        ($msg contains 'IN=' and $msg contains 'OUT=')  and not  \
        ($msg contains 'distcc') \
    ) or ( \
        /* up to errors except of facility authpriv */ \
        ($syslogseverity <= 3 /* errors  */ ) and not  \
        ($syslogfacility-text == 'authpriv')           \
    ) \
then {
    /dev/tty10
    |/dev/xconsole
}

@tsu2: I’m not sure from where the message is sent but the error may reference a remote machine (in my exemple, computer2 is actually a remote machine) but sometimes I alos have (surprisingly) distcc timeout from localhost, anyway, I hope nrickert’s hint will help me

Just got another one, so the change I made in /etc/rsyslog.conf does not work, anybody has another idea ?

Thanks

Have you checked the distcc configuration for hostname “computer2”?

The distcc man page on the net indicates that, distcc inspects the environment variable “DISTCC_HOSTS” and the user’s file “$DISTCC_DIR/hosts” for hostnames to use for the distributed compilation – is the rogue computer name defined somewhere in the user’s environment?