Apache not starting properly -- "unable to gethostbyname"
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Apache not starting properly -- "unable to gethostbyname"
Hello,
I use Linux (SuSE 8.1) on my home computer to develop a personal Web site. After a change in ISPs (I changed from DSL to a major cable provider), I've been having some difficulty getting Apache up and running. Whenever I try to start Apache, I get a message like this in the error log:
[Mon Apr 19 19:37:33 2004] [alert] mod_unique_id: unable to
gethostbyname("x1-6-00-03-47-39-f7-ad")
and Apache doesn't start.
I've noticed that this strange name ("x1-6-00-03-47-39-f7-ad") has shown up elsewhere, such as my default command line prompt, but I haven't been able to change it to something more appetizing to Apache. I've looked at httpd.conf and tried setting ServerName to 127.0.0.1 (i.e. localhost) rather than a specific host name, without any luck.
I'd appreciate any advice anyone may have in resolving this.
That thing is either written to your /etc/hostname or assigned by the dhcp client.
Either way, hostname of your computer should be resolvable; there might be some problem with the domain search patch in /etc/resolv.conf.
Other way to fix the problem is to put a proper line to /etc/hosts, something like
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.