LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-27-2002, 06:25 PM   #1
rednex269
LQ Newbie
 
Registered: Nov 2002
Location: Texas
Distribution: Redhat Linux 8.0
Posts: 18

Rep: Reputation: 0
Question DHCP - Host Name


I connect my linux machine via Netgear RT314.. I obtain a IP address from my ISP via DHCP... I currently have my 3 Machines obtain a IP Address from my Router via DHCP...

When logging into my Linux Box (Redhat 8.0) I get a error about the machine not able to obtain a valid host name... I have the option of try again, or login anyway.. Of course, Login Anyway only will work..

I can access the outside world (internet) and can access each others files via Samba, but apache doesn't like to run becuase of this problem..

What are my options?? I would like to keep the names of my machines if possible...
 
Old 11-27-2002, 06:45 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
If the machine is having its hostname overwritten by dhclient (which I'm still wondering why redhat switched to, and you're going to be a little pressed to find many people here that know it that well.), there has to be an option you can pass to dhclient to get it to NOT overwrite the hostname, or you can be a cheeky bugger and just overwrite the hostname BACK to whatever you want by calling "/bin/hostname" in /etc/rc.d/rc.local, as long as that doesn't chuckle up the connection to your isp.

In /etc/sysconfig/network-scripts, there is the startup script for your NIC, probably ifcg-eth0 or somesuch, you can page through that for options to pass dhclient to tell it to stop over-writing your hostname, or last you could do away with the normal redhat if-up script entirely and just bring up your card with a call to dhclient manually in /etc/rc.d/rc.local and check the man page on dhclient to find out what little flag to use to get it to stop forcefeeding you a hostname.

Cheers,

Finegan
 
Old 11-27-2002, 09:50 PM   #3
rednex269
LQ Newbie
 
Registered: Nov 2002
Location: Texas
Distribution: Redhat Linux 8.0
Posts: 18

Original Poster
Rep: Reputation: 0
When attempting to start the Apache Webserver.. I receive

Executing /etc/rc.d/init.d/httpd start ..

Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[FAILED]
-----------------------------------------------
in the /var/log/httpd/error_log:

[Wed Nov 27 21:49:01 2002] [alert] (22002)Name or service not known: mod_unique_id: unable to find IPv4 address of "rednex269"
Configuration Failed

------------------
Rememebr, I am a newbie, I am still learning how to work with Linux

 
Old 11-28-2002, 02:37 AM   #4
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Its expecting a fully qualified domain name, like rednex269.com or rednex269.somedomain.com You can set with in /etc/sysconfig/network if I remember RH right.

Cheers,

Finegan
 
Old 11-28-2002, 09:06 AM   #5
rednex269
LQ Newbie
 
Registered: Nov 2002
Location: Texas
Distribution: Redhat Linux 8.0
Posts: 18

Original Poster
Rep: Reputation: 0
Will this conflict with my ISP's DNS entry for my IP address?

Thanks

JS
 
Old 11-28-2002, 09:23 AM   #6
rednex269
LQ Newbie
 
Registered: Nov 2002
Location: Texas
Distribution: Redhat Linux 8.0
Posts: 18

Original Poster
Rep: Reputation: 0
Hrmm.. When attempting to start HTTPD service... I receive in the error_log

[Thu Nov 28 09:12:56 2002] [alert] (22002)Name or service not known: mod_unique_id: unable to find IPv4 address of "rednex269.cox-interne$
Configuration Failed
 
Old 11-28-2002, 11:14 AM   #7
bladewalker
Member
 
Registered: Nov 2002
Location: UK
Distribution: Redhat 8
Posts: 30

Rep: Reputation: 15
I had this problem - it arises on Redhat 8 because you have specified a hostname of something for your machine -

Eg I assigned the name irongate to my machine -

This means I get the prompt something like

irongate root@irongate>

Normally your machine is assigned localhost.localdomain as its name, it is complaining about the fact you have not specified the hostname or a domain name correctly, Redhat seem to favor their visual xtools over the host file so it is a pain to change it all around! - the easiest way is to log into xwindows and go to redhat icon->server settings->network (or something similar) this will bring up a gui for network administration - search the tabs to locate the one where it asks you for host entries - it should read something like:

127.0.0.1 localhost.localdomain localhost 'your defined hostname'

If it reads anything else edit the entries until your other hostname is as defined above - then go to the last tab and in the hostname section type:

localhost.localdomain

Now your computer belives it is called localhost it has an alias of whatever you specified and the loopback address 127.0.0.1 is intact - whew! Now reboot your machine and you should find no errors....

Apache is reporting a different problem - apache is trying to use your defined hostname as the FQDN for your webserver - it wants an address like www.mybloodycomp.com and all your giving it is mybloodycomp ! I am not sure how to rectify this one - I have been told it is in the httpd.conf file you can specify what Apache should use - assign it something like mybloodycomp.lan this way you are unlikely to get any errors on your LAN - if you are going to create a public web server the address you specify must be your domain name and you reroute the A records of your domain name to point to your server so people can find it!!

Hope this helps - its a bit vague in places because I havent opened up this can of worms since I put it to bed...
 
Old 07-16-2003, 11:07 AM   #8
vivshank
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
The solution :)

Had the same problem and managed to solve it after breaking my head. You will wanna to cos its so straightforward

Continuing with bladewalker's example:

if you try pinging irongate you wont get a response.
no need to change your netwk settings - i like calling my box okcomputer. And was getting the same error in my apache logs.

add the name of your machine to the first line in your /etc/hosts

mine reads:
127.0.0.1 localhost localhost.localdomain okcomputer

I can ping okcomputer and nicely run apache too
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP not able to resolve host rmcastil Linux - Newbie 8 08-10-2005 06:31 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 05:18 AM
Apache Virtual Host problem - DNS or DHCP issue? costrevs Linux - Software 16 03-23-2005 07:50 AM
DHCP: Host name lookup failure kaloyer *BSD 2 07-08-2004 11:01 AM
DHCP host (not) resolving trough DNS jamezdin Linux - Networking 3 05-30-2004 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration