AMAgent.exe crashes immediately after starting

Version 1

    Verified Product Versions

    AppSense Application Manager 10.0AppSense Application Manager 8.9AppSense Application Manager 8.8AppSense Application Manager 8.7


    If you find that AMAgent.exe is not running, check the event logs to see if a crash (Application Error) has been reported.

    You may find the following error:

    Faulting application name: AMAgent.exe, version:, time stamp: 0x585ce94f
    Faulting module name: MSVCP140.dll, version: 14.0.24210.0, time stamp: 0x575a4ceb
    Exception code: 0xc0000005
    Fault offset: 0x00000000000086ac
    Faulting process id: 0xb24
    Faulting application start time: 0x01d27c78e14a01c9
    Faulting application path: C:\Program Files\AppSense\Application Manager\Agent\AMAgent.exe
    Faulting module path: C:\Windows\system32\MSVCP140.dll
    Report Id: 217d9549-e86c-11e6-b134-005056931868



    The next step is to enable AM logging, reproduce the issue and look for the following log lines (at the bottom of the log):

    T004164 15565420 10:48:50.585 [AppSense::EcaEngine::SessionPlugins::IsValidPlugin] Found valid plugin [C:\Program Files\AppSense\Application Manager\Agent\Plugins\AMAppPack\CommsServerPlugin.dll]
    T004164 15565420 10:48:50.588 [WebEventsCallback::WebEventsCallback] [ENTER]
    T004164 15565420 10:48:50.588 [WebEventsCallback::WebEventsCallback] [EXIT]
    T004164 15565420 10:48:50.588 [UcaCommsServerPlugin::UcaCommsServerPlugin] [ENTER]
    T004164 15565420 10:48:50.588 [UcaCommsServerPlugin::UcaCommsServerPlugin] [EXIT]
    T004164 15565420 10:48:50.588 [UcaCommsServerPlugin::OnLoad] [ENTER]
    T004164 15565420 10:48:50.588 [UcaCommsServerPlugin::OnLoad] OnLoad 4294967293
    T004164 15565420 10:48:50.588 [UcaCommsServerPlugin::StartBrowserCommsServer] [ENTER]
    T004164 15565420 10:48:50.588 [WebEventsServer::WebEventsServer] [ENTER]
    T004164 15565436 10:48:50.599 [WebEventsServer::WebEventsServer] [EXCEPTION EXIT]
    T004164 15565436 10:48:50.600 [UcaCommsServerPlugin::StartBrowserCommsServer] [EXCEPTION EXIT]

    If you see the above log lines and event (error) then there will more than likely be a clash over TCP ports. Application Manager uses websockets as part of Browser Control to communicate with AMAgent.exe. The port this communication occurs over defaults to 3000 but can be change via the custom setting BrowserCommsPort. If you look (using netstat -anb) there will be another be another piece of software on your machine that utilizes the same TCP port.

    The solution is to use the custom setting (in your AM configuration) called BrowserCommsPort. Set this value to a port number that is not in use, again the netstat command can be useful to identify a free TCP port. More information on custom settings can be found in AppSense Application Manager Product Guide.