Windows reboot not done due to sdagent still running
search cancel

Windows reboot not done due to sdagent still running

book

Article ID: 271851

calendar_today

Updated On:

Products

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

Issue/Introduction

A SD Job which executes a reboot of computer after a delay of 3 minutes is sent to a computer.
The SD Job is executed tut the reboot is never done or done with a delay of 10 minutes or more
 
Example :
caf has received the Windows reboot event and try to stop caf. But caf is waiting termination of sdagent process :
030823-09:35:34.5383687L|007572|00001da8|CAF_SERVIC|caf |caf |000000|NOTIFY | cfWindowsCtrlHandlerEx: SERVICE_CONTROL_PRESHUTDOWN: windows wants to shut down but will wait for caf to stop
030823-09:35:34.5384191L|007572|00001da8|CAF_SERVIC|caf |caf |000000|NOTIFY | cfWindowsCtrlHandlerEx: SERVICE_CONTROL_SHUTDOWN: windows is shutting down
030823-09:35:34.5394551L|007572|00001da8|CAF_SERVIC|caf |caf |000000|NOTIFY | cfWindowsCtrlHandlerEx: SERVICE_CONTROL_STOP: stopping caf service
030823-09:35:34.5404434L|007572|00001da8|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::initiateQuit: === starting caf shutdown ===
030823-09:35:34.5405131L|007572|00001da8|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::initiateQuit: IDS_SERVICESTOPPING
030823-09:35:34.5428916L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [0] waiting for sdagent to terminate before allowing system shutdown
030823-09:35:35.5620309L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [1] waiting for sdagent to terminate before allowing system shutdown
030823-09:35:36.5782433L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [2] waiting for sdagent to terminate before allowing system shutdown
030823-09:35:37.5992040L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [3] waiting for sdagent to terminate before allowing system shutdown
...
030823-09:41:35.3566709L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [356] waiting for sdagent to terminate before allowing system shutdown
030823-09:41:36.3724001L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [357] waiting for sdagent to terminate before allowing system shutdown
030823-09:41:37.3881333L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [358] waiting for sdagent to terminate before allowing system shutdown
030823-09:41:38.3884272L|007572|000004a0|CAF_SERVIC|caf |caf |000000|NOTIFY | CFShutdowner::waitForPluginTermination: [359] waiting for sdagent to terminate before allowing system shutdown
 
In SD Agent logs :
SD job is terminated successfully and reboot request is sent.
Due to network problem SetJobStatus is not working and returns an error after a timeout of 10 minutes
030823-09:31:21.4192264L|008920|000022dc|SDAgent | |sdjecontainerif.cpp |001438|NOTIFY | SDjob 1 returns: 0 ExitCode: 0
030823-09:31:21.4283174L|008920|000022dc|SDAgent | |sdjecontainerif.cpp |002883|NOTIFY | Rerun signal received
030823-09:31:21.4324603L|008920|000022dc|SDAgent | |sdjecontainerif.cpp |004661|NOTIFY | Never Shutdown this computer
030823-09:31:21.4327484L|008920|000022dc|SDAgent | |sdjecontainerif.cpp |004141|NOTIFY | Status: CID:375AFEE8-154E-4E3B-9E26-85901A4697EB AID:808E8755-13BD-489B-9CC9-EFBB531ED82E JID:F7C983ED-FC2F-4314-BDD5-7A003B2E06EB rc:27
030823-09:31:21.4327983L|008920|000022dc|SDAgent |SDAgent |sdjobclientif.cpp |001294|NOTIFY | Set job status for 808E8755-13BD-489B-9CC9-EFBB531ED82E
030823-09:41:26.4182670L|008920|000022dc|SDAgent | |sdjecontainerif.cpp |004146|ERROR | Error in SetJobStatus (Reporting rerun)
030823-09:41:26.4183509L|008920|000022dc|SDAgent | |sdjecontainerif.cpp |003455|NOTIFY | Job ends but a rerun without reboot or logoff is requested
 
Sometimes SD Agent hangs at this line and never terminates.
070823-10:38:01.9162128L|001660|000022dc|SDAgent |SDAgent |sdjobclientif.cpp |001294|NOTIFY | Set job status for CDBF282F-B024-4316-8F9A-6A5851CACFEA
And reboot is never done as caf is waiting sdagent termination.

Environment

Client Automation 14.5

Cause

In case of network communication problem, SetJobStatus returns after a timeout of 10 minutes :

030823-09:31:21.4327983L|008920|000022dc|SDAgent |SDAgent |sdjobclientif.cpp |001294|NOTIFY | Set job status for 808E8755-13BD-489B-9CC9-EFBB531ED82E
030823-09:41:26.4182670L|008920|000022dc|SDAgent | |sdjecontainerif.cpp |004146|ERROR | Error in SetJobStatus (Reporting rerun)

This delays the reboot of 10 minutes at least.

Sometimes Windows has already started the shutdown process and some network services are already stopped. This may hang the process sdagent which never terminates.

Before 14.5, the timeout was 1 minute.

Resolution

To change the timeout from 10 minutes to 1 minute, execute following command line on the Agent :

ccnfcmda -cmd SetParameterValue -ps itrm/usd/Agent/collaboration -pn receiveTimeout -v 60