Is a matching entry in /etc/hosts required for hostname?

Posted by JohnWoltman on Server Fault See other posts from Server Fault or by JohnWoltman
Published on 2010-05-06T19:43:47Z Indexed on 2010/05/06 19:48 UTC
Read the original article Hit count: 294

Filed under:
|
|

I was installing a Tomcat webapp that refused to work until I stumbled on someone else's issue with an unrelated product. The solution was to add the machine's name to /etc/hosts, to match the name returned by hostname. Is this required for general Linux networking to function correctly?

My webapp is running in a virtual machine so that I can test the webapp, and I don't normally bother with the /etc/hosts file on VMs. I just shook my fist and cursed Tomcat and webapp's behavior. I read http://serverfault.com/questions/118823, but that doesn't say if it's required or not.

© Server Fault or respective owner

Related posts about hostname

Related posts about hosts