I was told lately by a client that their Citrix environment have been having connectivity issues to the licensing server even though the licensing service does not appear to have stopped. As there are no errors logged in the event logs, the quick solution is to restart the licensing service. This hasn’t been much of a problem because of the 720 hours (30 day) grace period that the XenApp and XenDesktop services have until they stop servicing requests. Since the licensing server is going to be moved to another server in the following weeks, we decided that we’ll simply monitor the events thrown and restart the services as required so this blog post serves to demonstrate what events are thrown when a XenApp 6.5 or XenDesktop 5.6 server logs when it loses contact with the licensing server and how to configure Windows Server 2008 R2 to automatically send an email alert to a email address. Let’s begin by looking at the events logged on the XenApp and XenDesktop servers so we know what to actually monitor.
XenDesktop 5.6 Licensing Logs
The events logged in the application logs on a XenDesktop 5.6 DDC are:
Error
Event ID 1151
The Citrix Broker Service cannot contact the license server 'licensingServerName'.
Please ensure that the license server is functioning correctly and that the
details identifying the license server are correct in the XenDesktop configuration.
Warning
Event ID 1154
This controller has entered the licensing grace period.
You have 720 hour(s) remaining before this controller stops providing desktop sessions.
Event ID 1151 is logged first, then followed by 1154:
When the XenDesktop server re-establishes connectivity to the licensing server, the following events are logged into the system logs:
Information
Event ID 1150
The Citrix Broker Service successfully contacted the license server 'licensingServerName'.
InformationEvent ID 1150
The Citrix Broker Service is successfully communicating with the license server 'licensingServerName'. This controller is no longer in the licensing grace period.
XenApp 6.5 Licensing Logs
The events logged in the system logs on a XenApp 6.5 servers are:
ErrorEvent ID 9018
Citrix XenApp cannot contact the license server licensingServerName.
WarningEvent ID 9015
Citrix XenApp has entered the grace period. You have 720 hour(s) remaining before this server stops accepting connections from client devices.
Event ID 9018 is logged first, then followed by 9015:
Additionally, the following Citrix License Warning Notice prompt is displayed when you log onto the XenApp server:
Citrix XenApp cannot contact the license server licensingServerName.
When the XenDesktop server re-establishes connectivity to the licensing server, the following events are logged into the system logs:
Information
Event ID 9019
The Citrix Broker Service successfully contacted the license server 'licensingServerName'.
InformationEvent ID 9016
This server is successfully communicating with the license server. Citrix XenApp has left the grace period.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Monitoring XenDesktop 5.6 Licensing Server Connectivity
Since there are 2 events logged when a XenDesktop DDC loses connectivity to the licensing server, you are free to choose which event to trigger an email alert. My preference is to use the event ID 1151 error to trigger the alert so begin by opening up the Event Viewer, locate log in the Application log, right click on the item and click on Attach Task To This Event…:
Give the task a name and then click on Next:
Citrix XenDesktop cannot contact the license server
Note the event being logged and click Next:
Select Send an e-mail and click on Next:
Fill in the appropriate fields:
Citrix XenDesktop (XenDesktopServerName) cannot contact the license server. The server will be entering a licensing grace period now.
Review the settings, check the checkbox Open the Properties dialog for this task when I click Finish then click on the Finish button:
In the properties window of the alert, click on the Change User or Group… button to change the account that is going to be used to run this task (it defaults to the account you’re logged into):
Change the account to NT AUTHORITY\LOCAL SERVICE and click OK:
Now that we have monitoring set up to send e-mail alerts when the XenDesktop DDC is unable to contact the licensing server, the next step is to set up an alert when it is able to contact licensing server again. The event we’re going to monitor will be event ID 1156:
Complete the same steps as we did for the error (I won’t go into as much detail as the first example:
The Citrix Broker Service is successfully communicating with the license server
The Citrix Broker Service on Citrix XenDesktop (XenDesktopServerName) is successfully communicating with the license server. This controller is no longer in the licensing grace period.
An alert will now be sent when the XenDesktop DDC server loses connectivity to the licensing server and another alert will be sent when it re-establishes connection.
Monitoring XenApp 6.5 Licensing Server Connectivity
Since there are 2 events logged when a XenApp loses connectivity to the licensing server, you are free to choose which event to trigger an email alert. My preference is to use the event ID 9018 error to trigger the alert so begin by opening up the Event Viewer, locate the log in the System log, right click on the item and click on Attach Task To This Event…:
Give the task a name and then click on Next:
Citrix XenApp cannot contact the license server
Note the event being logged and click Next:
Select Send an e-mail and click on Next:
Fill in the appropriate fields:
Citrix XenDesktop (XenDesktopServerName) cannot contact the license server. The server will be entering a licensing grace period now.
Review the settings, check the checkbox Open the Properties dialog for this task when I click Finish then click on the Finish button:
In the properties window of the alert, click on the Change User or Group… button to change the account that is going to be used to run this task (it defaults to the account you’re logged into):
Change the account to NT AUTHORITY\LOCAL SERVICE and click OK:
Now that we have monitoring set up to send e-mail alerts when the XenApp server is unable to contact the licensing server, the next step is to set up an alert when it is able to contact licensing server again. The event we’re going to monitor will be event ID 9016:
Complete the same steps as we did for the error (I won’t go into as much detail as the first example:
Citrix XenApp has successfully contacted the license server licensingServerName.
The Citrix Broker Service on Citrix XenDesktop (XenDesktopServerName) is successfully communicating with the license server. This controller is no longer in the licensing grace period.
An alert will now be sent when the XenApp server loses connectivity to the licensing server and another alert will be sent when it re-establishes connection.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Note that if you would like to edit the properties of the alerts at a later time, you can find these alerts in Configuration –> Task Scheduler –> Task Scheduler Library –> Event Viewer Tasks:
Hope this helps anyone out there looking for a quick way to monitor licensing alerts with Windows Server 2008 R2 native alerts.
2 comments:
Excellent tips, good for time saving.
Very helpful Terence.
Cheers
Post a Comment