Inventory Task fails when it is run against a client machine (in this example, it was a Linux RedHat machine):
An unknown exception was thrown on server side.
Failed to find the task handler.
The NS logs show that the Task failed:
Task instance is completed: 'Run Linux Inventory' (ee9e80c8-2679-4a8a-8efa-a4dd1cb8c47e, 7c441962-d44f-450f-bf88-a8d8bd1af6be), started at 02/02/2024 15:12:28, status=Failed, total time=00:00:04.5280762
-----------------------------------------------------------------------------------------------------
Date: 2/2/2024 3:12:32 PM, Tick Count: 928094109 (10.17:48:14.1090000), Size: 433 B
Process: AtrsHost (24864), Thread ID: 111, Module: AtrsHost.exe
Priority: 4, Source: ServerTaskExecutionInstance
If you run again the Inventory task and collect the Task Server agent logs and Linux agent logs, you may see the following:
1) The Linux agent logs show these errors when running the Task:
WARN 2024-02-19 09:29:29.707 844416 139831218042624 CTA-ExecThread > Failed to open connection to the task handler 'Altiris.InventoryAgent': 2147483742, Invalid argument
WARN 2024-02-19 09:29:29.711 844416 139831193593600 CTA-ExecEngine > Task instance {01E4FDEF-1D4C-4378-B322-49EC3A183DA5} execution failed - could not open task handler.
INFO 2024-02-19 09:29:29.714 844416 139831193593600 CTA-ExecEngine > void ClientTaskAgent::{anonymous}::AExecEngineImpl::PostExecStatus(ClientTaskAgent::AExecResult&)
2) The Task Server agent logs show that the task starts, runs, and at the end fails at those same times:
Starting task instance 'Quick run Linux Inventory on LinuxClient123' (fe96b4a7-6bf3-4aba-891a-a51ab21a6729) from 'Linux Inventory' (89183e9f-577c-4f70-bbca-300ce051199a, 32104b20-ad48-4d5d-b39f-fecea13e6039)
-----------------------------------------------------------------------------------------------------
Date: 2/19/2024 9:29:24 AM, Tick Count: 919766187 (10.15:29:26.1870000), Size: 431 B
Process: AtrsHost (9808), Thread ID: 85, Module: AtrsHost.exe
Priority: 4, Source: ServerTaskExecutionThread
Task instance is completed: 'Quick run Linux Inventory on LinuxClient123' (fe96b4a7-6bf3-4aba-891a-a51ab21a6729, 32104b20-ad48-4d5d-b39f-fecea13e6039), started at 19/02/2024 09:29:24, status=Failed, total time=00:00:05.6706338
-----------------------------------------------------------------------------------------------------
Date: 2/19/2024 9:29:30 AM, Tick Count: 919771859 (10.15:29:31.8590000), Size: 450 B
Process: AtrsHost (9808), Thread ID: 85, Module: AtrsHost.exe
Priority: 4, Source: ServerTaskExecutionInstance
ITMS 8.x
The inability to load the task handler: "Failed to open connection to the task handler 'Altiris.InventoryAgent': 2147483742, Invalid argument" is because if nothing can handle the task then it will fail. In this particular scenario, the inventory plug-in (Inventory Agent) was not installed on the client machine. For the Inventory task to work, it needs that plug-in installed to properly collect the information.
"Note: The following steps are based on troubleshooting on a Linux client machine but the concepts can be easily applied to a Windows machine.
Make sure the Inventory plug-in is installed. You can check this under the "Agent Health" portion of the affected client machine:
If it is not present, proceed with the following:
CTAGENT
CTBASEHANDLERS
aex-iragent
aex-smfagent
aex-swuagent
aex-monitor
INVENTORY
SERVERINVENTORY
Subagents:
Altiris Client Task Agent
Altiris Client Task Scheduling Agent
Altiris Base Task Handlers
Altiris Inventory Rule Agent
Altiris Software Management Framework Agent
Altiris Software Update Agent
Altiris Monitor Agent
Altiris Inventory Agent
Altiris Inventory Pack for Servers
INFO 2024-02-21 11:29:36.757 844416 139831217510144 SWDAgent > RunJobByID: Job {8B9D8FB0-49EB-45E9-8946-4B8D68F63287}, running command "/bin/sh -c "./rollout.sh" > `aex-helper info path`/aex-inventory-install.log 2>&1" in "/opt/altiris/notification/nsagent/var/packages/{746E0B2E-198A-41E8-90FD-D49AE9A4B5D8}"
INFO 2024-02-21 11:29:36.758 844416 139831217510144 SWD > Executing command line "unset LD_ASSUME_KERNEL; PATH="${PATH}:/opt/altiris/notification/nsagent/var/packages/{746E0B2E-198A-41E8-90FD-D49AE9A4B5D8}"; export PATH; /bin/sh -c /bin/sh\ -c\ \"\./rollout\.sh\"\ \>\ \`aex-helper\ info\ path\`/aex-inventory-install\.log\ 2\>\&1"
INFO 2024-02-21 11:29:42.526 844416 139831217510144 SWD > Command line result is 0
Note:
If the inventory plug-in is not installing:
Add to the agent logs (to have more details on what is happening) DEVNOTE logging as follows:
To enable Devnote logging run this in Terminal:
aex-helper agent -s "Configuration" debug_level DEVNOTE
aex-helper agent -s "Configuration" debug_file_size 0
To Disable devnote logging run this in Terminal:
aex-helper agent -s "Configuration" debug_level ERROR
aex-helper agent -s "Configuration" debug_file_size 1024
Collect agent logs from: /opt/altiris/notification/nsagent/var/
Review the following information and narrow down possible issues:
A) aex-inventory-install.log (located at /opt/altiris/notification/nsagent/)
B) Review the content of /opt/altiris/notification/inventory/ if this directory exists