Re: (was Re: setting FQDN in /etc/hosts)



Whiskers wrote:
[...]
It would be a lot easier to read the contents of your config files if you
did not include the -n option for the cat command, and if you make sure
that the lines are not wrapped differently in your post from the actual
file. There should be a space before the word localhost, then a newline.

Ok. I added the newline, with the same results, though.

[...]
I suspect that your /etc/hosts file is not being read, so is perhaps
faulty somehow.

That'd make sense.

Make sure there is a newline at the end of the line; an
empty line before the end of the file should do no harm, and will make
sure that the newline character is present. Also make sure that the
permissions are appropriate - eg

[mark@tavy etc]$ ls -l hosts
-rw-r--r-- 2 root root 181 Jul 27 21:11 hosts
[mark@tavy etc]$

You don't need to try to run leafnode to see if your /etc/hosts file is
being interpreted as intended; the hostname command will tell you what
your system's hostname is:

Heh. I'll use that next time, it's much more concise.

[mark@tavy etc]$ hostname
tavy.mobile.private
[mark@tavy etc]$

Note that the command prompt on my system also shows the name of the
system; your's probably does too - so a prompt with the word localhost in
it is an indication that the hostname is not being picked up.

At the moment, I'm just getting "localhost.localdomain"

You also seem to be doing many things 'as root' that can be done as a
normal user with much greater safety; you should only take on superuser
powers when essential. If you are running a graphical interface, you can
have two seperate 'terminals' at the same time, one for 'root' and one for
you. You can even configure them to look different, as a reminder.
('Konsole', part of the KDE project, is particularly good at this).

I'm in gnome, but I get your drift.

It seems clear that /etc/hosts isn't "working" because __________. I
have to read up on a few things, dunno what xinetd is, for example.

[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@localhost ~]# telnet localhost 119
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
503 Leafnode must have a unique fully-qualified domain name. Have its
administrator fix the configuration. More detail is in the logs.

Leafnode must have a fully-qualified and globally unique domain name,
not just "localhost.localdomain".
Edit your /etc/hosts file to add a unique, fully qualified domain name.
"localhost.localdomain" or thereabouts will not work;
it's qualified, but not unique.
Please see the README-FQDN file for details.

Connection closed by foreign host.
[root@localhost ~]# cat /etc/leafnode/config
## Unread articles will be deleted after this many days if
## you don't define special expire times. Mandatory.
expire = 2

## This is the NNTP server leafnode fetches its news from.
## You need read and post access to it. Mandatory.
server = shawnews.vc.shawcable.net
## server = news.gmane.org


## hostname = geidiprime.servebeer.com

initialfetch = 30
[root@localhost ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.

127.0.0.1 geidiprime.servebeer.com geidiprime localhost

[root@localhost ~]# ls -al /etc/hosts
-rw-r--r-- 2 root root 163 Aug 19 11:00 /etc/hosts
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# date
Sat Aug 19 11:15:12 IST 2006
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# nano /etc/leafnode/config
[root@localhost ~]# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@localhost ~]# telnet localhost 119
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 Leafnode NNTP Daemon, version 1.11.5 running at
geidiprime.servebeer.com (my fqdn: geidiprime.servebeer.com)
^]

telnet> quit
Connection closed.
[root@localhost ~]# cat /etc/leafnode/config
## Unread articles will be deleted after this many days if
## you don't define special expire times. Mandatory.
expire = 2

## This is the NNTP server leafnode fetches its news from.
## You need read and post access to it. Mandatory.
server = shawnews.vc.shawcable.net
## server = news.gmane.org


hostname = geidiprime.servebeer.com

initialfetch = 30
[root@localhost ~]#
[root@localhost ~]# date
Sat Aug 19 11:16:24 IST 2006
[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]#
[root@localhost ~]# date
Sat Aug 19 11:23:38 IST 2006
[root@localhost ~]#



thanks,

Thufir

.



Relevant Pages

  • Re: DNS lookup delays
    ... > 127.0.0.1 localhost.localdomain localhost luminiferous luminiferous.aethernet ... You want to set your hostname, so the machine isn't trying to work it ... That sounds awfully like it's not using its own hosts file to work out ... >> to resolve them locally (via the hosts file, or your own DNS server). ...
    (linux.redhat.install)
  • Re: DBIx::DBH - Perl extension for simplifying database connections
    ... host that it would not connect using the host name and end up using TCP on ... The server name is ... important because I use the localhost name to match up with that, ... matches then don't add in the hostname to the connect string. ...
    (perl.dbi.users)
  • Re: FQDN for Leafnode
    ... Leafnode is a 'server'; you can't use it to read ... Leafnode provides an NNTP feed on the computer it runs on, ... your case) next time fetchnews is run. ... I would "telnet localhost 119" to make sure that leafnode is ...
    (news.software.readers)
  • Re: FQDN for Leafnode
    ... That is what leafnode uses to create my Message-ID headers, ... $ cat /etc/hosts ... of the optional hostname setting in leafnode. ... #127.0.0.1 localhost ...
    (news.software.readers)
  • Re: Squid
    ... Karl Larsen wrote: ... Could not determine fully qualified hostname. ... address of that server and replace "localhost" with your server name. ...
    (Ubuntu)