Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting httpd failed! hostname is wrong?

Status
Not open for further replies.

irbrian

Programmer
Sep 16, 2003
2
US
I first realized there was a problem when logging into GNOME: Before it loads the desktop, it gives me an error saying that the hostname x1-??-??-??-??-?? can't be found, or something like that. (Note: I replaced the rest of the digits with ?? because I'm not sure how safe it is to post MAC addresses online, even if they are bogus, which this one appears to be... read on.)

So, then I [correctly] configured and tried to start the httpd (apache) service. No good: Gives me "httpd failed. The error was: Starting httpd: [FAILED]"

So I followed the advice I found in another recent thread on this forum, suggesting I run "tail -f /var/log/httpd/error_log &" to find out what the error was (I assume).

When I did this, I saw the following error listed multiple times:

"Name or service not known: mod_unique_id: unable to find IPv4 address of "x1-??-??-??-??-??-??-??"
Configuration Failed"

(Note again that I'm using ?? in place of what I actually saw.)

Well, I figured something was up with my NIC, even though I have flawless internet connectivity. I typed "ifconfig eth0" to display my real NIC's info, and discovered that the MAC address is in fact "00:A0:??:??:??:??".

I typed "hostname" to confirm that Linux thinks I'm logging in from X1:??... and sure enough, thats what it says. (The root@X1-??-??-etc should have clued me in, but whatever. I'm a newbie.)

So, what do I do?? It seems Linux thinks my MAC address is somethign entirely different than it is!!

Help Please??
 
Yup, some where along the line, your mac address got entered where your hostname should have gone. Look in /etc/hosts. It should look something like this:

127.0.0.1 localhost localhost.localdomain

192.168.0.1 luvmachine

The first line is for the loopback device and MUST be there. All machines like to call themselves "localhost" and this is where they do it. The second line is the ip address (public or private) of the eth0 device along the the "hostname". Anything on the line after the hostname is an alias.
 
also type hostname and see what the output is. You may need to edit other files as well. FOr example on Redhat you may need to edit the /etc/sysconfig/network file, which has line HOSTNAME= and DOMAINAME=



>---------------------------------------Lawrence Feldman
SR. QA. Engineer SNAP Appliance
lfeldman@snapappliance.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top