AD Import is failing with "An error occurred while getting task percent complete from Task Manager web service"
search cancel

AD Import is failing with "An error occurred while getting task percent complete from Task Manager web service"

book

Article ID: 152049

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

When running AD Import rules on your SMP Server, the following can be noted:

  • The AD Import rules are frozen at a particular percentage
  • The AD Import rules show the error message "The import rule has failed. An unknown error has occurred" with a red "X"
  • "The import rule has failed. An unknown error has occurred" messages occur when  you attempt to recreate an AD Import rule
  • You see a message about "An error occurred while getting task percent complete from Task Manager web service" listed at the top of the AD Import screen

The AD Import rules are not running and there are a few status messages when looking in the logs

Environment

ITMS 8.x

Cause

Exact cause is unknown. It could be:

  • An issue with the TaskManager table
  • An issue with the Task Server component

Resolution

To resolve this issue:

1) Ensure that the Task Server component is working correctly on the Notification Server. This appeared to be a crucial step in the troubleshooting process and you can verify this by:

  • Navigating to Settings -> Notification Server -> Site Server Settings
  • Navigate to Site Management -> Site Servers -> NSServerName
  • Ensure that the Task Service shows up as "OK" with a service status of Active

2) Stop the Altiris Services (Altiris Service, Altiris Support Service)
3) Using SQL Management Studio perform the following steps against the Symantec_CMDB:

NOTE: It is recommended that you backup your database and/or the contents of the TaskManager table before you perform any direct modification of the database. Modifying the database in this manner could cause corruption requiring you to restore the database to its state before performing any of these modifications.

Select the proper database and run the following query:

SELECT * FROM TaskManager

This will show you the contents of the table containing the task statuses. A common occurrence when seeing this problem is that one or more tasks will have an EndDateTime value of NULL. If you see one or a few of these occurrences you may choose to remove just these, which should address the problem. Alternatively you can truncate the whole table, if removing the few offending entries does not fix the problem or if you cannot easily identify the offending entries.

To remove the entries with the NULL EndDateTime value run the following query:

DELETE  from TaskManager
WHERE TaskManager.[Name] like '%TASKTYPE%'
and TaskManager.[EndDateTime] is NULL

The TASKTYPE value in the query should be substituted with the proper task type as seen in the [Name] column of the offending entry/entries. If there are multiple types you can run the query each time for each type or you can run the following query that does not perform a check on the task type:

DELETE  from TaskManager
WHERE TaskManager.[EndDateTime] is NULL

To remove all contents of the table run the following query:

TRUNCATE TABLE TaskManager

4) Start the Altiris Services (Altiris Service, Altiris Client Message Dispatcher, Altiris File receiver, Altiris Support Service)
5) Close any open NS console windows
6) Navigate back to the AD Import screen and try running your Import again.

AD Import should now function correctly.