Web Hosting Talk


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Apache failure: unable to find IPv4 address?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)

 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-23-2006, 12:34 PM
ElricM ElricM is offline
View Beta Profile
Newbie
 
Join Date: May 2005
Posts: 19
Apache failure: unable to find IPv4 address?

I've been getting the following error periodically I presume when Apache tries to restart:


[alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "<my server>"


The result is Apache fails to startup and all my domains are down until I notice the problem (or someone emails me). Happened again after midnight, I didn't notice until 7am. I tried to compensate with a Webmin service monitor but that doesn't work.

Can anyone tell me why this problem occurs and what I can do about it?

System is RHEL3 (all errata/packages up to date) and Plesk 7.5.3

Reply With Quote
Sponsored Links
  #2  
Old 01-23-2006, 01:00 PM
FirmbIT FirmbIT is offline
View Beta Profile
Web Hosting Evangelist
 
Join Date: Oct 2005
Posts: 515
What do you have in your /etc/hosts file currently?:

cat /etc/hosts

__________________
FirmbIT | Linux IT Consultants
Server Management :: Server Security :: Systems Administration
Call Sales :: 1-877-629-3086

Reply With Quote
  #3  
Old 01-23-2006, 02:52 PM
ElricM ElricM is offline
View Beta Profile
Newbie
 
Join Date: May 2005
Posts: 19
Oh oh... only localhost:

127.0.0.1 localhost.localdomain localhost

I have 2 IP addresses on the machine. Do I need to put them both in there? Same for all the domains? As you can tell, I'm very new to linux.

Is it good enough to just list the server?

eg,

127.0.0.1 localhost.localdomain localhost
111.222.333.1 hostname hostname
111.222.333.2 hostname hostname


Last edited by ElricM; 01-23-2006 at 02:58 PM.
Reply With Quote
Sponsored Links
  #4  
Old 01-23-2006, 02:59 PM
FirmbIT FirmbIT is offline
View Beta Profile
Web Hosting Evangelist
 
Join Date: Oct 2005
Posts: 515
You should only have 2 lines listed. One of them should be 127.0.0.1 and to the right of it should be localhost. The second line should have your servers IP address and to the right of it should be your servers hostname beside your servers full hostname + domainname (example localhost.domain.com and hostname).

To find out your hostname type hostname in shell.

When done editing, save the file and restart apache.

__________________
FirmbIT | Linux IT Consultants
Server Management :: Server Security :: Systems Administration
Call Sales :: 1-877-629-3086

Reply With Quote
  #5  
Old 01-23-2006, 03:29 PM
ElricM ElricM is offline
View Beta Profile
Newbie
 
Join Date: May 2005
Posts: 19
Thanks very much for the reply.

Reply With Quote
  #6  
Old 08-13-2007, 01:34 AM
johnc7 johnc7 is offline
View Beta Profile
New Member
 
Join Date: Aug 2007
Posts: 1
Cause?

I was having a similar problem on an older Fedora Core 3 (Linux version 2.6.12-1.1381_FC3) box. Curious as to why this would suddenly become a problem after not having a second /etc/hosts file entry for the hostname since the machine was first online (years ago). Seems unusual.

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement: