As part of their deployment process, many enterprise customers set up the Key Management Service (KMS) to enable activation of Windows in their environment. It is a simple process to set up the KMS host, after which the KMS clients discover the host and try to activate on their own. But what happens if that process doesn’t work? What do you do next? This article walks you through the resources that you require in order to troubleshoot the issue. For more information about event log entries and the Slmgr.vbs script, see Volume Activation Technical Reference.
Run setvrlservice and use the -server=server name or IP and -port=port number options to change your license settings, where server name or IP is the IP address or name of the machine where the License Server is running without the enclosing ' and ' characters. The default port number is 30304. Oct 22, 2019 Best practices. Use Windows Server 2019 for your Remote Desktop infrastructure (the Web Access, Gateway, Connection Broker, and license server). Windows Server 2019 is backward-compatible with these components, which means a Windows Server 2016 or Windows Server 2012 R2 RD Session Host can connect to a 2019 RD Connection Broker, but not the other way around.
Let’s start with a quick refresher on KMS activation. KMS is a client-server model. Conceptually, it resembles DHCP. Instead of handing out IP addresses to clients on their request, KMS enables product activation. KMS is also a renewal model, in which the clients try to reactivate on a regular interval. There are two roles: the KMS host and the KMS client.
From a troubleshooting perspective, you may have to look at both sides (host and client) to determine what is going on.
There are two areas to examine on the KMS host. First, check the status of the host software license service. Second, check the Event Viewer for events that are related to licensing or activation.
To see verbose output from the Software Licensing service, open an elevated Command Prompt window and enter slmgr.vbs /dlv at the command prompt. The following screenshot shows the results of this command on one of our KMS hosts within Microsoft.
The most important fields for troubleshooting are the following. What you are looking for may differ, depending on the issue to be solved.
Version Information. At the top of the slmgr.vbs /dlv output is the Software Licensing Service Version. This may be useful to determine whether the current version of the service is installed. For example, updates to the KMS service on Windows Server 2003 support different KMS host keys. This data can be used to evaluate whether or not the version is current and supports the KMS host key that you are trying to install. For more information about these updates, see An update is available for Windows Vista and for Windows Server 2008 to extend KMS activation support for Windows 7 and for Windows Server 2008 R2.
Name. This indicates the edition of Windows that is installed on the KMS host system. This can be important for troubleshooting if you are having trouble adding or changing the KMS host key (for example, to verify that the key is supported on that OS edition).
Description. This is where you see the key that is installed. Use this field to verify which key was used to activate the service and whether or not it is the correct one for the KMS clients that you have deployed.
License Status. This is the status of the KMS host system. The value should be Licensed. Any other value means that something is wrong and you may have to reactivate the host.
Current Count. The count displayed will be between 0 and 50. The count is cumulative (between operating systems) and indicates the number of valid systems that have tried to activate within a 30-day period.
If the count is 0, either the service was recently activated or no valid clients have connected to the KMS host.
The count will not increase above 50, no matter how many valid systems exist in the environment. This is because they count is set to cache only twice the maximum license policy that is returned by a KMS client. The maximum policy today is set by the Windows client OS, which requires a count of 25 or higher from the KMS host to activate itself. Therefore, the highest count on the KMS host is 2 x 25, or 50. Note that in environments that contain only Windows Server KMS clients, the maximum count on the KMS host will be 10. This is because the threshold for Windows Server editions is 5 (2 x 5, or 10).
A common issue that is related to the count is if the environment has an activated KMS host and enough clients, but the count does not increase beyond one. The core problem is that the deployed client image was not configured correctly (sysprep /generalize) and the systems do not have unique Client Machine IDs (CMIDs). For more information, see KMS client and The KMS current count does not increase when you add new Windows Vista or Windows 7-based client computers to the network. One of our Support Escalation Engineers has also blogged about this issue, in KMS Host Client Count not Increasing Due to Duplicate CMID’S.
Another reason why the count may not be increasing is that there are too many KMS hosts in the environment and the count is distributed over all of them.
Listening on Port. Communication with KMS uses anonymous RPC. By default, the clients use the 1688 TCP port to connect to the KMS host. Make sure that this port is open between your KMS clients and the KMS host. You can change or configure the port on the KMS host. During their communication, the KMS host sends the port designation to the KMS clients. If you change the port on a KMS client, the port designation is overwritten when that client contacts the host.
We often get asked about the “cumulative requests” section of the slmgr.vbs /dlv output. Generally this data is not helpful for troubleshooting. The KMS host keeps an ongoing record of the state of each KMS client that tries to activate or reactivate. Failed requests indicate KMS clients that the KMS host does not support. For example, if a Windows 7 KMS client tries to activate against a KMS host that was activated by using a Windows Vista KMS key, the activation fails. The “Requests with License Status” lines describe all the possible license states, past and present. From a troubleshooting perspective, this data is relevant only if the count is not increasing as expected. In that case, you should see the number of failed requests increasing. This indicates that you should check the product key that was used to activate the KMS host system. Also, notice that the cumulative request values reset only if you reinstall the KMS host system.
The KMS host logs Event ID 12290 when a KMS client contacts the host in order to activate. Event ID 12290 provides a significant amount of information that you can use to figure out what kind of client contacted the host and why a failure occurred. The following segment of an event ID 12290 entry comes from the Key Management Service event log of our KMS host.
The event details include the following information:
If you are troubleshooting a client and cannot find a corresponding event ID 12290 on the KMS host, that client is not connecting to the KMS host. Some reasons why an event ID 12290 entry may not exist are as follows:
KMS clients log two corresponding events, event ID 12288 and event ID 12289. For information about these events, see the KMS client section.
Another relevant event to look for on your KMS host is event ID 12293. This event indicates that the host did not publish the required records in DNS. This situation is known to cause failures, and it is something that you should verify after you set up your host and before you deploy clients. For more information about DNS issues, see Common troubleshooting procedures for KMS and DNS issues.
On the clients you use the same tools (Slmgr and Event Viewer) to troubleshoot activation.
To see verbose output from the Software Licensing service, open an elevated Command Prompt window and enter slmgr.vbs /dlv at the command prompt. The following screenshot shows the results of this command on one of our KMS hosts within Microsoft.
The following list includes the most important fields for troubleshooting. What you are looking for may differ, depending on the issue to be solved.
When a KMS client successfully activates or reactivates, the client logs two events: event ID 12288 and event ID 12289. The following segment of an event ID 12288 entry comes from the Key Management Service event log of our KMS client.
If you see only event ID 12288 (without a corresponding event ID 12289), this means that the KMS client was not able to reach the KMS host, the KMS host did not respond, or the client did not receive the response. In this case, verify that the KMS host is discoverable and that the KMS clients can contact it.
The most relevant information in event ID 12288 is the data in the Info section. For example, this section shows the current state of the client plus the FQDN and TCP port that the client used when it tried to activate. You can use the FQDN to troubleshoot cases in which the count on a KMS host is not increasing. For example, if there are too many KMS hosts available to the clients (either legitimate or rogue systems) then the count may be distributed over all of them.
An unsuccessful activation does not always mean that the client has 12288 and not 12289. A failed activation or reactivation may also have both events. In this case, you have to examine the second event to verify the reason for the failure.
The Info section of event ID 12289 provides the following information:
If you have to call Support to troubleshoot activation, the Support Engineer typically asks for the following information:
This documentation is for configuring your FlexLM licence server to be utilised by an external supercomputer/cluster/cloud etc. This will need to be done by your IT department, as it involves changes to the FlexLM server and firewalls.
Consult the Pawsey documentation for individual Ansys products on how to write jobscripts for them. Generally you need to set two variables in a jobscript before running the product:
Note that you will need to change myflexlmserver.edu.au with the hostname of the FlexLM licence server.
Getting Ansys licencing to work through a firewall can be confusing. The usual problem is that only two of the three ports get opened through a firewall. The third port is not obvious based on the user only being required to set two port numbers in their environment as above. Further, by default this third port is not locked to a specific port number.
There are three TCP port numbers to consider.
Just stick to the default port of 2325.
Your licence file (license.dat) from Ansys probably looks like this to begin with:
where hostid is the MAC address of the server. hostname might be the short hostname, myflexlmserver, or the fully qualified domain name (FQDN), myflexlmserver.edu.au.
Change the licence file to look like
where hostname is the FQDN. The ansyslmd port is a random available port. Note that it is usually safe to run other vendor daemons off the same FlexLM lmgrd, in which case they will need the same port number on the SERVER line.
Open up all three ports in your firewalls. Remember both the client and server boxes, not just firewalls in between. Open access to the client machine or subnet, but not more than that.
First make sure ANSYSLI_SERVERS and ANSYSLMD_LICENSE_FILE are set appropriately.
On Magnus:
Using lmstat:
Using nmap:
A status of 'filtered' means the port is blocked by a firewall, which could be an actual firewall or on the server itself. A status of 'closed' means the port is open through firewalls but the daemon is not listening on that port number, which is usually the case for the third port if you have not fixed it on the VENDOR line of the licence file.
Make sure the Fully Qualified Domain Name of the licence server is used on the SERVER line of the licence file. Do not use the default of the short hostname.
Lock down the ansyslmd port with a port= statement on the VENDOR line of the licence file. Make sure this port is open in your firewall. This is likely to be the problem if lmstat gives an error but ansysli_util works fine.
Things you need to knowAdditional information on the Telstra 24x7 App for iPad ('App'): (a) Telstra provides the App on the terms and conditions in its End User Licence Agreement; (b) The App is only available to customers with an Apple iPad that runs iOS 4.3+; (c) The App currently only supports Telstra Personal customers; (d) Standard data charges apply to download the App. Telstra credit hack.
On the client create a file in your home director, .flexlmrc, with the contents:
Then run lmutil as normal.
On the server, create an options file in the same directory as the licence file, with the same filename but with extension .opt. Give it the contents:
Alternatively you can specify the name of the options file using the DAEMON line in a licence file. Consult the FlexLM documentation for that.
By default Fluent may attempt to use commercial licences. To change it to prefer academic licences, do the following. You will need to have used ssh -X since the licence admin is a GUI.
2. Select the appropriate ANSYS release. It is probably the bottom of the list.
3. On the Solver tab, either move ANSYS Academic Research to the top, or disable 'ANSYS CFD'. You might as well disable the teaching licences.
4. Similarly on the HPC tab, disable ANSYS HPC Pack and/or move it to the bottom.