Microsoft KB Archive/318896

= Active Directory Management Agent Stops Immediately After It Starts =

Article ID: 318896

Article Last Modified on 10/30/2006

-

APPLIES TO


 * Microsoft Metadirectory Services 2.2 Service Pack 1
 * Microsoft Metadirectory Services 2.2 Service Pack 1

-



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.
 * 1) 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.
 * 1) Double-click zcOperateMA.
 * 2) Click the Plugins tab.
 * 3) Delete the MaControl.dll value in the Name or path of the attribute plugin box.
 * 4) Click OK.

To clear the zcOperateMA attribute from the Active Directory management agent:  Click the Bookmarks action in the left pane, and then click Management Agents. 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. Open a command prompt. 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

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

The following data appears in the Entry List section:

[Delete]zcOperateMA

</li> Click Run.</li> On the Connection menu, click Exit.</li> In the HTML rendering of the management agent object, click refresh, and then make sure that the zcOperateMA attribute is no longer listed.</li></ol>

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.
 * 1) Double-click zcOperateMA.
 * 2) Click the Plugins tab.
 * 3) 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.

Additional query words: zoomit mms

Keywords: kbenv kbprb KB318896

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.