[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug in the /etc/hosts - Posible solution





Jens Seidel wrote:
Hi,

On Sat, Jan 28, 2006 at 12:46:58AM +0800, Navarre of Anjov wrote:

I have discovered that, or it seems that, the installer is writting a /etc/hosts file record that causes the host name that is recorded in the /var/log/syslog to be of the form of

Jan 28 00:38:48 localhost exiting on signal 15

after I corrected the /etc/hosts to read

127.0.0.1       nyssah

and retarted syslogd I got

Jan 28 00:38:49 nyssah syslogd 1.4.1#17ubuntu3: restart.

This seems to be in both the 5.1 Ubuntu and Debian Sarge but not in Debian Woody. As I was generally using the Woody installer and upgrading to Sarge I was not aware of the problem until recently.


Right, this changed some time ago. One reason for this can be found in
http://lists.debian.org/debian-devel/2004/06/msg00466.html and this
thread.

Interesting discussion but not directly relivant to syslogd.


Wilst not a show stopper it needs to be fixed.


Why do you think it needs to be fixed?

Jens

Let me clarify a view point, Hostname is the string that I get at my Bash prompt \h:, it is the contents of /etc/hostname and it is the name I use when I ssh to the machine. It is also the name I would see in /var/log/syslog.

I am know it must be common for sysops to be looking at the syslogs of many different linux boxen, some local and some remote. Before Sarge the Hostname was displayed in the logfile. Now with the change in Sarge all I see is localhost. This is a non unique string that in simple terms makes all syslog files seem the same.

My prime focus in on the hostname that syslogd shows in its logs.
I could ask the question in another way and that would be,
Why is syslogd not using the string contained in /etc/hostname?

writing an /etc/hosts records as

127.0.0.1 	localhost.localdomain	localhost
0.0.0.0		pro200.anjov.com	pro200

allows me to ping as localhost, pro200.anjov.com and pro200.
Most importantly the /var/log/syslog records show the name pro200 as I was seeking, the return of the original behaviour seen with Woody.

If the machine had a static IP that IP address would replace the 0.0.0.0 in the above example.

The quick testing I have performed was done on a Ubuntu 5.10 CD install, but I beieve it is the same with Debian Sarge. The test machine uses dhcp to gain its IP address, all networking and gateway seem to operate fine. Using lynx I was able to view the home page on my Intranet, and apt-get update and upgrade worked.

Can I urge the relivent persons to consider my sollution to the syslogd issue I have raised.

Let me say again, I am nolonger on the mailing list, please post direct and to the list.

Regards Navarre of Anjov







Reply to: