Operating System - HP-UX
1752778 Members
5931 Online
108789 Solutions
New Discussion юеВ

Re: Name resolution problem from DNS server

 
trilokpvp
Frequent Advisor

Name resolution problem from DNS server

Hi,

Facing name resolution problem in my hp unix 11.11 server. By this name resolution problem i am not able to connect HP openview Backup manager. Pls suggest to solve the issue. we are having Windows DNS Server and we added the entries in hosts file.

Regards
Trilok
12 REPLIES 12
Bill Hassell
Honored Contributor

Re: Name resolution problem from DNS server

The /etc/hosts file will have no effect unless you have created the file /etc/nsswitch.conf. Start by copying this file:

cp /etc/nsswitch.files /etc/nsswitch.conf

Change the hosts line and add ipdnodes like this:

hosts: files [NOTFOUND=continue UNAVAIL=continue] dns
ipnodes: files [NOTFOUND=return] dns

Now your /etc/hosts file will be used first, then DNS. Now the above steps would not be needed if your DNS server was properly configured. Many Windows-based DNS servers never add the reverse lookup record which is needed for proper network security.

To verify how each hostname is found, use the nsquery command:

nsquery hosts simeHostname
nsquery hosts 12.34.56.78

The first form searches for the hostname, while the second does a reverse name lookup. Both forms must resolve correctly.


Bill Hassell, sysadmin
trilokpvp
Frequent Advisor

Re: Name resolution problem from DNS server

Hi

Before that hp openview is working fine, form last few days we getting the error message "NO VALID HOSTNAME FOUND" No changes done in server side.

Can u suggest how to solve the issue without using DNS.

There is no nsswitch.conf file in /etc folder

Hostname is asterix, Hp openview cell manager name is asterix.testcorp.com. HP openview is not resolving the name asterix.testcorp.com

when i try nslookup with hostname and ip address it is replaying back.

root:asterix:/etc>nslookup 192.168.70.125
*** Can't find server name for address 192.168.70.90: Non-existent domain
Name Server: alpha.testcorp.com
Address: 192.168.70.50

Trying DNS
Name: asterix.testcorp.com
Address: 192.168.70.125

root:asterix:/etc>nslookup asterix.testcorp.com
*** Can't find server name for address 192.168.70.90: Non-existent domain
Name Server: alpha.testcorp.com
Address: 192.168.70.50

Trying DNS
Name: asterix.testcorp.com
Address: 192.168.70.125
Avinash20
Honored Contributor

Re: Name resolution problem from DNS server

HP openview is not resolving the name asterix.testcorp.com

root:asterix:/etc>nslookup asterix.testcorp.com
*** Can't find server name for address 192.168.70.90: Non-existent domain
Name Server: alpha.testcorp.com
Address: 192.168.70.50

Trying DNS
Name: asterix.testcorp.com
Address: 192.168.70.125 <<==

The resolution is successful via DNS.

You could add the same IP address to hostname in /etc/hosts for faster name resolution

192.168.70.50 asterix.testcorp.com asterix

Also have the nsswitch.conf as stated above, which I believe you would have already done.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
trilokpvp
Frequent Advisor

Re: Name resolution problem from DNS server

Hi

I had already added the hostname in /etc/hosts

# 192.168.70.125 asterix
# 192.168.70.125 asterix.testcorp.com

192.168.70.125 asterix asterix.testcorp.com
# 192.168.70.125 asterix asterix.test.com

You mention that i have to add the entry as 192.168.70.50 asterix.testcorp.com asterix.
The asterix server ip address is 192.168.70.125, DNS server ip address 192.168.70.50. Which ip address i have to add in hosts file.
Steven E. Protter
Exalted Contributor

Re: Name resolution problem from DNS server

Shalom,

For the backup manager to work via DNS, all hostnames must be correct in the DNS server. If you don't have control of that and follow Bill's steps then you can only impact the configuration of the local system.

The HP openview backup system, if not the same host is going to need this information as well.

You may need to consult the openview documentation to see if this configuration is supported.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Emil Velez
Honored Contributor

Re: Name resolution problem from DNS server

On a HPUX system

IF DNS is configured the system uses DNS
if dns is not configured as well as NIS then the system uses the /etc/hosts file

if possible you want to have the local hosts file with a full hostname and a short hostname of the local box and all other boxes it directly works with.

15.15.15.9 host1.abc.net host1

Now if you want to you can use the /etc/host file for resolution first and then use DNS if the /etc/hosts file does not have the IP. THis makes your system quite efficient with hostname lookups.

the file that does that is /etc/nsswitch.conf
IN that file put a entry like


hosts: files [ NOTFOUND=CONTINUE ] dns

This entry will say to use /etc/hosts first then failover to dns. the nsswitch file is the only situation where hostname resolution does a failover.

Bill Hassell
Honored Contributor

Re: Name resolution problem from DNS server

Because you do not have /etc/nsswitch.conf, but you do have /etc/resolv.conf, the /etc/hosts file will always be ignored. To stop using DNS, you must rename or remove the file /etc/resolv.conf file. Then, /etc/hosts will work as you expect. You can use nslookup but nsquery is a bit easier to understand.


Bill Hassell, sysadmin
trilokpvp
Frequent Advisor

Re: Name resolution problem from DNS server

Hi

HP openview package is working fine upto last week, from last week we are getting error message "No valid hostname found". Hp openview is running in same server. We checked with HP openview team, they confirmed that HP openview services are up and running only problem with name resolution in server.

When i try to modify the entries in resolv.conf file, unable to save, its a read only file.

Any one pls suggest how to resolve the name resolution. I need Hp openview packup to look for asterix.testcorp.com.

sujit kumar singh
Honored Contributor

Re: Name resolution problem from DNS server

not able to save /etc/resolv.conf -- i assume you should have root access to edit and save.
check the permissions of /etc/resolv.conf
#ll /etc/resolv.conf
#ll /etc/nsswitch.conf
please post also
#cat /etc/resolv.conf
#cat /etc/nsswitch.conf
#cat /etc/hosts
#netstat -nr
#ping
#ping
#traceroute
#traceruote
just do an nslookup and see which DNS server it chooses for Name Resoltion.
regards
sujit