search cancel

Client Automation - SD Job Container Build Failed

book

Article ID: 202860

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Software Delivery

Issue/Introduction

Build of SD package is in error.

Following errors appear in TRC_USD_TASKMAN :

041120-16:10:58.2455308L|003248|00003f90|TaskMan |TM:00 |AAORDEXE.CXX |004128|NOTIFY | Container building:All ATMs [11/4/2020 04:09:10 PM],uuid:[7D2D958B-CB05-48F8-8B6C-F594324D1CF7].
041120-16:10:58.2456174L|003248|00003f90|TaskMan |TM:00 |AAORDEXE.CXX |004135|NOTIFY | Container build begin:All ATMs [11/4/2020 04:09:10 PM],uuid:[7D2D958B-CB05-48F8-8B6C-F594324D1CF7].
041120-16:11:13.5639918L|003248|00003f90|TaskMan |TM:00 |XEXHAND.CXX |000639|NOTIFY | ##EXCEPTION## VersionError [email protected]:ps\collection.cxx:333.
041120-16:11:13.5640114L|003248|00003f90|TaskMan |TM:00 |XEXHAND.CXX |000641|NOTIFY | ##EXCEPTION## VersionError(not unique): Table usd_applic, ObjectId FDB35409-0C88-4B4A-B4A6-5442CBF730A4, Comment: insertSorted.
041120-16:11:13.5643055L|003248|00003f90|TaskMan |TM:00 |XEXHAND.CXX |000677|NOTIFY | ##EXCEPTION## VersionError [email protected]:FoldJob\jobcont.cxx:7340.
041120-16:11:13.5643778L|003248|00003f90|TaskMan |TM:00 |XEXHAND.CXX |000639|NOTIFY | ##EXCEPTION## VersionError [email protected]:FoldJob\jobcont.cxx:7343.
041120-16:11:13.5643992L|003248|00003f90|TaskMan |TM:00 |XEXHAND.CXX |000641|NOTIFY | ##EXCEPTION## VersionError(not unique): Table usd_applic, ObjectId FDB35409-0C88-4B4A-B4A6-5442CBF730A4, Comment: insertSorted.
041120-16:11:13.6106964L|003248|00003f90|TaskMan |TM:00 |XEXHAND.CXX |000677|NOTIFY | ##EXCEPTION## VersionError [email protected]:FoldJob\jobcont.cxx:7386.
041120-16:11:29.8824331L|003248|00003f90|TaskMan |TM:00 |XEXHAND.CXX |000639|NOTIFY | ##EXCEPTION## VersionError [email protected]:ps\collection.cxx:333.

041120-16:11:45.9019691L|003248|00003f90|TaskMan |TM:00 |AAORDEXE.CXX |004170|ERROR | AAOrderExecutor::runActivationProc error building container
041120-16:11:45.9749309L|003248|00003f90|TaskMan |TM:00 |AAORDEXE.CXX |005810|NOTIFY | Container failed:All ATMs [11/4/2020 04:09:10 PM],uuid:[7D2D958B-CB05-48F8-8B6C-F594324D1CF7].

 

In Windows Event Viewer Application following error appears :

Job Container All ATMs [11/4/2020 04:09:10 PM] failed ca://usd/system - exception: name= VersionError comment= insertSorted location= [email protected]:ps\collection.cxx:333 [email protected]:FoldJob\jobcont.cxx:7340 [email protected]:FoldJob\jobcont.cxx:7343 [email protected]:FoldJob\jobcont.cxx:7386

Job Container All ATMs [11/4/2020 04:09:10 PM] computer job build failed. ca://usd/system

 

Environment

Client Automation All Versions

Cause

Cause 1 :
Problem occurs when a SD Package is sent to a machine with option "Remove existing installation records and re-run the selected procedure" and the machine has the procedure  "* Find SW" of the package in its SD Installed Packages list.
 
This problem could occur with following scenario :
 
1- Machine M belongs to DOMAIN D1 and package P is sent.
install procedure is in "installed packages" folder
 
2- then machine M moves to another DOMAIN D2 which has not the package P in its library.
the  install procedure is changed to "* Find SW" as package is not present in the library
 
3- Later package P is registered in DOMAIN D2
 
4- Then package P is sent to machine M with option "Remove existing installation records and re-run the selected procedure"  and the error occurs.
 
 
Execute following SQL Query in Microsoft SQL Server Management Studio to find the computers with this problem :
 
SELECT
h.host_name,
R.itemname 'Package Name', r.itemversion 'Package Version',
P1.itemname 'Procedure Name1',
A1.status,
dateadd(ss, A1.completiontime+ datediff(ss,getutcdate(),getdate()), convert(datetime,'19700101')) [Install Time1]
FROM usd_applic A1, usd_actproc P1, usd_rsw r, ca_discovered_hardware h
WHERE A1.actproc=P1.objectid and P1.itemname='* Find SW' and r.objectid=P1.rsw and h.dis_hw_uuid=A1.target
and exists (select * from usd_actproc P2 where P2.rsw=P1.rsw and P1.objectid<>P2.objectid and P2.task=0 and P2.itemname<>'delivery proc')
ORDER BY host_name, 2, 3
 
 
Cause 2 :
 
A computer has procedure "* Find SW" and an install procedure of the same package in its "Installed Packages" List
 
Execute following SQL Query in Microsoft SQL Server Management Studio to find the computers with this problem :
 
select 
h.host_name,
R.itemname 'Package Name', r.itemversion 'Package Version',
P1.itemname 'Procedure Name1',
A1.status,
dateadd(ss, A1.completiontime+ datediff(ss,getutcdate(),getdate()), convert(datetime,'19700101')) [Install Time1],
P2.itemname 'Procedure Name2',
A2.status,
dateadd(ss, A2.completiontime+ datediff(ss,getutcdate(),getdate()), convert(datetime,'19700101')) [Install Time2]
 from usd_applic A1, usd_actproc P1, usd_applic A2, usd_actproc P2, usd_rsw r, ca_discovered_hardware h
where A1.actproc=P1.objectid and P1.itemname='* Find SW' and A2.target=A1.target and A1.objectid<>A2.objectid and A2.actproc=P2.objectid and r.objectid=P1.rsw and r.objectid=P2.rsw
and P2.itemname<>'delivery proc' and h.dis_hw_uuid=A1.target

Resolution

Solution for Cause 1 :

Execute these SQL Queries (in a single block) to replace "*Find SW" by an install procedure of the package :


DECLARE @date_time VARCHAR(50), @sql VARCHAR(255)
SET @date_time=convert(varchar(255),GETDATE(),121)
SET @date_time=REPLACE(@date_time,' ','___')
SET @date_time=REPLACE(@date_time,'-','_')
SET @date_time=REPLACE(@date_time,':','_')
SET @date_time=LEFT(@date_time,LEN(@date_time)-4)


IF OBJECT_ID ('tempdb.dbo.#TMP','U') IS NOT NULL DROP TABLE #TMP
IF OBJECT_ID ('tempdb.dbo.#TMP2','U') IS NOT NULL DROP TABLE #TMP2

SELECT A.objectid 'Detect', B.objectid 'Install', (B.opmask & 4096)/4096 'Default_Proc'
INTO #tmp
FROM usd_actproc A, usd_actproc B
WHERE A.itemname='* Find SW' and A.type=3 and A.task=0 and
A.rsw=B.rsw and A.objectid<>B.objectid and B.task=0 and B.itemname<>'delivery proc'

DELETE #TMP FROM #TMP T1 WHERE T1.Default_Proc=0 and exists (select * from #TMP T2 WHERE T2.Default_Proc=1 and T1.Detect=T2.Detect)

SELECT TOP 1 * INTO #TMP2 FROM #TMP WHERE Detect in (SELECT Detect FROM #TMP GROUP BY Detect HAVING COUNT(*)>1)

DELETE #TMP FROM #TMP T1
WHERE T1.Detect IN (SELECT T2.Detect FROM #TMP2 T2) AND T1.install not in (SELECT T2.Install FROM #TMP2 T2)


SET @sql='SELECT * INTO usd_applic_BACKUP_FINDSW_'[email protected]_time+' FROM usd_applic A, #TMP T WHERE A.actproc=T.Detect'
Exec(@sql)
PRINT 'Backup Table usd_applic_BACKUP_FINDSW_'[email protected]_time+ ' created'

UPDATE usd_applic
SET actproc=T.install
FROM usd_applic A, #TMP T
WHERE A.actproc=T.Detect

Recycle sdmgr_api :
 
caf stop sdmgr_api
 
or if there are more than one sdmgr_api :
 
caf stop sdmgr_api_NB1
caf stop sdmgr_api_NB2
....
 

 

A table usd_applic_BACKUP_FINDSW_<datetime> (ex: usd_applic_BACKUP_FINDSW_2021_03_01___12_14_26)  is created. In case of problem values could be restored with this SQL Query :

UPDATE usd_applic
SET actproc=B.actproc
FROM usd_applic A, usd_applic_BACKUP_FINDSW_<datetime> B
WHERE A.objectid=B.objectid

 

Replace usd_applic_BACKUP_FINDSW_<datetime> by backup tablename created by previous block of queries.

 

 

Solution for Cause 2 :

Execute following SQL Query in Microsoft SQL Server Management Studio :

select 
h.host_name,
R.itemname 'Package Name', r.itemversion 'Package Version',
P1.itemname 'Procedure Name1',
A1.status,
dateadd(ss, A1.completiontime+ datediff(ss,getutcdate(),getdate()), convert(datetime,'19700101')) [Install Time1],
P2.itemname 'Procedure Name2',
A2.status,
dateadd(ss, A2.completiontime+ datediff(ss,getutcdate(),getdate()), convert(datetime,'19700101')) [Install Time2]
 from usd_applic A1, usd_actproc P1, usd_applic A2, usd_actproc P2, usd_rsw r, ca_discovered_hardware h
where A1.actproc=P1.objectid and P1.itemname='* Find SW' and A2.target=A1.target and A1.objectid<>A2.objectid and A2.actproc=P2.objectid and r.objectid=P1.rsw and r.objectid=P2.rsw
and P2.itemname<>'delivery proc' and h.dis_hw_uuid=A1.target

 

And delete the  SD jobs for the machines returned by this query.

 

Example :

In this example delete the SD jobs for package "ECHO_TEST_FILE.TXT 2.00" procedure "* Find SW" and "install"

under Software Jobs and "Installed Packages"

Attachments