Unable to run any task on target machines and also using the "run now" option
search cancel

Unable to run any task on target machines and also using the "run now" option

book

Article ID: 162564

calendar_today

Updated On:

Products

Task Server

Issue/Introduction

Cannot run any tasks (default or custom) on any client on any site even them being registered fine with Task Server (TS) and Symantec Management Platform (SMP).

When you check in the SMP Console, try to click on "run now" for any task like "get ip" or "run basic inventory" on a client. It throws error"

"Unable to execute stored procedure CtsStartTaskExecution"

 

Unexpected exception creating new task schedule

Creating new task execution instance failed all retries: 1

   [Altiris.Database.DatabaseContextRetryFailureException @ Altiris.TaskManagement]

   at Altiris.TaskManagement.Data.AltirisSqlHelper.RepeatForDeadlocks(Int32 retries, Int32 sleep, Object state, RepeatForDeadlocksDelegate func, String message, String category)

   at Altiris.TaskManagement.Data.TaskExecutionInstance.OnCreate()

   at Altiris.TaskManagement.ClientTask.Data.ClientTaskExecutionInstance.OnCreate()

   at Altiris.TaskManagement.ClientTask.Data.ClientTaskExecutionInstance.Create()

   at Altiris.TaskManagement.BaseTask.CreateTaskInstance(String name, String executedBy, Guid parentTaskInstanceGuid, JobNodeGuid jobNodeGuid, ParameterValueCollection inputParameterValues, IList`1 userRoles)

   at Altiris.TaskManagement.ClientTask.BaseClientTask.CreateTaskInstance(String name, String executedBy, Guid parentTaskInstanceGuid, JobNodeGuid jobNodeGuid, ParameterValueCollection inputPropertyValues, IList`1 userRoles)

   at Altiris.TaskManagement.BaseTask.ExecuteTask(TaskVersionGuid taskVersionGuid, String name, String executedBy, Guid parentTaskInstanceGuid, JobNodeGuid jobNodeGuid, ParameterValueCollection inputParameterValues, IList`1 userRoles)

   at Altiris.TaskManagement.TaskExecutionHelper.RunTaskNow()

   at Altiris.TaskManagement.UI.Controls.TaskSchedulingControl.Apply(TaskSchedule& schedule, ITaskExecutionInstance& instance)

   at Altiris.TaskManagement.Web.TaskScheduleMaintenance.OK_Click(Object sender, EventArgs e)


 

Unable to execute stored procedure CtsStartTaskExecution

   [System.Exception @ Altiris.DotNetLib]

   at Altiris.DotNetLib.Data.DbHelper.ExecuteStoredProcNonQuery(SqlCommand cmd, String Name, Object[] NameTypeValueParams)

   at Altiris.TaskManagement.ClientTask.Data.ClientTaskExecutionInstance.BulkLoadAssignedResources(DataTable dt, SqlCommand cmd, TaskInstanceGuid taskInstanceGuid, IList`1 assignedResources)

   at Altiris.TaskManagement.ClientTask.Data.ClientTaskExecutionInstance.InsertAssignedResources(SqlCommand cmd, TaskInstanceGuid taskInstanceGuid, IList`1 assignedResources)

   at Altiris.TaskManagement.ClientTask.Data.ClientTaskExecutionInstance.SaveInputParameters(DatabaseContext ctx, ParameterValueCollection inputParams)

   at Altiris.TaskManagement.Data.TaskExecutionInstance.OnCreate(DatabaseContext ctx)

   at Altiris.TaskManagement.ServerTasks.ServerTaskExecutionInstance.OnCreate(DatabaseContext ctx)

   at Altiris.TaskManagement.Data.TaskExecutionInstance.<OnCreate>b__a(DatabaseContext ctx, Object state)

   at Altiris.TaskManagement.Data.AltirisSqlHelper.RepeatForDeadlocks(Int32 retries, Int32 sleep, Object state, RepeatForDeadlocksDelegate func, String message, String category)


 

Procedure or function CtsStartTaskExecution has too many arguments specified.

   [System.Data.SqlClient.SqlException @ .Net SqlClient Data Provider]

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

   at Altiris.DotNetLib.Data.DbHelper.ExecuteStoredProcNonQuery(SqlCommand cmd, String Name, Object[] NameTypeValueParams)

 

SQL Exception details: code=8144, procedure=CtsStartTaskExecution

Environment

ITMS 8.x

Cause

There may be a few causes for this specific issue, such as:

  1. The stored procedure "CtsStartTaskExecution" was not updated after un upgrade from an old version.
  2. You've reconfigured the ITMS solution when it already had a few POST-FIXES installed to it.

You can see POST-FIXES that are installed under:

  • On NS Machine: [HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\Pointfixes\%Name of PF%\
    and down there will be record “Version” = ‘’

Resolution

To address the first above issue:

Rename the existing SP to .old and run the attached SQL script to CREATE the SP.

**ENSURE A BACKUP OF THE DATABASE WAS RECENTLY PERFORMED!

  1. In the SQL studio, Expand Databases, expand the database ( Symantec_CMDB ) in which the procedure ( CtsStartTaskExecution )  belongs, and then expand "Programmability".
  2. Expand Stored Procedures, right-click the procedure ( CtsStartTaskExecution ) and click Rename. Rename it to something like "CtsStartTaskExecution.old"
  3. Run the attached sql (or grab the same from another environment using the same version). To save the modifications to procedure definition ,on the Query menu, click Execute.
  4. In object Explorer, select database instance and Click Refresh.
  5. Confirm both the 'CtsStartTaskExecution' and 'CtsStartTaskExecution.old' appear when you expand "Programmability".

To address the second above issue:

**ENSURE A BACKUP OF THE DATABASE WAS RECENTLY PERFORMED!

You will need to reinstall all the POINT-FIXES that were previously installed.

Make sure that you are installing the same version that is showing in the NS registry, if not, you will need to update agent/plugins or any other needed process that the new POINT-FIX is asking for.

**Do not install a lower version from the POINT-FIX that were previously installed.

Attachments

CtsStartTaskExecution.sql get_app