<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error in hostname resolution in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829320#M548741</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Yes nslookup resolves it correctly and that too using files. When I give "localhos" instead of localhost my application tries dns first and then after few steps tries files which I assume is because it was unable to resolve from dns.&lt;BR /&gt;&lt;BR /&gt;Shouldn't that happen for localhost too. Somehow it is also trying to open /etc/environment file. I am not sure why is that ?????.....</description>
    <pubDate>Mon, 24 Jul 2006 10:14:54 GMT</pubDate>
    <dc:creator>Manish_33</dc:creator>
    <dc:date>2006-07-24T10:14:54Z</dc:date>
    <item>
      <title>Error in hostname resolution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829318#M548739</link>
      <description>Hi Friends,&lt;BR /&gt;&lt;BR /&gt;I have an application which takes a hostname as a parameter. My problem is that it is able to resolve hostnames, ip addresses but not "localhost". What I could guess from the output of tusc is that it is trying to resolve hostname from dns while it should have tried /etc/hosts first. My nsswitch.conf has entries like &lt;BR /&gt;passwd:       files&lt;BR /&gt;group:        files&lt;BR /&gt;hosts:        files dns&lt;BR /&gt;services:     files&lt;BR /&gt;networks:     files&lt;BR /&gt;protocols:    files&lt;BR /&gt;rpc:          files&lt;BR /&gt;publickey:    files&lt;BR /&gt;netgroup:     files&lt;BR /&gt;automount:    files&lt;BR /&gt;aliases:      files&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Therefore I expect it to open /usr/lib/libnss_files.1 first instead of libnss_dns.1.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Below is a snapshot of tusc trace. Any suggestions. ???&lt;BR /&gt;&lt;BR /&gt;open("/etc/nsswitch.conf", O_RDONLY, 0666) ............................................................ = 5&lt;BR /&gt;ioctl(5, TCGETA, 0x7a0030a8) .......................................................................... ERR#25 ENOTTY&lt;BR /&gt;read(5, "# \n#   / e t c / n s s w i t c ".., 8192) ................................................... = 401&lt;BR /&gt;read(5, 0x40011020, 8192) ............................................................................. = 0&lt;BR /&gt;close(5) .............................................................................................. = 0&lt;BR /&gt;open("/usr/lib/libnss_dns.1", O_RDONLY, 0) ............................................................ = 5&lt;BR /&gt;fstat(5, 0x7a003018) .................................................................................. = 0&lt;BR /&gt;read(5, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) .................................................... = 128&lt;BR /&gt;lseek(5, 128, SEEK_SET) ............................................................................... = 128&lt;BR /&gt;read(5, "10\0\004\0\0\0( \0\0S ec\0\010\0".., 48) ..................................................... = 48&lt;BR /&gt;read(5, "80\0\0\v\0\0\004\0\0\0\0", 12) ............................................................... = 12</description>
      <pubDate>Mon, 24 Jul 2006 09:47:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829318#M548739</guid>
      <dc:creator>Manish_33</dc:creator>
      <dc:date>2006-07-24T09:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error in hostname resolution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829319#M548740</link>
      <description>Manish,&lt;BR /&gt;&lt;BR /&gt;Please run an nslookup ipaddress-server&lt;BR /&gt;You should see that the resolution was made by the /etc/hosts file.&lt;BR /&gt;&lt;BR /&gt;If this is the case, then the problem must be with the application.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.</description>
      <pubDate>Mon, 24 Jul 2006 10:09:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829319#M548740</guid>
      <dc:creator>Jaime Bolanos Rojas.</dc:creator>
      <dc:date>2006-07-24T10:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error in hostname resolution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829320#M548741</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Yes nslookup resolves it correctly and that too using files. When I give "localhos" instead of localhost my application tries dns first and then after few steps tries files which I assume is because it was unable to resolve from dns.&lt;BR /&gt;&lt;BR /&gt;Shouldn't that happen for localhost too. Somehow it is also trying to open /etc/environment file. I am not sure why is that ?????.....</description>
      <pubDate>Mon, 24 Jul 2006 10:14:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829320#M548741</guid>
      <dc:creator>Manish_33</dc:creator>
      <dc:date>2006-07-24T10:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error in hostname resolution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829321#M548742</link>
      <description>Manish,&lt;BR /&gt;&lt;BR /&gt;Make sure that you have this line in your /etc/hosts file:&lt;BR /&gt;&lt;BR /&gt;127.0.0.1       localhost       loopback&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.</description>
      <pubDate>Mon, 24 Jul 2006 10:18:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829321#M548742</guid>
      <dc:creator>Jaime Bolanos Rojas.</dc:creator>
      <dc:date>2006-07-24T10:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error in hostname resolution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829322#M548743</link>
      <description>/etc/environment is not a standard file so I suspect it was created for/by your application. You may be able to edit it to change your application's behavior. &lt;BR /&gt;&lt;BR /&gt;As a workaround, you should be able to create a DNS localhost entry although that more or less defeats the purpose because localhost should be able to be resolved whether or not a viable network is available.</description>
      <pubDate>Mon, 24 Jul 2006 10:21:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829322#M548743</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-07-24T10:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error in hostname resolution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829323#M548744</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;If you think this issues is resolved you can close this thread and also provide points to the people who have helped.&lt;BR /&gt;You have only given points to 1 out of 33 responses, hpe you understand that people spend their valuable time helping and to by assigning point it shows gratitude for their help even a 1 point is better than not assigning&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;&lt;BR /&gt;HGN&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Jul 2006 10:44:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829323#M548744</guid>
      <dc:creator>HGN</dc:creator>
      <dc:date>2006-07-24T10:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error in hostname resolution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829324#M548745</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  Sorry HGN. I admit my mistake. Thanks everyone for answering. but yet the issue is not resolved :-( that is why i am not closing the thread.</description>
      <pubDate>Tue, 25 Jul 2006 00:09:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-hostname-resolution/m-p/3829324#M548745</guid>
      <dc:creator>Manish_33</dc:creator>
      <dc:date>2006-07-25T00:09:50Z</dc:date>
    </item>
  </channel>
</rss>

