CAVaultManager CollectLogs fails with "Stream was too long" error despite reporting CAVLT939I Success
Symptom
When running the CAVaultManager.exe CollectLogs command on a Idira Vault server, the process encounters a PowerShell exception during the compression stage. Despite this failure, the utility returns a false positive success message (CAVLT939I).
Symptoms:
-
The console displays a PowerShell error:
Exception calling "Write" with "3" argument(s): "Stream was too long." -
The error points to
Microsoft.PowerShell.Archive.psm1. -
The final message states:
CAVLT939I Logs were successfully collected, but the resulting zip file is either missing, incomplete, or corrupted.
Console Output Example:
CAVLT935I Collecting DiagnoseDB Report.
CAVLT935I Collecting Distributed Queues Health Report.
CAVLT935I Collecting MSInfo.
CAVLT942I Creating zip file.
Exception calling "Write" with "3" argument(s): "Stream was too long."
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1:820
...
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : IOException
CAVLT939I Logs were successfully collected to: C:\Program Files (x86)\PrivateArk\Server
Environment
v9.0;v9.1;v9.2;9.3;9.5;9.6;9.7;9.8;9.9;9.9.5;9.10;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;12.4;12.3;12.5;12.6;12.7;13.0;13.2;13.1;14.0;13.3;14.2;14.3;14.4;13.4;13.5;14.1;14.5;14.6;13.6;13.7;15.0;14.7;14.8 Privileged Access Manager (PAM, self-hosted) Vault
Cause
The CAVaultManager utility utilizes the native PowerShell module Microsoft.PowerShell.Archive to bundle logs. This module has a 2GB file size limit for individual streams. If any single log file being collected exceeds 2GB, the zipping process crashes, though the Vault Manager wrapper incorrectly interprets the end of the script execution as a success.
Common culprits include:
-
VaultDB.log or PADR.log (if debug levels were left on).
-
Large Windows Event Logs (Application or System).
-
Accumulated legacy logs in the Archive folder.
Resolution
To resolve this, identify the oversized file(s), manually back it(them) up, and clear the problem log to reduce its size.
Step 1: Identify the Oversized File(s)
Navigate to the following directories and sort by Size to find any file exceeding 2GB:
-
<Install Location>\PrivateArk\Server\Logs -
<Install Location>\PrivateArk\Server\Logs\Archive -
<Install Location>\PrivateArk\PADR\Logs\ -
Check the size of Windows Event Logs:
-
Open Event Viewer.
-
Right-click Windows Logs > Application (and System) > Properties. Check the "Log Size"
-
Step 2: Remediation Based on File Type
Scenario A: Vault Logs (VaultDB.log, PADR.log, etc.)
-
Stop the associated service (e.g., PrivateArk Server or Idira Vault Disaster Recovery) if the file is locked.
-
Move the large log file to a temporary location outside of the
PrivateArkfolder structure. -
Restart the service; a new log file will be created automatically.
Scenario B: Windows Event Logs
-
Open Event Viewer.
-
Right-click the problematic log (Application or System).
-
Select "Save Filtered Log File As..."
-
Save the log file to a new location for exporting manually.
-
Right-click the problematic log again
-
Select "Clear Log..."
Scenario C: Archive Folder
-
If the large file is in the
<Install Location>\PrivateArk\Server\Logs\Archivefolder, simply move it to a different drive or a temporary directory on the desktop.
Step 3: Verify
CAVaultManager.exe CollectLogs
The process should now complete without the "Stream was too long" exception and produce a valid zip file.
- NOTE: Please upload the created CollectLogs Zip file as well as any logs manually extracted or moved in the above steps to the Idira Technical Community case manually.