Problem
localhost_check fails during nbcheck run at the start of a NetBackup upgrade
Error Messages
Hosts file [<path>] does not exist.
Loopback addresses [<list>] do not exist in hosts file [<path>].
The host name [myhostname] does not resolve to an IP address assigned to a network interface on this host.
The host name [myhostname] does not resolve to an IP address.
The host name [myhostname] does not respond to a ping command.
There is a common footer, which varies by NetBackup version. Either
This test runs for upgrades if the installed NetBackup version is 7.7 or later.
For NetBackup to function properly, the host name [localhost] must resolve to an IP address,
respond to a ping command, and be a network interface on the local system.
Refer to the following article for more details:
https://www.veritas.com/support/en_US/article.100045507
or
This test checks for the existence of loopback addresses in the hosts file. Having loopback addresses [<list>] in the hosts file ensures that they will resolve when DNS servers cannot resolve the hostname localhost.
Cause
To operate successfully, NetBackup processes must be able to connect to each other via the TCP network stack on the host. This is accomplished by making connections to the 'localhost' hostname to ensure the connections are via the loopback network interface. A failure during this check indicates that those communications are not currently successful and the host configuration should be corrected before upgrading NetBackup.
Solution
Ensure TCP connections can be made to the hostname 'localhost'.
- Ensure that the name services configuration on the host can resolve the hostname 'localhost' to an IP address. It must resolve to an IP address on the IPv4 127.0.0/24 subnet, and may optionally resolve to the IPv6 address '::1'. On Windows it may also resolve to the actual hostname.
bpclntcmd -hn localhost
host localhost: myhost.com at ::1
host localhost: myhost.com at 127.0.0.1
aliases: localhost myhost.com ::1 127.0.0.1
- Ensure that the resolved IP address is assigned to a network interface that is up and responding to network traffic.
ping localhost
Reply from 127.0.0.1: time<1ms
Reply from 127.0.0.1: time<1ms
Reply from 127.0.0.1: time<1ms
- Ensure the resolved IP address is assigned to a network address on this host, and not to an IP address that is plumbed on some other host.
bpclntcmd -is_local_host localhost
localhost is a local host
- In case remote DNS servers are unavailable, be sure that the hostname 'localhost' can be resolved to appropriate IPv4 and IPv6 addresses from the local hosts file,
UNIX/Linux:
$ grep localhost /etc/hosts
127.0.0.1 localhost localhost4 localhost.localdomain
::1 localhost localhost6 localhost6.localdomain6
Windows:
C:\> findstr localhost "C:\Windows\System32\drivers\etc\hosts"
127.0.0.1 localhost
::1 localhost
- Ensure that the local name services is configured to utilize the local hosts file. On Windows, it does by default, on non-Windows it must be configured.
AIX: (must include 'local', ideally before other entries)
$ grep ^hosts /etc/netsvc.conf
hosts = local, bind4
HP-UX/Linux/Solaris: (must include 'files', ideally before other entries)
$ grep ^hosts /etc/nsswitch.conf
hosts: files dns myhostname
- Ensure the files used to perform local name resolution are readable by all users on the host, especially the NetBackup 9.1+ SERVICE_USER, and on NetBackup 8.1+ primary servers also the WEBSVC_USER. The files must be readable by all/other users.
AIX:
$ ls -ld /etc/netsvc.conf /etc/hosts
-rw-rw-r-- 1 root system 368 Aug 23 11:59 /etc/hosts
-rw-r--r-- 1 root system 4548 Jul 18 2017 /etc/netsvc.conf
HP-UX/Linux/Solaris: (follow symbolic links to the terminal files)
$ ls -ld /etc/nsswitch.conf /etc/hosts /etc/authselect/nsswitch.conf
-rw-r--r-- 1 root root 3069 Nov 3 13:12 /etc/authselect/nsswitch.conf
-rw-r--r-- 1 root root 3659 Nov 7 14:16 /etc/hosts
lrwxrwxrwx 1 root root 29 Nov 3 13:12 /etc/nsswitch.conf -> /etc/authselect/nsswitch.conf
- In one of the cases it was observed that bpclntcmd.exe was corrupted and the size for the same was 0 bytes. If this is the case, delete the current 0 byte bpclntcmd binary and have the customer copy the binary from other server (if any) running on the exact same version to the faulty one.
The ping
command is part of the operating system. The bpclntcmd
is part of the NetBackup distribution and is located in the following directory:
UNIX/Linux: /usr/openv/netbackup/bin
Windows: <install_dir>\Veritas\NetBackup\bin
If any of the checks above fail, the operating system (O/S) configuration on the host is not in the expected state. Consult the O/S documentation to appropriately correct either:
- The name resolution configuration used by the host. This may involve changes to the hosts file or name services configuration specific to the operating system and the site.
- The IP address assignments for the network interfaces on the host.
- The state of the network interface; is it 'UP' or enabled, and also operational.