cancel
Showing results for 
Search instead for 
Did you mean: 

bptestbpcd tries to run all ips in /etc/hosts

Sid1987
Level 6
Certified

Hi Guys,

 I made an interesting observation today, My understanding for name to ip and vice-versa is done via chronological order below.

1.) Cache

2.) host file

3.) DNS.

Now if no cache entry resolution looks for host file and the entry which comes first is the resolution. Now i observed if you have an entry which is corrent however is later than the incorrect entry it still works, bptestbpcd didn't pick the ip which comes earlier but is not working, instead it took the ip which comes later in host file and backup is running fine.

So does bptestbpcd checks all entries in host file from top to bottom? My understanding was the entry which comes first in host file is the effecting resolution for the server. Please find snapshot attached and enlighten me.

7 REPLIES 7

Tape_Archived
Moderator
Moderator
   VIP   

Try running ./bpclntcmd -clear_host_cache and share the outpput and hopefully you will see different results now.

@Tape_Archived

Obviously i tried clearing host cache, still bptestbpcd picks the ip which works irrespective its at the top in host file or at bottom. Also if you check telnet it tries with ip which comes first in host file but the moment you do ctrl+c it will telnet to second ip in host file which is connectable. Strange

Marianne
Level 6
Partner    VIP    Accredited Certified

My question:

WHY would anyone add more than one IP address to hosts file?

Honestly, if hosts files are used instead of DNS, it must be managed properly.

Sid1987
Level 6
Certified

I strongly and completely agree, still this behaviour is unexpected for me. Has anyone tested it? I always use to think what comes 1st in host file just like in vlookup that's taken as final value which is prevailing in ping, However telnet and bptestbpcd they seem to try all possible values.

What is OS of client.

I have seen in HPUX, changing hosts file does not make any diffrence. Not sure which file defines the priority for name lookups in HPUX.

I assume same thing in your case, it might still be picking entry from DNS. 

 

Sid1987
Level 6
Certified

No DNS as of now, Its Linux & AIX

Marianne
Level 6
Partner    VIP    Accredited Certified

No idea if this is related to what you are seeing - I found an old TN that mentions ipnodes in addition to hosts file:

To support IPv6 (in NetBackup 7.1), NetBackup 7.0.1+ has changed from using the gethostbyname API to using the getaddrinfo API. On some platforms (see above), the name services switch database that determines gethostbyname behavior (hosts) is different from that of getaddrinfo (ipnodes).

https://www.veritas.com/support/en_US/article.000082070