NetBackup IT Analytics - Error for nbdevquery on Windows Data Collector running as Local service on NetBackup Primary server
Problem
When the ITA Data Collector is installed with NetBackup as a Local System account and C:\Program Files\Veritas\NetBackup\logs\mklogdir.bat is run, the Test connection, Backup policies and other probes running commands present under C:\Program Files\Veritas\NetBackup\bin\admincmd folder will fail. These commands need access to C:\Program Files\Veritas\NetBackup\logs to write their execution logs. These commands run as aptareagent Local System account and do not have the permission and thus fails.
Note: Data Collector from NetBackup version above 10.4 is always installed as local service.
Error Message
Error for nbdevquery : ERR RAW: nbdevquery: terminating - cannot open debug file: Input/output error (5)
Cause
The commands require access to C:\Program Files\Veritas\NetBackup\logs to write their execution logs. However, when executed by the aptareagent as a local service, they fail due to insufficient permission.
Solution
- Open Command Prompt as Administrator.
- Run the following command to retrieve the Service SID for aptareagent:
sc showsid aptareagent
Example:
- Copy the SERVICE SID value from the output.
- Grant the required permissions to the ..\NetBackup\logs directory by running the following command:
icacls "<NETBACKUP_INSTALL_PATH>\NetBackup\logs" /grant:r *<SERVICE_SID_VALUE>:(OI)(CI)(F) /T /Q
Example:
Note: Replace <NETBACKUP_INSTALL_PATH> with your NetBackup installation path and <SERVICE_SID_VALUE> with the copied Service SID)