Active Directory Management Agent Stops Immediately After It Starts (318896)



The information in this article applies to:

  • Microsoft Metadirectory Services 2.2
  • Microsoft Metadirectory Services 2.2 SP1

This article was previously published under Q318896

SYMPTOMS

After the Active Directory management agent loads successfully, it may stop immediately. In this situation, processing does not occur and error codes are not logged in Ds.log, Adma.log, or Genlogs. Because the Ds.log file and the Adma.log file do not record any activity, you may assume that the Active Directory management agent did not start at all.

This issue typically occurs after the Active Directory management agent is forced to shut down while the management agent is running.

CAUSE

This issue may occur if the management agent object contained the zcOperateMA attribute before the management agent was started and if this attribute was set to a value of 2. The zcOperateMA attribute exists only while the management agent is running; it typically does not exist when the management agent is idle.

During a forced shutdown, the management agent object may be written to the directory while this attribute is present and set to the value of 2. Typically, the zcOperateMA attribute is not included when the management agent object is written to the database.

By design, the zcOperateMA attribute functions in the following manner:
  • When the management agent is not running, the attribute does not exist.
  • When the management agent is running, the attribute is set to a value of 1.
  • When the management agent is running and you must perform a premature (forced) shutdown of the management agent, the attribute is set to a value of 2.
The management agent may be forced to shut down in one of two ways:
  • You click Stop the Current Management Agent's Operation on the MA Service tab of the Management Agent Properties action.
  • The Microsoft Metadirectory Services server is stopped (you either stop the service or quit the program).
During a forced shutdown operation of the server, the order in which the pool of active threads is stopped is not set. Some threads are related to individual management agents, other threads are related to the Microsoft Metadirectory Services server. In some instances of a forced shutdown, the zcOperateMA attribute is written back to the directory when the management agent object is flushed. Because the management agent is in the process of shutting down, the zcOperateMA attribute contains a value of 2. This behavior does not typically occur because the zcOperateMA attribute is processed by the MaControl.dll plugin. If the plugin is unavailable (for example, its thread has already been shut down), zcOperateMA is not processed as expected and the attribute is written to the management agent object in the directory.

When you run the management agent again, as soon as the management agent is loaded into memory, it checks the value of zcOperateMA. Because the value is set to 2, the management agent determines that it is supposed to shut down and it quits immediately.

RESOLUTION

To resolve this issue, remove the attribute from the management agent object and return the management agent to its proper state. To do so:
  1. Temporarily turn off the Active Directory management agent schedule (if it is being used).
  2. Temporarily remove the plugin from the zcOperateMA attribute
  3. Use Ldp.exe to clear the zcOperateMA attribute from the Active Directory management agent.
  4. Reestablish the plugin on the zcOperateMA attribute.
  5. Restore the original Active Directory management agent schedule (if it is being used).
The rest of this section describes this procedure in more detail.

You can schedule Active Directory management agent to run either in the Compass client or in a batch file that is run by Windows Task Scheduler. To temporarily turn off the Active Directory management agent schedule in the Compass client:
  1. Use Compass to log on to Microsoft Metadirectory Services as an administrator.
  2. Click the Bookmarks action in the left pane, and then click Management Agents.
  3. For each Active Directory management agent that is listed, click Schedule, and then make sure that the Active Directory management agent is not scheduled to run while you are performing this procedure.

    If a management agent is scheduled to run automatically, temporarily modify the schedule so that it does not run automatically.

    IMPORTANT: An Active Directory management agent cannot run while you are performing the procedure that is described in this section.
  4. Click OK.
To temporarily turn off the Active Directory management agent schedule in Windows Task Scheduler:
  1. Click Start, point to Settings, and then click Control Panel.
  2. Click Scheduled Tasks.
  3. Right-click the task, and then click Properties.
  4. Click the Task tab, click to clear the Enabled check box, and then click OK.
To temporarily turn off the plugin:
  1. Click the Search action in the left pane, type zcOperateMA in the Search box, and then press ENTER.

    One instance of zcOperateMA is listed with a small, blue sphere to the left of the attribute name.
  2. Double-click zcOperateMA.
  3. Click the Plugins tab.
  4. Delete the MaControl.dll value in the Name or path of the attribute plugin box.
  5. Click OK.
To clear the zcOperateMA attribute from the Active Directory management agent:
  1. Click the Bookmarks action in the left pane, and then click Management Agents.
  2. Right-click the Active Directory management agent that contains the zcOperateMA attribute, click View, and then click All Attributes.

    An HTML rendering of the management agent object's attributes appears. Make sure that the zcOperateMA attribute is listed.
  3. Open a command prompt.
  4. Use Ldp.exe to connect to and bind with Microsoft Metadirectory Server. For additional information about using Ldp.exe to connect to and manage Microsoft Metadirectory Server, click the article number below to view the article in the Microsoft Knowledge Base:

    288193 How to Use LDP to Connect to a Microsoft Metadirectory Services Server

  5. Right-click the Active Directory management agent that contains the zcOperateMA attribute, and then click Modify.
  6. In the Edit Entry section, type zcOperateMA in the Attribute box.
  7. Click Delete, and then click Enter.

    The following data appears in the Entry List section:

    [Delete]zcOperateMA

  8. Click Run.
  9. On the Connection menu, click Exit.
  10. In the HTML rendering of the management agent object, click refresh, and then make sure that the zcOperateMA attribute is no longer listed.
To reestablish the plugin on the zcOperateMA attribute:
  1. Click the Actions menu in the Compass client, and then click Search in the left pane.
  2. Click zcOperateMA in the Search box, and then press ENTER.

    One instance of zcOperateMA is listed with a small, blue sphere to the left of the attribute name.
  3. Double-click zcOperateMA.
  4. Click the Plugins tab.
  5. Type MaControl.dll in the Name or path of the attribute plugin box, and then click OK.
After you complete this procedure, restore the Active Directory management agent schedule or turn on the scheduled task again.

Modification Type:MajorLast Reviewed:6/6/2003
Keywords:kbenv kbprb KB318896