Windows Agent Job ends in Launch Error with the AgentService log showing error "CreateProcess error=193, %1 is not a valid Win32 application"
search cancel

Windows Agent Job ends in Launch Error with the AgentService log showing error "CreateProcess error=193, %1 is not a valid Win32 application"

book

Article ID: 397785

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

After installing or migrating the Applications Manager Master/local agent or a remote Agent to a Windows server, Jobs running on the Agent goes into a Launch Error.

The AgentService logs for the Agent show the below error:

02:50:16.905 AM_SJ0: AwE-9999
02:50:16.905 AM_SJ0: .AxOptions: NoErrorMsgProperties=false
ErrorMsg: AwE-9999 Internal error
Details: null
java.io.IOException: Cannot run program "D:\AW_HOME/run/pm3778910.sh" (in directory "D:\AW_HOMEun"): CreateProcess error=193, %1 is not a valid Win32 application
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
    at java.base/java.lang.Runtime.exec(Runtime.java:592)
    at java.base/java.lang.Runtime.exec(Runtime.java:416)
    at com.appworx.agent.AppWorx.AppworxStandardAgent$1SpawnJob.B(AppworxStandardAgent.java:440)
    at com.appworx.agent.AbstractSpawnJob.doRun(AbstractSpawnJob.java:102)
    at com.uc4.be.threading.AbstractWorker.run(AbstractWorker.java:367)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
    at java.base/java.lang.ProcessImpl.create(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:498)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:153)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
    ... 7 more

Notice that the parameter file, pm3778910.sh, is generally seen only in Unix/Linux environments. In Windows, the parameter file ends with a .bat file extension.

Environment

Applications Manager 9.4.x and above
Windows OS

Cause

The Agent definition has the OS Type value set to Unix instead of Windows

Resolution

  1. Edit the Agent by selecting from the Java Client, Object Admin > Administration > Agents > Edit problem Agent
  2. In the General Tab, change the OS Type value from UNIX to Windows and Apply/Ok to save and Close