NetWorker: How to Configure and Troubleshoot NetWorker Name Caching
Summary: This Article is part of a series which discusses communications troubleshooting in NetWorker. This Article provides detail on NetWorker's internal process name resolution cache and how it fits into the workflow. ...
Instructions
All NetWorker hosts maintain this internal name cache for all major daemons - every host type, including clients, cache successfully-resolved names in nsrexecd, and the server's nsrd, nsmmdbd, and nsrjobd do as well.
When to consider name cache
- When name resolution appears to be incorrect or incomplete as it regards IP:name associations
- Where name resolution cache is taking too long too long for binaries to populate
Incorrect or missing entries: Reporting name cache
The following commands dump the current cache for any process to the daemon log, flush, or flush / immediate re-resolve them respectively, as wanted:
dbgcommand -n nsrexecd PrintDnsCache=1
dbgcommand -n nsrexecd FlushDnsCache=1
dbgcommand -n nsrexecd FlushDnsCache=9
This causes the daemon in question to report messages for each host in cache, in the format:
<nsr_daemon> NSR notice hostname: <hostname>, address: <ip_address>, ai_flags: 0x0002, family: inet, protocol: tcp
<nsr_daemon> NSR notice DNS_II: hostname: <ip_address>, status: STATUS_OK, head: <hostname>, TTL: 0 secs
<nsr_daemon> NSR notice CLIENT_CACHE: hostname: <hostname_variation>, status: STATUS_OK, head: <hostname>, TTL: 0 secs
Long population times: Extending cache lifetime
Problematic DNS can cause extreme delays when binaries attempt to cache all required hosts to avoid having to periodically repopulate upon demand. Check the daemon.raw on the affected host for messages similar to:
<nsr_binary> NSR notice Populating of DNS cache took <number> secs
Linux / UNIX: /nsr/logs/daemon.raw
Windows: C:\Program Files\EMC NetWorker\nsr\logs\daemon.raw
NetWorker: How to use nsr_render_log
If these actions take 60 seconds or more, it may be beneficial to raise the cache lifetime. Be careful if IP addresses are likely to change in this environment frequently; however, even with DHCP, leases may be assigned to ensure that hosts receive the same IPs from a central authority.
The internal cache lifetime can be set in each NetWorker hosts' nsrla database using nsradmin:
Linux / UNIX
printf ". type: nsrla\nshow positive DNS cache TTL; negative DNS cache TTL\nprint\n" | nsradmin -p nsrexec
Windows
(echo . type: nsrla & echo show positive DNS cache TTL; negative DNS cache TTL & echo print) | nsradmin -p nsrexec
This is set to 30 minutes by default (1800 seconds):
positive DNS cache TTL: 1800;
negative DNS cache TTL: 1800;
This value controls how long before NetWorker deliberately purges the process cache in favor of updated information from the next layers sequentially. As such, raising it is appropriate for environments where DNS lookup is slow, but DNS addressing is relatively static (DHCP leases, or static addressing). Conversely, lower values may be desirable for environments with frequently-changing addresses.
For static environments where DNS may be a performance drag, consider a value of 86400 (1 day) to prevent needless lookups each half hour. A restart is required for this change to take effect.
Linux / UNIX
printf ". type: nsrla\nupd positive DNS cache TTL: 86400\nupd negative DNS cache TTL: 86400\n" | nsradmin -p nsrexec
Windows
(echo . type: nsrla & echo upd positive DNS cache TTL: 86400 & echo upd negative DNS cache TTL: 86400) | nsradmin -p nsrexec