Troubleshooting Terminal Server Licensing Issues (Part 1)

If you would like to read the other articles in this series please go to:

Once licensing has been properly set up in the environment, there are few licensing-related problems you are likely to encounter. In this four-part series, we will look at the most popular licensing-related issues and how to deal with them. Parts one through three will focus on popular server-related licensing issues while part four will look at common issues from the client side.

Verifying License Server Installation

The most popular issues are the result of incorrect setup or configuration, or failure to fully understand the licensing process and requirements. Believe it or not, the cause of many licensing issues comes down to simply overlooking the fact that a license server is necessary. Because terminal servers have an automatic 180-day grace period, people sometimes forget to install and activate a license server. Once the grace period runs out, the terminal servers will no longer accept connections. It is usually at this point that someone realizes they neglected to install a license server.

If you know a license server is not yet installed, it’s easy to do so. Any Windows Server 2003 instance can be a license server. The Terminal Server Licensing component is installed through Add/Remove programs. When installing a license server, discoverability is critical, so check out my articles on License Server Discovery and License Server High Availability.

Common event log entries when no license server has been installed are below:

Event ID

Source

Description

1008

TermService

The terminal services licensing grace period has expired and the service has not registered with a license server.

1009

TermService

The terminal services licensing grace period is about to expire on <date> and the service has not registered with a license server with installed licenses.

These events indicate that the terminal server has not yet registered with a license server and the grace period will be expiring soon (ID 1009) or has already expired (ID 1008). 

Be sure a license server has been installed in your environment and check that the Terminal Server Licensing service is started and set to Automatic. Also make sure there is no network connectivity or routing issues between the terminal servers and the license server. If the license server is located on the opposite side of a firewall from the terminal servers, be sure standard RPC communication is open between the two.

Event ID 1009 may also be observed when Windows Server 2003 terminal servers are installed in per-user mode from the start, resulting in the LicensingGracePeriodEnded registry key not being set. This key suppresses the event log entries from being logged.

The fix is to add the LicensingGracePeriodEnded key on the license server.

  1. Locate the following registry key on the Windows Server 2003 terminal server:
    HKLM\System\CurrentControlSet\Services\TermService\Parameters
  2. Add a new DWORD value named LicensingGracePeriodEnded with a NULL (0) data value.

When terminal servers are in per-user mode, the grace period has no bearing on connectivity to the event log entries are innocuous. The above steps just suppress the messages.

One last note on verifying license server installations – be sure you have the correct version of a license server installed to support the terminal servers. Windows Server 2003 terminal servers require a Windows Server 2003 license server; they cannot leverage a Windows 2000 license server.

Terminal Servers Cannot Locate a License Server

Probably the most common licensing-related issue is the failure to discover the license server. My article on License Server Discovery covers this topic in depth, including some troubleshooting steps, so I’ll just review the key points.

When a license server cannot be contacted the following messages may be logged to the Windows event log:

Event ID

Source

Description

1000

TermService

Unable to acquire a license for user <user>, domain <domain>

1004

TermService

The terminal server cannot issue a client license.

1010

TermService

The terminal server could not locate a license server

Event IDs 1000 and 1004 are logged when the terminal server attempts to allocate a CAL to a device upon connection, but cannot locate a license server or no licenses are available. Event ID 1010 is typically seen with 1004 when no license server can be contacted. The most common root cause for these event log entries is a failure to discover the license server.

LSVIEW

License Servers must be discovered by Terminal Servers. Once located, a digital certificate exchange takes place so the terminal server can check CALs allocated to clients by the license server. Discoverability is critical. The Windows Server 2003 Resource Kit utility LSVIEW is an administrator’s view into the discovery process and can log key information to a text file to aid in troubleshooting. When launched on a terminal server, this utility will display any license servers that are discovered, and list the type of license server (Domain or Enterprise), as seen in Figure 1.


Figure 1: LSVIEW

If no servers are displayed in LSVIEW, either the license servers are offline, or they cannot be discovered by this terminal server.

Enterprise License Servers

License Servers are discovered a few different ways, depending on which mode the license server was installed.  When an Enterprise License Server is installed, an Active Directory registration is created under the configuration container in the site to which the license server host belongs. When the license server is installed, the administrator performing the installation must have the appropriate rights in AD to create the object. If not, the registration may not complete and the terminal server may not be able to discover the license server.

To verify the entry was successfully created, use ADSIEDIT from the Windows Server 2003 Support Tools to check for its existence in the configuration container:

LDAP://CN=TS-Enterprise-License-Server,CN=<sitename>,CN=sites,CN=configuration, DC=<domainname>,DC=com

Under the properties of this object, look for the siteServers attribute and check the values. This identifies the registered license server(s) for the Active Directory site.

Recommendations for Discoverability

For the full details on license server discovery, check out my articles on the subject, also available on this site. To summarize, follow these suggestions to ensure your license servers are easily discovered:

  • Install Enterprise-mode license servers in the same Active Directory domain or site as your terminal servers to ensure they are always discovered.
  • If an Enterprise-mode license server is not possible in your environment, load the license service on a domain controller where it is more likely to be discovered.
  • An easy way to ensure the license server is discovered is to leverage the LicenseServers registry key located here on each terminal server:
    HKLM\System\CurrentControlSet\Services\TermService\Parameters\LicenseServers
    This overrides the discovery process and will ensure the license server is discovered.
  • Install more than one activated license server in your environment to ensure redundancy.

Finally, some additional things to check here are basic network and RPC connectivity, and be sure the license server is online and the license service is started.

License Server Security Group GPO

Windows Server 2003 introduced the ability to control which terminal servers can access a particular license server through the use of a new group policy setting – License Server Security Group. If you are leveraging this policy, be sure that the terminal server in question has been added to the policy so it can access the licensing services. 

Also check to see if the terminal server in question is the license server. There is a known issue in the new functionality where if the server that requests the license is the same machine as the license server, the operation fails. A hotfix is available to correct this issue and can be obtained from Microsoft Product Support Services. See Microsoft KB 834803 for more information.

Conclusion

In this segment, we looked at a few common problems that can lead to licensing-related issues. We’ll continue this discussion in parts two and three where we will cover additional server-related issues and conclude with possible client-side issues in part four.

If you would like to read the other articles in this series please go to:

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top