I'm trying to send my syslogs on a Solaris 10 server to a remote host.
After adding my line in syslog.conf, I get an error when re-starting
syslog:
# svcadm restart svc:system/system-log:default <enter>
<hostname> syslogd: line 46: WARNING: <IP address> could not be resolved.
That's right - I have the IP address entered as follows in syslog.conf:
*.debug <tab> <tab> @<IP address>
Every suggestion I come across doing a google search all refer to having
a "loghost" entry in the hosts file beside localhost, which of course is
what most people have instead of my IP address. I originally had the
hostname there, so when the error occurred, I though "No brainer - just
put the IP in instead." Same error. And it's in the hosts file as it
should be...
I have the nsswitch.conf and resolv.conf set up as they should be as
well...
Any insights welcome... thnx in advance,
Jim
o The name of a remote host, prefixed with an @, as with:
@server, which indicates that messages specified by the
selector are to be forwarded to the syslogd on the
named host. The hostname "loghost" is treated, in the
default syslog.conf, as the hostname given to the
machine that logs syslogd messages. Every machine is
"loghost" by default, per the hosts database. It is
also possible to specify one machine on a network to be
"loghost" by, literally, naming the machine "loghost".
If the local machine is designated to be "loghost",
then syslogd messages are written to the appropriate
files. Otherwise, they are sent to the machine
"loghost" on the network.
I would have to look at the source for syslogd to verify that this is, in fact, for hostnames only rather than allowing IP addresses.
Interesting take, but I should have mentioned that I already had the
hostname in there... same error. Syslogd will send to multiple remote
hosts with the "@" symbol, as proven by many other servers (Solaris 2.8),
just not on this box (Solaris 10).
Weird stuff.
It might be a symptom of a netconfig problem.
Source code
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/syslogd/syslogd.c
logforward() function, lines 3907-3941