If you are having problems with Archiving Server, it is recommended that you use the following process to try and troubleshoot these problems.
Authors: Weiming Shen, Xu Liu, and Clark Chen
Publication date: May 2011
Product version: Lync Server 2010
If you are having problems with Archiving Server (that is, if messages are not being saved to the database as expected), it is recommended that you use the following process to try and troubleshoot these problems:
Each of these steps is explained in detail in the following sections of this article.
Step 1: Verify that Microsoft Message Queuing (MSMQ) is correctly installed
To enable archiving, MSMQ must be installed in Directory Service integration mode. The failure to correctly install MSMQ in Directory Service integration mode is the top reported reason for problems with MSMQ.
To verify that that MSMQ has been installed in Directory Service integration mode (rather than workgroup mode), click the Features node in Server Manager. In the Features Summary list, you should see Directory Service Integration listed under Message Queuing. If you do not, click Add Features. In the Add Features Wizard, expand Message Queuing, expand Message Queuing Services, and then select Directory Service Integration. Click Next to finish configuring MSMQ.
Step 2: Verify that Archiving is enabled
Deploying an Archiving Server will not automatically cause archiving to take place; instead, you must have archiving enabled at the global and/or site scope before messages will actually be archived.
You can verify that archiving has been enabled by opening Lync Server Management Shell and running the following Windows PowerShell command:
If the EnableArchiving property is set to None that means that archiving has been disabled. To enable archiving of both instant message sessions and data MCU conferences, use a command similar to this, which enables archiving at the global scope:
Set-CsArchivingConfiguration –Identity global –EnableArchiving ImAndWebConf
To enable archiving of instant messages only, use a command like this one:
Set-CsArchivingConfiguration –Identity global –EnableArchiving ImOnly
You can also verify whether or not archiving has been enabled by opening the Lync Server Control Panel, clicking Monitoring and Archiving, and then clicking Archiving Configuration.
Step 3: Verify that the appropriate Archiving policies have been enabled
Even if the Archiving service (see Step 2) has been enabled you still might not see information being recorded to the Archiving database. That’s because messages are archived only for users who are being managed by a global, site, or per-user archiving policy that enables archiving for external and/or internal communications sessions. You can verify that you have deployed policies that enable message archiving by opening the Lync Server Management Shell and running the following Windows PowerShell command:
To enable archiving for both internal and external communication sessions, run a command similar to this:
Set-CsArchivingPolicy –Identity global –ArchiveExternal $True –ArchiveInternal $True
You can also manage your archiving policies by opening the Lync Server Control Panel, clicking Monitoring and Archiving, and then clicking Archiving Policy.
Step 4: Verify that MSMQ has sufficient disk quota space
By default, Microsoft Message Queuing is allocated 1 gigabyte of disk space on the Archiving Server. If the disk quota is reached, messages will not be archived. Instead, they will be held in the Front End Server’s outgoing queue for 3 hours, then automatically transferred to the dead letter queue. Messages will remain in the dead letter queue until sufficient disk space has been cleared on the Archiving Server (or until the disk quota for MSMQ has been increased). When that happens, messages will automatically be re-sent from the Front End Server.
To verify the amount of disk space being used by the MSMQ service, check the value of the performance counter MSMQ Service\Total bytes in all queues:
Step 5: Verify that there are no message written failures
If everything is working correctly, the Archiving service retrieves messages from MSMQ and then writes those messages to the database. If the service is unable to write messages to the database, it will either try to write the messages again or will write those messages to the error log file. Each time a new message is added to the log file the performance counter LS:Arch Service – 02 – WRITE\Arch Service – 002 – Messages failed to be written to DB will be incremented by one:
By periodically checking the value of this performance counter you can see whether or not messages are being written to the database.
Step 6: Verify that MSMQ messages have been delivered to the Archiving Server
To verify that messages are actually being delivered to the Archiving Server, check the value of the MSMQ Queue\Messages in Queue performance counter:
This counter is incremented by 1 each time a message is delivered to the Archiving Server. If the value is 0, that means that no messages have been delivered.
Step 7: Verify that MSMQ messages have been captured by the Front End Server
If this counter is not being incremented on the Front End Server that means that messages are not being captured by that server. This is often because the Front End Server is in critical mode (see Step 10), or because no users on that Front End Server have a policy that allows for archiving (see Step 3).
Step 8: Verify that there are no messages in the outgoing messages queue
Before messages are sent to the target queue, those messages are placed in an outgoing queue on the Front End Server; MSMQ then periodically retrieves all the messages from the outgoing queues and sends them to the target queue. Typically messages do not remain in the outgoing queue for very long; that will usually happen only if there are connectivity problems between the Front End Server and the Archiving Server. If you are experiencing problems with the Archiving Server, check the outgoing queues on your Front End Server to verify that messages are being sent from the Front End Server to the Archiving Server.
Note that you do not need to do anything to messages that are “stuck” in the outgoing queues. After 3 hours, messages still in an outgoing queue will automatically be transferred to the dead letter queue. Messages in the dead letter queue will automatically be sent to the target queue as soon as service has been fully restored.
You can use Server Manager to determine whether or not there are any messages in the outgoing queues. To do this, expand Features, expand Message Queuing, and then expand Outgoing Queues:
Step 9: Verify that there are no messages in the error log file
If the Archiving Server is unable to write messages to the database, those messages will not be dropped; instead, they will be written to the error log file. Messages written to the error log file can later be added to the database by using the SQL Server log replay capabilities.
To verify that there are no messages in the error log, check the contents of the log. The error log can be found at %ProgramFiles%\Microsoft Lync Server 2010\Archiving Server\Logs\RTCLogDBFailure.txt.
Step 10: Verify that the Front End Server is not in critical mode
“Critical mode” occurs if you have enabled the Block instant message (IM) or web conferencing sessions if archiving fails option and if one of the following situations has occurred:
· The MSMQ service on the Front End Server has used 95% of its allotted disk space. This can happen if the Archiving Server is unavailable and messages have therefore accumulated on the Front End Server without being sent.
· The Archiving Server was not deployed or the MSMQ service on the Archiving Server was not running when the Front End Server started.
· The MSMQ service in not running on the Front End Server.
You should check for each of these possibilities to ensure that the Front End Server is not running in critical mode.
Step 11: Verify that there are no messages in the dead letter queue
As a general rule, there should be no messages in your dead letter queue. Messages end up in the dead letter queue only when:
· Those messages do not reach the target queue on the Archiving Server within 3 hours; or
· Those messages are not processed by the Archiving Server within 4 hours.
Note that you do not need to do anything to messages in the dead letter queue. These messages will automatically be re-sent as soon as service has been fully restored.
You can use Server Manage to verify that there are no messages in the dead letter queue:
Lync Server Resources
- Lync Server 2010 documentation in the TechNet Library
- DrRez blog
- Lync Server and Communications Server resources