<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Try flushing DNS cache:<div><br></div><div><span class="Apple-style-span" style="font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; color: rgb(17, 17, 17); font-size: 12px; line-height: 18px; ">/etc/init.d/nscd restart</span></div><div><font class="Apple-style-span" color="#111111" face="Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><br></span></font><div><div>On Apr 8, 2011, at 3:31 PM, Johan Martinez wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">This is working fine on another CentOS system. This particular install where host command is failing is trimmed down install using kickstart file. It is working on a system where install is default 'Server non-GUI', option given during interactive CD install. I guess this has to do with some missing package. Any clues??<div>
<br></div><div>jM.<br><br><div class="gmail_quote">On Fri, Apr 8, 2011 at 2:01 PM, John R Pierce <span dir="ltr"><<a href="mailto:pierce@hogranch.com">pierce@hogranch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 04/08/11 11:24 AM, Johan Martinez wrote:<br>
> I have modified /etc/hosts file with IP address and hostname entries.<br>
> However, host command is returning 'Host <a href="http://vhost1.example.com/" target="_blank">vhost1.example.com</a><br>
</div>> <<a href="http://vhost1.example.com/" target="_blank">http://vhost1.example.com</a>> not found: 3(NXDOMAIN)'. Also, apache is<br>
<div class="im">> returning error on start as '[error] (EAI 2)Name or service not known:<br>
> Could not resolve host name <a href="http://vhost1.example.com/" target="_blank">vhost1.example.com</a><br>
</div>> <<a href="http://vhost1.example.com/" target="_blank">http://vhost1.example.com</a>> -- ignoring!' . The ssh worked fine and<br>
<div class="im">> resolved the hostname correctly (ssh from same system to itself - just<br>
> for test). Am I missing something here? I thought /etc/hosts will be<br>
> referred for all lookups. Any help??<br>
<br>
</div>the 'hosts' command (as well as dig, and nslookup) go directly to DNS,<br>
they do not look at /etc/hosts or nsswitch.conf for that matter.<br>
Apache may well go to DNS also, since your local /etc/hosts file is not<br>
recognized by any systems outside the localhost, and apache IS a server.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>http://lists.centos.org/mailman/listinfo/centos<br></blockquote></div><br></div></body></html>