PmLicServer licence server
is included in the installation package of PROMOTIC 9. PmLicServer licence server
allows to provide the licences
to PROMOTIC applications either locally
or via network
. This way, it is not necessary to have licence in its own HW Key for each individual PROMOTIC application. This licencing procedure can also solve problems in the PROMOTIC application running in virtualized environment, where the PROMOTIC application cannot access the physical HW Key connected to USB port. PmLicServer licence server
is usually automatically
launched on computer boot as a service
of the Windows OS
In order to assure correct functionality it is necessary, that the computers with PROMOTIC applications (licence clients) have network connectivity via the HTTP
protocol to the computer with the PmLicServer licence server
program. The communication between PROMOTIC application and the licence server happens not only when the application is launching, but also after that, repeatedly 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 licences on the licence server are so-called "floating"
: The PROMOTIC applications can be launched on any computer (connected to the network) but the number of simultaneously running applications can not exceed the number of runtime licences 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.
Local mode for licence carriers hwkey and swkey
In this mode the PmLicServer licence server is not protected (licenced) by its own HW Key
. The licence server provides locally
licences to PROMOTIC applications from carriers hwkey
(.SWK file). The licence server periodically reads all available HW Keys and provides the licence content of such keys as it was obtained during the last periodical reading.
Setup example of the licence server not protected by its HW Key (local mode):
Network mode for licence carriers netkey
In this mode the PmLicServer licence server is protected by its own HW Key
, where the HW Key number must be defined in the configuration file PmLicServer.ini
. The presence of the HW Key is periodically checked. The licence server provides PROMOTIC applications with licences via network from netkey
carriers (.SWK file). The network licence carried by netkey
(.SWK file) is generated for specific licence server protected by a HW Key. The licence will not be accepted by PROMOTIC application if the licence server is not configured properly or the HW Key is missing or has invalid number.
Setup example of the licence server protected by its HW Key 1234 (network mode):
Installation, uninstallation of the licence server and service configuration
The program is a part of the PROMOTIC installation and can be installed individually on the computer designated to be a licence server. The PmManager
can be used to configure the PmLicServer licence server
so it is launched automatically as Windows OS
as service at computer start. The PmLicServer licence server
service can be configured, stopped and launched by using the standard Windows OS
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:
PmLicServer -i - Adds the Windows OS service for the PmLicServer licence server program. The service will be configured in order to launch automatically on system boot. It is done automatically during the program installation.
PmLicServer -u - Removes the Windows OS service of the PmLicServer licence server program. It is done automatically during the program uninstallation.
PmLicServer -s - Launches the Windows OS service of the PmLicServer licence server program.
PmLicServer -k - Stopps the Windows OS service of the PmLicServer licence server program.
PmLicServer - Launches the PmLicServer licence server program as a normal application, not as a 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 PmLicServer.ini
configuration file. This file is created automatically during the installation and is located in the \GCfg
Description of the keys in the [Config]
- The key allows to modify the port and protocol (HTTP
) that will be used for listening by the internal Web server of the PmLicServer licence server
program. If not set, then the default value http://+:5656/
is used, it means that the HTTP
protocol on port 5656
is used. The ";"
character at the beginning of the line changes it to a comment. Such line is not taken into account.
Example of the PmLicServer.ini configuration file for the HTTP protocol, localhost, and port 5656. For the licence server working only in local mode, it is handy for safety reasons to limit the Web server listening only on localhost interface (127.0.0.1 or ::1).
Example of the PmLicServer.ini configuration file for the HTTP protocol and port 81
Example of the PmLicServer.ini configuration file for the HTTPS protocol and default port 443
- This key defines whether the information regarding client licence refersh is written into the Log
file. The 1
value enables writing, the 0
value disables writing (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
Example of the PmLicServer.ini configuration file that enables logging of periodical client licence refresh into the Log file
Commissioning the HTTPS protocol of the licence server:
- Key specifies whether the licence server will be running in local or network mode.
- Local mode. Only for reading hwkey
licence carriers from local computer (the application and the licence server must be on the same computer).
- Network mode with HW Key protecting the licence server. The netkey
licence carriers can be accessed via network. The hwkey
licence carriers can only be accessed from local computer (the application and the licence server must be on the same computer).
Example of the PmLicServer.ini configuration file for setting the specific HW Key with number 1234 for protection of the licence server (in network mode).
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 of 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 status of provided network licences and also the history of network licence clients logins and logouts. The monitoring is provided via the Web interface. PmLicServer licence server
contains an internal Web server, that offers the info.html
pages on it s IP address, protocol and port. For example http://localhost:5656/info.html
file is created automatically in the \GTemp
Behavior of the PROMOTIC application when the connection with the licence server is lostIf the periodic communication with the licence server is permanently failing
, or if the connection with licence carrier is lost in general
(the HW Key is not accessible for the licence server or for the application), 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 licence server 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 or after the licence becomes accessible. 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 or the licence carrier is not accessible then the PROMOTIC application cannot be launched.
The time protection interval of the application before it is stopped, because of the licence server communication failure is relevant only for application that are already 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 ?:\Promotic\Licences
, where the netkey
indicates the network licence, http
specifies the protocol, followed by the IP address or computer name, internal Web server port and the licence SWK file name.
user must have the permissions for writing into following files: