Problem
Java GUI Logging when there is not a NB_INSTALL_PATH will fail to log because of how the variables are set in the setconf.bat file.When the NB_JAV package is installed on a server that already has an instance of NetBackup, the install path is:
INSTALL_PATH=C:\\Program Files\\Veritas\\NetBackup\\java
When the NB_JAV package is installed on a computer that has *no* NetBackup Client or Server package installed, the install path is:
INSTALL_PATH=C:\\Program Files\\Veritas\\java
When the code checks, it does not find the correct path when there is no "NetBackup" install and skips all the logging
if "[%NB_INSTALL_PATH%]"=="[]" goto skip
if NOT EXIST "%NB_INSTALL_PATH%" goto skip
This "skip" marker is located below the logging, so the logging is also skipped:
set nbjLogFileName=jbp.%dyyyy%%dmm%%ddd%%thh%%tmm%%tss%%ths%.log
set logFile=%NB_INSTALL_PATH%\logs\user_ops\nbjlogs\%nbjLogFileName%
:skip
Addtionally, the log directory structure in the default setup does not exist, and would not be created when there is no NetBackup Install: %NB_INSTALL_PATH%\logs\user_ops\nbjlogs\ %nbjLogFileName%
Thus, we must move the skip function when we wish to enable NBJlogs.
Error Message
No error; the logs are simply not generatedCause
A change in how the JAVA GUI is installed is what causes this issue.*Please note that these logs are unaffected and would still need to be enabled on the MASTER for NetBackup Java Console debugging with VERBOSE=5:
Solution
Edit Debug.properties in the %NBJDIR% to ensure these are set (these are defaults):
printcmds=true
printCmdLines=true
debugMask=0x00040000
Edit setconf.bat in the %NBJDIR% directory to replace NB_INSTALL_PATH with INSTALL_PATH variable in specific locations, and add the automatic creation of a "logs" subdirectory to store the NBJ logs.
On, or near, line 88 of setconf.bat, find the line: SET HIDE_LOGGING_ASSISTANT=0
Step 1
Replace:
if "[%NB_INSTALL_PATH%]"=="[]" goto skip
if NOT EXIST "%NB_INSTALL_PATH%" goto skip
With:
if "[%INSTALL_PATH%]"=="[]" goto skip
if NOT EXIST "%INSTALL_PATH%" goto skip
Step 2
Replace:
set nbjLogFileName=jbp.%dyyyy%%dmm%%ddd%%thh%%tmm%%tss%%ths%.log
set logFile=%NB_INSTALL_PATH%\logs\user_ops\nbjlogs\%nbjLogFileName%
:skip
With:
:skip
md "%NBJDIR%\logs" 2>nul
set nbjLogFileName=jbp.%dyyyy%%dmm%%ddd%%thh%%tmm%%tss%%ths%.log
set logFile=%NBJDIR%\logs\%nbjLogFileName%
Note:
As good practice Start the Netbackup Java Console with Administrator privileges by right clicking shortcut & select "Run as Administrator".