CAVaultManager CollectLogs fails with "Stream was too long" error despite reporting CAVLT939I Success

CAVaultManager CollectLogs fails with "Stream was too long" error despite reporting CAVLT939I Success

141
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 15:58 PM


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:

  1. <Install Location>\PrivateArk\Server\Logs

  2. <Install Location>\PrivateArk\Server\Logs\Archive

  3. <Install Location>\PrivateArk\PADR\Logs\

  4. 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.)

  1. Stop the associated service (e.g., PrivateArk Server or Idira Vault Disaster Recovery) if the file is locked.

  2. Move the large log file to a temporary location outside of the PrivateArk folder structure.

  3. Restart the service; a new log file will be created automatically.

Scenario B: Windows Event Logs

  1. Open Event Viewer.

  2. Right-click the problematic log (Application or System).

  3. Select "Save Filtered Log File As..."

  4. Save the log file to a new location for exporting manually.

  5. Right-click the problematic log again

  6. Select "Clear Log..."

Scenario C: Archive Folder

  1. If the large file is in the <Install Location>\PrivateArk\Server\Logs\Archive folder, 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.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000015TuCAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail