What happens when you use the Reset Agent button under the Task Agent?
search cancel

What happens when you use the Reset Agent button under the Task Agent?


Article ID: 177014


Updated On:


IT Management Suite


When you double-click on the Altiris Agent in version 7 of Notification Server, go to the Tasks tab, and press the "Reset Agent" button, what does this do?


In NS7 SP1 and SP2, it stops the task agent, restarts it, and then forces a check for new servers.  Restarting the Altiris Agent doesn't do the last step in that process unless the client has never checked in before.  A restart of the Agent will look to see if it has a task server known, and if so, will not try to connect to another.  In the logs, you'll see this:

CTaskServerNetCommsConnection::GetServersAndRegister(): Not getting new server list because we have <thepreviousserver> saved

Only if the client has not yet found a task server will it request a list from the NS.  A Reset Agent though will force this check.  You can see the process in the logs, and it looks like this (the server list returned is highlighted): <![CDATA[CTaskAgentBase::OnStopRunningTasks(): Stop running tasks]]></event>



  <![CDATA[CTAgent::Stop(): raw_Stop called, sending all task status...]]></event>


  <![CDATA[Telling engine to stop]]></event>


  <![CDATA[Waiting for engine to stop]]></event>


  <![CDATA[CTaskExecutionEngineWin32::OnStopThread(): Engine stopping]]></event>


  <![CDATA[Waiting for events to be posted]]></event>


  <![CDATA[CTAgent::Stop(): Terminating thread...]]></event>


  <![CDATA[CTaskAgentBase::ProcessTasksThreadProc(): Terminate event is set]]></event>


  <![CDATA[Client Task Agent main thread is exiting]]></event>


  <![CDATA[CWin32CTServerDirectConnection::ProcessConnected(): Stopping because we got a terminate event]]></event>


  <![CDATA[CWin32CTServerDirectConnection.OnExecute():  Lost connection.  Waiting 1 minute to retry]]></event>


  <![CDATA[CWin32CTServerDirectConnection::OnExecute(): Tickle thread ending.]]></event>


  <![CDATA[Client Task Agent is un-initializing]]></event>


  <![CDATA[CTAgent::Stop(): Done.]]></event>




  <![CDATA[Client Task Agent is initializing]]></event>




  <![CDATA[CTaskAgentBase::ProcessNewSettings(): Processing new settings: update: 15, task send: 15, server method: 1]]></event>


  <![CDATA[CWin32CTServerDirectConnection::OnExecute(): Tickle thread starting...]]></event>


  <![CDATA[CTaskServerNetCommsConnection::GetServersAndRegister(): Getting servers because of EXTERNAL bForceResetServerList]]></event>


  <![CDATA[Loaded 2 task entries]]></event>


  <![CDATA[CTaskExecutionEngineWin32::OnInitThread(): Engine initializing]]></event>


  <![CDATA[CTaskExecutionEngineWin32::StartEngine(): Task execution engine start requested]]></event>


  <![CDATA[CTaskServerNetCommsConnection::RegisterWithServerList(): Ordering servers by computer count]]></event>


  <![CDATA[CTaskServerNetCommsConnection::GetCurrentClientCountFromServerFinal(): "http://<host name>.<Your domain>/Altiris/ClientTaskServer/GetComputerCount.aspx"]]></event>


  <![CDATA[CTaskServerNetCommsConnection::GetCurrentClientCountFromServerFinal(): Got 2 for server http://www.<host name>.<Your domain>/Altiris/ClientTaskServer/GetComputerCount.aspx]]> </event>


  <![CDATA[CTaskServerNetCommsConnection::GetCurrentClientCountFromServerFinal(): "http://www.<host name>.<Your domain>/Altiris/ClientTaskServer/GetComputerCount.aspx"]]></event>


  <![CDATA[CTaskServerNetCommsConnection::GetCurrentClientCountFromServerFinal(): Got 1 for server http://www.<host name>.<Your domain>/Altiris/ClientTaskServer/GetComputerCount.aspx]]> </event>


  <![CDATA[CTaskServerNetCommsConnection::RegisterWithServerList(): Register order: <host name>.<Your domain>,<host name>.<Your domain>]]></event>


  <![CDATA[Attempting to register using "http://www.<host name>.<Your domain>Altiris/ClientTaskServer/Register.aspx?resourceGuid=faa4dab2-274c-44be-bbf6-9f7cdbe5eef8"]]></event>


  <![CDATA[CTaskAgentBase::OnAgentRegistered(): Successfully registered with server "<host name>.<Your domain>"]]></event>


  <![CDATA[CWin32CTServerDirectConnection::Connect(): Tickle connection to server <host name>.<Your domain>:50124]]></event>


Finally, if you'd like to test this process, you can use HOWTO10085.  The web page should look something like this:

http://www.<host name>.<Your domain>/Altiris/TaskManagement/CTAgent/GetClientTaskServers.aspx?ResourceGuid=faa4dab2-274c-44be-bbf6-9f7cdbe5eef8


The returned result looked like this:

<response result="success">

  <server name="######" resource="00000000-0000-0000-0000-000000000000" guid="00000000-0000-0000-0000-000000000000" />
  <server name="######" resource="00000000-0000-0000-0000-000000000000" guid="00000000-0000-0000-0000-000000000000" />


Notice that the list of servers matches the highlighted text above, but that the logs did not reflect the actual web page pinged.  However, the IIS logs on the server (Windows\System32\LogFiles\W3SVC1\exXXXXXX.log) do partially show this.  In that log, the entry looks like this:

GET /Altiris/TaskManagement/CTAgent/GetClientTaskServers.aspx ResourceGuid=faa4dab2-274c-44be-bbf6-9f7cdbe5eef8 80 <server>\<identity>

NOTE:  The web page referred to in that KB can not be found and modified on the actual file system of the NS.  This page is derived and stored in memory on the NS, so it'll work, but you can't actually see/modify the file/process.