Forum Discussion

Sid1987's avatar
Sid1987
Level 6
8 years ago

bptestbpcd tries to run all ips in /etc/hosts

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

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

    • Sid1987's avatar
      Sid1987
      Level 6

      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's avatar
        Marianne
        Level 6

        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.