Software Delivery Job Container Build Failed

Document ID : KB000071604
Last Modified Date : 07/03/2018
Show Technical Document Details
Issue:
"Job Container Build Failed" error occurs while trying to create a software delivery deployment job.

The job fails with the following error: SDM228451
Job container build failed. Please see the event log for details.

The System Event Log shows:
%CASWD_E_201901, Job Container <name> <target> failed ca://usd/system -exception: name= VersionError comment= insertSorted location=T@:ps\collection.cxx:333 C@:foldjob\jobcont.cxx:7227 T@:foldjob\jobcont.cxx:7230 C@:foldjob\jobcont.cxx:7273 <Server_name>

TRC_USD_TASKMAN_x.log shows:
NOTIFY | ##EXCEPTION## VersionError T@:ps\collection.cxx:333.010311-09:31:44.5960760L
NOTIFY | ##EXCEPTION## VersionError (not unique): Table usd_applic, ObjectId 2CDC9EE2-2423-4503-B216-CF9FAD3AA920, Comment: insertSorted.
NOTIFY | ##EXCEPTION## VersionError C@:foldjob\jobcont.cxx:7227.
NOTIFY | ##EXCEPTION## VersionError T@:foldjob\jobcont.cxx:7230.
NOTIFY | ##EXCEPTION## VersionError(not unique): Table usd_applic, ObjectId 2CDC9EE2-2423-4503-B216-CF9FAD3AA920,Comment: insertSorted.
NOTIFY | ##EXCEPTION## VersionErrorC@:foldjob\jobcont.cxx:72

--OR--


TRC_USD_TASKMAN_x.log shows:
NOTIFY | ##EXCEPTION## VersionError T@:Computer\COMPC.CXX:259.
NOTIFY | ##EXCEPTION## VersionError(illegal attributes): Table usd_target, ObjectId 5C1F23F3-47AF-45B8-9BE7-B27CF02DAB1A, Comment: no name.
NOTIFY | ##EXCEPTION## VersionError C@:ps\collection.cxx:287.
NOTIFY | ##EXCEPTION## VersionError T@:ps\collection.cxx:311.
NOTIFY | ##EXCEPTION## VersionError(illegal attributes): Table usd_target, ObjectId 5C1F23F3-47AF-45B8-9BE7-B27CF02DAB1A, Comment: no name.
NOTIFY | ##EXCEPTION## VersionError C@:PS\persistc.cxx:426.
NOTIFY | ##EXCEPTION## VersionError T@:PS\persistc.cxx:428.
NOTIFY | ##EXCEPTION## VersionError(illegal attributes): Table usd_target, ObjectId 5C1F23F3-47AF-45B8-9BE7-B27CF02DAB1A, Comment: no name.
NOTIFY | ##EXCEPTION## VersionError C@:PS\ps.cxx:655.
NOTIFY | ##EXCEPTION## VersionError T@:PS\ps.cxx:657.
NOTIFY | ##EXCEPTION## VersionError(illegal attributes): Table usd_target, ObjectId 5C1F23F3-47AF-45B8-9BE7-B27CF02DAB1A, Comment: no name.
NOTIFY | ##EXCEPTION## VersionError C@:FoldJob\jobcont.cxx:7386.
...
ERROR | AAOrderExecutor::runActivationProc error building container

 
Environment:
Client Automation (ITCM) -- any version.
Cause:
TaskMan trace shows: Comment: insertSorted
The cause for the internal error when building the job container is duplicate records in the usd_applic table in the database, for one or more agents included in the job container.  There are various root causes and contributing factors for how an agent might create a duplicate record in usd_applic.  Development has mitigated some of those root causes, however all cases have not been addressed as of the publication of this article.

TaskMan trace shows: Comment: no name
The cause for this scenario is an agent included in the job container that is not linked to a scalability server.  Sort the group of target agents by "Scalability Server" in DSM Explorer.  If any agent has a BLANK value for a scalability server, it will cause the job container to fail to evaluate or build.  The solution for this scenario is to exclude that agent from the software job, or force the agent to re-register, to fix the linkage to an available scalability server.
Resolution:
Method 1: SQL Studio
Attached to the technical document is a SQL script, known as "CleanApps".  This script will remove all duplicate records from the usd_applic table.  It is recommended, but not required, to stop CAF while the script is executed.  Once completed, terminate and recreate the job container, and it should build successfully now.

Method 2: Interactive WinOffline
Download the latest copy of the WinOffline from the Client Automation Community page: https://communities.ca.com/community/ca-client-management-solutions

Copy WinOffline to the ITCM Domain Manager and navigate to the built-in CleanApps utility:

User-added image

Step 1: Press the "Connect SQL" button.  When running WinOffline from the domain manager, the SQL connection info for that domain manager will be populated automatically.

Step 2: It is recommended to stop CAF for the cleanup.  Use the "Stop CAF" button, and the progress will be shown in the output window.

Step 3: Press the "Run CleanApps" button, and progress/output will be displayed to the window.

Step 4: Restart CAF, using the button in WinOffline or from command line.  Whatever you prefer.

Method 3: Command-line WinOffline
WinOffline can also perform this procedure from the command line:

Step 1: WinOffline.exe -stopcaf
Step 2: WinOffline.exe -cleanapps
Step 3: WinOffline.exe -startcaf
Additional Information:
The latest copy of the WinOffline utility can be obtained from the Client Automation (ITCM) community:
https://communities.ca.com/community/ca-client-management-solutions

Search for "Latest WinOffline"
File Attachments:
SD-CleanApps-Unified.txt