DOCUMENTATION: The nbmail.cmd mail notification -- a mini workshop with troubleshooting tips and details of how to get it working
Modification Type: Supplement
The following are the top reasons why blat and the nbmail.cmd script can fail to run:
3. The blat line in nbmail.cmd is not correctly configured or the syntax has changed in the later versions. Check the README for the version of blat running on the system.
4. The blat.exe command is not on the path or no path was specified in the nbmail.cmd file. If this is the case, then place the blat.exe program in a directory on the path, or add the path before blat.exe in the script.
5. The blat version is greater than 1.84 but no profile was created. If this is the case, then see the blat README for details on profiles.
6. The mail account did not exist on email server. If this is the case, then create the account or specify a valid email address.
7. The mail server required authentication for Simple Mail Transfer Protocol (SMTP), and the account used for Veritas NetBackup (tm) client process is not authorized. If this is the case, then change user account for NetBackup Client Service (The default is local system, make sure this has permission to send mail).
8. The blat command sometimes needs the -ti <n> timeout parameter if there are delays in the system where <n> is in seconds.
9. Command line extensions are not enabled -- The registry key HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions should be set to 0x1.
10. The blat binary is corrupt or incompatible with email system. If this is the case, then download the latest version.
Where to look to see if NetBackup is calling nbmail.cmd:
1. Select Client sends mail on Universal Settings tab under Host Properties > Master Servers in the NetBackup Java GUI or NetBackup Adminstration GUI. The option Server sends mail does not log anything in the bpcd log.
2. Make sure that an email address is configured on the Universal Settings tab.
3. Make sure the call to blat.exe is uncommented in the nbmail.cmd script.
4. Make sure that a directory called bpcd exists in <install_path> \NetBackup\logs on the master server.
7. Run a backup of a directory on the master server.
8. The bpcd log should contain something similar to the following:
<2> bpcd main: BPCD_SEND_MAIL_RQST
<2> bpcd main: mailaddr = firstname.lastname@example.org
<2> bpcd main: subject = Backup on MYMASTER - 0 started
<2> bpcd main: message = Backup on client MYMASTER by root succeeded.
<2> sendViaScript: attempting to send mail
<2> bpcd main: BPCD_DISCONNECT_RQST
If this entry doesn't appear in the log, then nbmail.cmd is not being called and there is a configuration problem within NetBackup itself. If there are entries in the log, but no email is received, then verify whether the email address is correct and valid. If the email address is correct, then the problem lies either with the nbmail.cmd script itself, or with blat.
The later versions of blat (from version 1.82 onwards) use "profiles". The idea is that a user or server and other settings for the mail system are configured in a profile. Then, this is specified when using the command. Refer to TechNote 244258, found below, in the Related Documents section.
So an appropriate change in nbmail.cmd would be to change the blat line as follows:
@blat %3 -s %2 -t %1 -p NetBackup -q
where NetBackup is a profile created in Blat.
When testing blat, remove the -q switch and pipe the output to a file; the above line can be replaced with:
@echo:Testing %1 ,%2 ,%3 >>C:\Testing.txt
<blat> %3 -s %2 -t %1 -p NetBackup>>c:\Testing.txt *** Note the emission of -q switch ***
When testing nbmail.cmd from the command line, it is helpful to use the same account that NetBackup client service is using. This will help highlight any account permission issues that may stop the process from working.