Deploying JBoss ON bundle on Windows with agent running as a service under LocalSystem account fails or is incomplete if %temp% variable is used

Solution Verified - Updated

Environment

  • Red Hat JBoss Operations Network (ON) 3.3
  • Microsoft Windows
  • Agent is running as a service using the LocalSystem account
  • JBoss ON bundle recipe or one of the commands or applications it executes uses the environment variable %temp%

Issue

  • Bundle deployments on windows not working or results in partial deployment or installation

  • Bundle executing installation results in missing registry entries

  • Deployment of bundle fails or is incomplete due to:

    The system cannot find the file specified
    

Resolution

This issue is resolved in JBoss ON 3.3 Update-09 (3.3.9) and later.

If you are not able to apply the update, you can workaround this issue by manually creating the necessary LocalSystem account temporary directory C:\Windows\system32\config\systemprofile\AppData\Local\Temp\. For example:

mkdir C:\Windows\system32\config\systemprofile\AppData\Local\Temp\

Root Cause

The service environment variable temp is defined as C:\Windows\system32\config\systemprofile\AppData\Local\Temp\, however, this directory does not exist by default. This will result in a failure if any write request references temp or %temp% without first checking to see if the destination location exists and explicitly creating it.

This issue was reported in This content is not included.Red Hat Bugzilla 1324217.

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.