PVWA - Error "Process ConfigureInstance.exe failed with exit code -3" when running PVWARegisterComponent.ps1 during PVWA upgrade
Symptom
When upgrading an existing PVWA instance using scripts, while running Registration script step (PVWARegisterComponent.ps1), the following errors are thrown in the PowerShell console:
Running process [ConfigureInstance.exe] from path [C:\CyberArk\Password Vault Web Access\Env] with arguments ["ConfigureInstanceInput.json" ].
Process ConfigureInstance.exe failed with exit code -3
The following step had failed: RunPVWARegisterComponent. Please see documentation in the log
finish execute step Run the PVWA Register Component Script
===================================================================
*******************************************************************
The following Step failed : RunPVWARegisterComponent
*******************************************************************
{
"isSucceeded": 1,
"errorData": "Step Run the PVWA Register Component Script Skipping prerequisites check.\n The following Step failed : RunPVWARegisterComponent",
"logPath": "C:\\CYBR_Files\\Password Vault Web Access-Rls-v14.2.1\\InstallationAutomation\\Registration\\Script.log"
Checking the Script.log, you will see following error:
2025-01-31 22:22:11 ERROR: Process ConfigureInstance.exe failed with exit code -3
Checking the log at "C:\CyberArk\Password Vault Web Access\Env\Log\ConfigureInstance.log", you might see following errors:
2025-01-31 22:22:10,101 ERROR - CNFI014 Failed to save to file 'C:\Windows\Sysnative\inetsrv\config\applicationHost.config'. Error details: System.IO.IOException: The process cannot access the file 'C:\Windows\Sysnative\inetsrv\config\applicationHost.config' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlDocument.Save(String filename)
at CyberArk.PVWAInstall.Infra.Utils.FileHandler.SaveXmlFile(XmlDocument xmlDoc)
at ConfigureInstance.ApplicationHostConfig.ApplicationHostConfigManager.SaveConfigFile()
Upgrade Document Reference:
https://docs.cyberark.com/pam-self-hosted/latest/en/Content/PAS%20INST/PVWA-upgrade.htm?tocpath=Installation%7CUpgrade%7CUpgrade%20PVWA%7C_____3#Registration
Environment
14.2 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access
PVWA
Cause
The error indicated an issue accessing/saving the file because the file was locked/in use by another process. IIS might not properly release the file lock during the upgrade.
Resolution
Re-run the registration script or re-run the setup.exe and select Repair.
If the issue persists, try stopping IIS (iisreset /stop) and re-run the registration script or re-run the setup.exe and select Repair.