View Full Version : invalid host address

3rd July 2007, 03:01 PM
I've been using Fedora Core for about two years now contenting myself with getting comfortable with the OS. I started with '4' and upgraded to '6'. Now I want to begin fixing various problems I've ignored.

I have two boxes one running FC4 and the other FC6 serviced by a Versalink D90-327W30-06 router/DSL modem combo which acts as a DHCP server with IP addy of each computer pugged into one of four router ports as peers.

I've been using 'localhost.localdomain' as 'Hostname' for both computers and as Primary and Secondary DNS. The router assigns to the FC6 box and to the FC4 box (the total range of IP addys it can choose from). I have a fixed IP addy from my ISP.

After pouring over the Network Connectivity and Internet Connectivity chapters of my FC4 Unleashed bible I tried to give my FC4 box a unique hostname but ran into problems loosing use of some of my desktop icons and booting problems. Later I also tried to give my FC6 box a unique hostname but had the same desktop problems. I didn't even try to reboot. I tried to set a unique hostname by filling in the Hostname field of the 'Network Configuration, DNS' GUI utility. Since I was using the router as a DHCP server I didn't fill in any of the 'Host' fields. I wasn't sure what I should do.

I looked through /var/log/messages and the first problem I was able to recognise was 'invalid host address'. There are many othes which are shown in the attachment but, I want to start housekeeping by setting up valid IP hostnames and enable both boxes to 'see' each other and mount parts of each other's file systems.

Thanks for your help. phil

3rd July 2007, 03:32 PM
For example, if you choose a hostname 'helium' and your isp was 'aol.com', In /etc/hosts try adding a line like helium.aol.com helium

there should already be a line in there like localhost.localdomain localhost
leave that one alone.

4th July 2007, 12:45 AM
It seems as I have some basic problems with my sys. I went to '/etc/hosts' and much to my surprise found it empty. It wasn't empty the last time I looked some weeks ago. I entered ' localhost.localdomain localhost' and saved changes (using gedit as 'su' from a terminal). Then did some checking first trying to launch the Printer Config GUI tool. It took nearly three min for the menu to launch and when it did everything was greyed out my printer not showing. I've not rebooted the sys for over three weeks and so decided to do a re-boot to get a clean boot-up.

The kernel uncompressed and it began its boot-up process. Normally after starting 'udev' the progress sreeen appears. Not this time. Only the cursur 'x' appeared and stayed.

Eventually the screen blanked and the boot-up process appeared on the screen. Everything seemed to go okay till NFS services, which failed along with 'nfsd' and 'nfs quotas'.

After the user login screen came up I logged in as user and pulled up the
'System, Administration, Server Settings, Services' GuI and went to 'nfs' and 'nfsd' services. Each were selected so I de-selected them hoping to simplify trouble-shooting and boot-up. Attempting to save changes froze up my system forcing me to do a 're-set'. Boot-up process proceeded as before but 'nfs' and 'nfsd' were omitted. 'nfs' and nfsd' services were de-selected when I pulled up the Services GUI. Same problem with Printer GUI too.

i'm at a loss at to where to start to fix the system. I've not done a lot to learn the various '.conf' files and normal layouts. I've attached the results from 'service portmap status', 'route and 'ifconfig'. I see that under 'route' the loopback IP is absent and I have no idea where the IP= goes to. should be my DSL router/modem combo.

Lord I hope you can help me! phil

4th July 2007, 02:27 AM
Did you try my suggestion about adding the line with in /etc/hosts? If you just put the localhost line in then you would need to remove your unique hostname and set it back to localhost.localdomain for it to work. Also after any changes you need to restart the X server you can't just change your hostname and then try to open a new window, with gnome you just have to logout, if using kde logout then press control-alt-backspace to restart X.

The 169.254.x.x network routing entry is normal that has to do with the zero configuration network protocol, like when ur isp dhcp doesn't respond it will auto set an ip address in that range .

4th July 2007, 12:29 PM
hmmmm...now i'm a bit confused. I thought that the ' localhost.localdomain localhost' line had to be pesent regardless of any additional lines. Not true? If so, then i'm not sure what's going on with the hosts file and what a 'typical' file looks like. Would having both lines present cause conflicts?

My FC4 bible is not clear in this regard. Also, it's not clear when referring to 'destination' or 'host' computers which is very frustrating. I'm sure authors follow a 'convention' when referring to the computer at which we are sitting and all other computers. They seem to assume we know the convention(s). I can second guess the best driving myslf nuts along the way! Didn't know about restarting the X-server either. The book makes no mention of it. Thanks for the tip. phil

4th July 2007, 02:18 PM
ok, I followed you advice re the hosts file and removed the '' entry and replaced it with ' philsfc4.earthlink.net philsfc4' (on my FC4 guineapig box). Everything went well. I logged out as root and at the log-in screen my new name showed in the lower right. On the FC6 box logging out did not result in similar changed to the log-in screen but a re-boot did the trick.

looking in the SysLogViewer shows:

Jul 4 07:44:49 philsfc6 ntpd[2716]: getaddrinfo: "0.fedora.pool.ntp.org" invalid host address, ignored
Jul 4 07:44:49 philsfc6 ntpd[2716]: getaddrinfo: "1.fedora.pool.ntp.org" invalid host address, ignored
Jul 4 07:44:49 philsfc6 ntpd[2716]: getaddrinfo: "2.fedora.pool.ntp.org" invalid host address, ignored

Not sure what this means. I've included the rest of the '/var/log/message' file. phil

4th July 2007, 02:32 PM
I had hosts problems and fixed them for me as seen in this thread:

The "invention" of "localhost.localdomain" for localhost seems to be needed by many linuxes, but is not traditional and can interfere with some things. It is not sensibly documented and it is not documented in "man hosts" either.

Here is one thread that makes that complaint: http://lists.debian.org/debian-devel/2005/10/msg00387.html

IPV6 with its ::1 localhost further confuses things if using IPV6.

4th July 2007, 03:46 PM
lmo, my '/etc/sysconfig/network' file for 'philsfc6' is:


and for 'philsfc4' is:


I'll not try IPv6 on either box as of yet. Got my hands full as is! The fc4 box seems to be working but not the fc6 box.

For now I'm letting my router serve as the DHCP server limiting the range of IP addys it can choose from. So far it has consistenly assigned IPs to each box. I've removed reference to '' from the 'etc/hosts' file in both boxes w/o apparent incident (so far!).

My '/etc/hosts' file for the fc6 box is:

# Do not remove the following line, or various programs
# that require network functionality will fail. philsfc6.earthlink.net philsfc6

and for the fc4 box is:

# Do not remove the following line, or various programs
# that require network functionality will fail philsfc4.earthlink.net philsfc4

The IP shows up as a host in the 'Network Config, Hosts GUI menu on the fc6 box but not the fc4 box. Of course I only logged-out and back in with the fc4 box. Maybe a re-boot will cause the IP to appear.

Wouldn't your bang pre-fix in your '/etc/hosts' file have the same effect as removing the line ? I'm not sure I understand what you did using 'diff -c'. Would you flesh out your thinking plz.

Lastly, what would changing the hostname definition in '/etc/sysconfig/network' file of the fc6 box from 'HOSTNAME=localhost.localdomain' to 'HOSTNAME=philsfc6.earthlink.net'? Thanks. phil

4th July 2007, 04:03 PM
Ok, I wanted to make the hostname as seen on the command line prompt to be lmo
so I made the /etc/hosts file have the line: lmo localhost.localdomain localhost

I'm sure I also made the /etc/sysconfig/network file have the line:

And I probably did the command:
hostname lmo
which is temporary until reboot.

I do not have any explanation for why this worked, but for me, it did.
The existence of a line in /etc/hosts starting with seems to be important.

4th July 2007, 05:03 PM
OK, now I think I understand. Well then it seems then that I can safely leave out any reference to an IPv6 IP adddy in my '/etc/hosts' file as well as a ' IP addy too?

I'm wondering what effect not having a reference to the '' addy in the trace route table? Mine now shows:

[philtr@philsfc6 ~]$ /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 eth0
default dslrouter UG 0 0 0 eth0

Would not having it present be problematic for programs such as 'cups'? I'm not able to access my printer config menu now, not even the 'query' screen asking for root's password.


P.S. forget the remark about the 'query' screen. It's working now. :\

4th July 2007, 10:08 PM
I said nothing about removing the localhost line. I said to leave that line alone and add the line. So you would have at least 2 lines in there if you follow my original suggestion.

5th July 2007, 05:10 AM
Did you try my suggestion about adding the line with in /etc/hosts? If you just put the localhost line in then you would need to remove your unique hostname and set it back to localhost.localdomain for it to work.

jeo, I missunderstood your meaning above. I'll add the ' back in and see what effect it has. phil

5th July 2007, 02:52 PM
OK, starting to make some progress. I disabled SELinux policies for cups and immediately resolved that problem. phil

5th July 2007, 04:57 PM
Well the problem is SELinux. The two most recent policy update recked havock on my system. Disabling SELinux put me back to about 98% functionality. The only issue I have now is that cups won't print. I tried using one of the old cupsd.conf files but so far no luck. The last good one was created May 1, 2007. I'm also going to try deleting the current print que and creating a new one. Will let you know what happens. phil

P.S. Cups works fine with older config file. Now to figure out why SELinux is messing with my sys.

5th July 2007, 09:48 PM
With the naming of my two FC boxes and adding lines to '/etc/hosts' I can now 'see' my fc4 box from my fc6 box (but not visa versa yet. With my fc4 box choosing 'Places, Computer, Network' shows philsfc4, philsfc6 and Windows Network but clicking on philsfc6 only results in a blank window. I noticed that 'smb://philsfc6' appears in 4's 'location' field which might explain the blank window.

I've included a file with info from my hosts, hosts.allow, and the route command output from both boxes. I really appreciated all input and suggestions, and hope the info I provided helps others. phil

6th July 2007, 12:05 AM
The file that I was talking about was /etc/hosts not /var/hosts. Did you check /etc/hosts?

6th July 2007, 12:37 PM
That was a typo. I have two lines in '/etc/hosts/', ' philsfc6.earthlink.net philsfc6' and ' localhost.localdomain localhost'. So far everything seems to be working well; at least I'm not getting any error messages. I'll start adding hosts (my 'fc4' box) and see if doing so has the desired effect. I want to be able to see that box from my fc6 box through 'Places, Network Servers'. The icon appears but, only displayed the file system once. Not sure why tho. Of course I'd really like to know why SELinux is the source of this problem and what can be done about it.

I do have some other concerns but, I guess they're for another thread. Thanks for your help. phil

6th July 2007, 01:18 PM
Just added ' philsfc4.earthlind.net philsfc4' to fc6's '/etc/hosts' file and now i'm able to see my user dir (PhilTR) on fc4 from fc6. Dang! That's definitely progress. Can't see the rest of fc4's file system. That probably is a good thing.

My fc4 box is a dual boot with XP on the second HD. I'm able to navigte to '/mnt/winxp_c' or '/mnt/winxp_d' to see and copy (or using 'xmms' play music, which i could do when I had Win98 on another box) form that HD when I need. It'd be nice to do same from my fc6 boxc. phil

6th July 2007, 03:21 PM
Glad to hear you made some progress and the invalid host address errors went away. :) For the other problems, probably a good idea to post a new thread on it.