[comp.sys.sgi] @host syslogd forwarding

mike@BRL.MIL (Mike Muuss) (03/06/91)

Our our SGI machines at BRL, we have /etc/syslog.conf set up to use
"@host" forwarding to a central collection machine for certain kinds of
error messages.  Unfortunately, we have discovered that under IRIX
3.3.1, syslogd rarely succeeds in forwarding these messages after the
system is rebooted.  If syslogd is killed and restarted, then network
forwarding of log messages works properly.

I believe that this difficulty is a consequence of the order that
the various daemons are started from within /etc/rc2.d, namely:

S20sysetup:	syslogd
S30network:	routed, portmap, named, inetd.

I suspect that syslogd is unable to resolve the host name given, because
named is not running yet, so it silently discards the @host forwarding.

Phil Dykstra and Bob Reschly report that for BSD UNIX systems, a
different ordering is necessary:

   # NOTE:  The ordering of routing, name service, system logging, RPC port
   # mapping, and finally inetd service is important.  All need get off the
   # ground as soon as possible.  System logging needs name service which
   # is itself dependant on routing.  In addition, RPC port mapping must be
   # running prior to inetd

As a consequence of these observations, I am considering that, at
a minimum, syslogd startup be delayed until after S30network.  Perhaps
syslogd could be moved into it's own file, such as S40syslog, or some
such.

In a few days, I'll probably go ahead and give breaking out a S40syslog
a try. Please let me know if there is a better way of dealing with this
issue.

	Thanks,
	 -Mike

srp@babar.mmwb.ucsf.edu (Scott R. Presnell) (03/06/91)

mike@BRL.MIL (Mike Muuss) writes:

>Our our SGI machines at BRL, we have /etc/syslog.conf set up to use
>"@host" forwarding to a central collection machine for certain kinds of
>error messages.  Unfortunately, we have discovered that under IRIX
>3.3.1, syslogd rarely succeeds in forwarding these messages after the
>system is rebooted.  If syslogd is killed and restarted, then network
>forwarding of log messages works properly.

>I believe that this difficulty is a consequence of the order that
>the various daemons are started from within /etc/rc2.d, namely:

>S20sysetup:	syslogd
>S30network:	routed, portmap, named, inetd.

>I suspect that syslogd is unable to resolve the host name given, because
>named is not running yet, so it silently discards the @host forwarding.

I not positive that this will fix it, but theoretically it should
work here if name resolution is the problem.  In any case, it's alternative
that you might try.

(1) We run the the bind name daemon (named) here, and from the *.bak files
that are kept for the local zones, I have the machine construct a new
/etc/hosts file every night - so this hosts file contains the local domain
hosts (plus whatever hard wired stuff you want like "localhost 127.0.0.1").

(2) WRT host reslotion, I have the following set up.

=== /usr/etc/resolv.conf ===
domain mmwb.ucsf.EDU
hostresorder local bind
nameserver 0.0.0.0
===

So that the /etc/hosts file will be queried first - and local references
should be resolved by that lookup.

For us, it helps with two conditions:

(1) Mounts and exports at boot time. By the time our machines reach the
phase of the boot where mounts and exports are being performed, named
hasn't completely loaded.  Just makes the boot a little cleaner, and less
dependent on DNS.

(2) When the named caches have gone stale and/or athoritative host for our
zone(s) is unreachable, this allows local resolutions to work. 

I think it might also solve the above syslogd apparent resolution problem.

	Hope this helps.

	- Scott Presnell
--
Scott Presnell				        +1 (415) 476-9890
Pharm. Chem., S-926				Internet: srp@cgl.ucsf.edu
University of California			UUCP: ...ucbvax!ucsfcgl!srp
San Francisco, CA. 94143-0446			Bitnet: srp@ucsfcgl.bitnet