PmNetKey licence server - for PROMOTIC version
Pm8.2.0 -
8.3.32. It allows to provide the PROMOTIC licence to applications via networks.
The package contains the installation of PROMOTIC licence assignment and monitoring program. There is no need to use this program if the standard licencing is available for the PROMOTIC application (
Hardware (USB) licence key,
Licence file SWK extending the content of licence key or
Software licence key (.swk) bound to specific components of the Windows OS).
Download the file e.g.
PmNetKey10700.msi and launch it on the computer that will work as PROMOTIC licence server. This installation package will install the network licence server on this computer. See:
PmLicServer licence server.
PmNetKey |
PmNetKey licence server - for PROMOTIC version Pm8.2.0 - 8.3.32 |
19.10.2017 |
22 MB |
Download |
PmNetKey allows to
provide the licence to PROMOTIC applications
via networks. This way, it is not needed to have licence in own HW Key for each individual PROMOTIC application. This licencing procedure can also solve problems of the PROMOTIC application running in virtualized environment, where the PROMOTIC application cannot access the physical HW Key connected to USB port.
PmNetKey is protected by its own HW Key.
PmNetKey is usually
automatically launched on computer boot
as Windows service.
In order to assure correct functionality it is necessary, that the computers with the PROMOTIC application (licence clients) have network connectivity via the
HTTP or
HTTPS protocol to the computer with the
PmNetKey program. The communication between PROMOTIC application and the licence server happens not only when the application is launching, but also after that, periodically (the period is around 1 minute or or slightly longer).
The network connection with the licence server must be functional during the whole time the PROMOTIC application is running.
The licence on the licence server are so-called
"floating": The PROMOTIC applications can be launched on any PC (in the network) but the number of simultaneously running applications can not exceed the number of runtime licence present on the licence server. If, For example, there are 2 runtime licences present on the licence server, then it is possible to run 2 applications simultaneously. Additional application (third) can not be launched. If one of the running applications is stopped and thus does not communicate with the licence server for
10 minutes, then its licence is released on the licence server and available to be used by another application. Now it is possible to run the other application - it will use this released licence.
The PROMOTIC application network licence for
PmNetKey are provided in the form of the licence file (see
Network licence key). The licence file is functional only with the corresponding licence server, it was generated for. It will not function with another licence server.
Installation, uninstallation of the licence server and service configuration
The program has its own installation file, because it is often installed on a computer, where the PROMOTIC system is not present. The installation program can be downloaded from
https://www.promotic.eu/en/promotic/download/download.htm (e.g.
PmNetKey XXYYZZ.msi). The program is to be installed on the computer that is going to act as a licence server. During the installation, the program is configured as
Windows service with automatic launch on system boot. The
PmNetKey service can be configured, stopped and launched by using the standard
Windows OS resources (
services.msc service manager).
PmNetKey is protected by its own HW Key. The program is not functional without the HW Key. The HW Key must be generated especially for this purpose, normal PROMOTIC application HW Key cannot be used in such case.
The HW Key must be permanently present in the USB port of the computer that is running the
PmNetKey.
The program (service) can also be controlled from the command line by entering parameters. The command line window must be launched with the
Administrator rights. The commands are relevant in some special cases for example in
Windows OS *.bat files. Usually it is not necessary to use such commands because the
Windows OS service is configured during the program installation process and it is removed when the program is uninstalled. The configuration, stopping and launching is provided by using the standard
Windows OS resources. Individual commands:
PmNetKey -i - Adds the Windows service for the PmNetKey program. The service will be configured in order to launch automatically on system boot. It is done automatically during the program installation.
PmNetKey -u - Removes the Windows service of the PmNetKey program. It is done automatically during the program uninstallation.
PmNetKey -s - Launches the Windows service of the PmNetKey program.
PmNetKey -k - Stops the Windows service of the PmNetKey program.
PmNetKey - Launches the PmNetKey program as a normal application, not as Windows service. Application icon appears in the Windows OS Sys Tray among icons on the right. This can be handy for testing purposes.
Licence server configuration
The program is configured via the
PmNetKey.ini configuration file. This file is created automatically during the installation and is located in the same folder as
PmNetKey.exe (usually in the folder:
C:\Program Files\Promotic or
C:\Program Files (x86)\Promotic).
Description of the keys in the
[Config] section:
WebServer - The key allows to modify the port and protocol (
HTTP or
HTTPS) that will be used for listening by the internal Web server of the
PmNetKey program.
If not set, then the default value
http://+:81/ is used, it means that the
HTTP protocol and port
81 are used.
The
";" character at the beginning of the line changes it to a comment. Such line is not taken into account.
Example1:
Example of the PmNetKey.ini configuration file (HTTP protocol and port 83):
[Config]
WebServer=http://+:83/
Example2:
Example of the PmNetKey.ini configuration file (HTTPS protocol and standard port 443):
[Config]
WebServer=https://+:443/
LogDir - This key allows change of the default foder where the
Log file will be located.
If not set, then the
Log file is located in the same folder as the
PmNetKey.exe program. Be informed that the default installation directory may be read only.
Example:
Example of the PmNetKey.ini configuration file for placing the Log file into the "C:\Windows\Temp" folder:
[Config]
LogDir=C:\Windows\Temp
LogRefresh - This key specifies whether the information regarding client licence refersh is written into the
Log file. The
1 value enables writing, The
0 value disables writing. The default logging period is 1 minute for each client.
This may be useful for debugging problems with network licences but from long term point of view, periodically logging this information may overwrite other important logs from the circular log file(s).
If not set, then the logging of the licence client refresh into the
Log file is disabled (the
0 value).
Example:
Example of the PmNetKey.ini configuration file that enables logging of periodical client licence refresh into the Log file:
[Config]
LogRefresh=1
Medium - This key allows to define the specific HW Key that is used for runtime protection of the
PmNetKey licence server.
It may contain a list of HW Keys (separated by comma) that is being evalueated starting from first entry until the first connected HW Key is found (e.g.
hwkey:k1234,hwkey:k1111).
If not set, then the default value
"hwkey" is used, meaning any HW Key.
If the list is not defined and while multiple HW Keys are connected to the computer then after the computer is rebooted the licence server may get paired with another HW Key.
Example:
Example of the PmNetKey.ini configuration file that defines the specific HW Key with licence number 1234 for the protection of the licence server:
[Config]
Medium=hwkey:k1234
Commissioning the HTTPS protocol of the licence server:
The implementation of the licence server (Web server) is provided by the
Windows OS "HTTP service". The configuration of HTTPS protocol is done axactly the same way, as for the HTTPS protocol in the
PmaWeb object, i.e. by the utility
PmHttpConfig.exe (it is necessary to set the rights, import the certificate of the server and connect it with the corresponding Web server).
Monitoring the licence server functionality
The program allows to monitor the current state of provided network licences and also the history of network licence clients logins and logouts. The monitoring is provided via the Web interface.
PmNetKey contains an internal Web server, that offers the
info.html and
log.html pages on it s IP address, protocol and port. For example
http://localhost:81/info.html and
http://localhost:81/log.html.
Behavior of the PROMOTIC application when the connection with the licence server is lost
If the periodic communication with the licence server is permanently failing, then the
running PROMOTIC application goes through the following states:
1) information - first, the error message about the failed communication with the licence server is displayed in global errors. This state is reached after the first failure of the periodical communication. This state lasts around 10 minutes.
2) warning - after that, the warning window is displayed (repeatedly if the user closes it) and in the global errors the communication failure message is displayed. This state lasts around 48 hours.
3) error - finally, the situation is evaluated as fatal error, the application is stopped and licence error message is displayed in the global errors.
The states 1) and 2) are immediately terminated after first successfull periodical communication with the licence server. If the communication with the licence server fails permanently, then the application is stopped after 48 hours. The method
Pm.LicenceInfo(10) for
detection of time that has passed since the last successfull communication with the licence server can be used.
If the connection with the licence server is not functional, the PROMOTIC application cannot be launched. The time interval protection of the application before it is stopped, because of the licence server communication failure is applied only for application that are allready running.
Commissioning the SWK licence files on the licence server and the licence client
a) Licence server - The licence file it is necessary to copy into the "C:\Program Files\Promotic" folder or C:\Program Files (x86)\Promotic folder.
[Licence]
Medium=netkey:http://192.168.1.99:81/Pm1234.swk
where the
netkey indicates the network licence,
http or
https specifies the protocol, followed by the IP address or computer name, internal Web server port and the licence
SWK file name.
Caution:
Logged-in
Windows user must have the permissions for writing into following files: