How to Configure and Monitor the License Hub

Changing the Default Listening Port
By default on Windows, the LicenseHub will be installed in C:\Program Files\Open Automation Software\OAS LicenseHub. On Linux, following the intallation instructions the LicenseHub will be in /opt/oaslicensehub/. Within this directory, you will find a hubconfig.json file. If you would like to change the default listening port, you can change it here -- Changing the port will require you to restart the service.
Tips
The LicenseHub uses port number 5050 by default to communicate with OAS server instances. Be sure to allow TCP communications on this port (or the port you've chosen above) within any active firewalls, or your OAS instances will not be able to active their license.
Monitoring LicenseHub Status
Within the LicenseHub installation directory, an OASLicenseHubCLI executable is included. This is a console application that can be called to get details on connected nodes as well as current license allocations.
The following operations are supported from a console:
| Operation | Description |
|---|---|
| OASLicenseHub | Calling with no flags or with -help will display all available commands |
| OASLicenseHub -license | Displays JSON formatted information about the enabled features, max server count, max tags, and max instances of drivers, as well as the license expiration date |
| OASLicenseHub -status | Displays JSON formatted summary of the current license allocations |
| OASLicenseHub -nodes | Displays JSON formatted array of information detailing each connected node, its IP address, last heartbeat, and allocations |
Other LicenseHub Configuration Options
Within the LicenseHub installation directory there is a hubconfig.json file with the following default structure:
{
"TcpPort": 5050,
"BindAddress": "0.0.0.0",
"ExpectedHeartbeatIntervalSeconds": 60,
"HeartbeatWarningThresholdSeconds": 90,
"CleanupIntervalSeconds": 30,
"Logging": {
"Enabled": true,
"Level": "Debug"
}
}
These are how each of these fields/properties affect the operation of the LicenseHub:
| Property | Description | Restrictions |
|---|---|---|
| TcpPort | the TCP port on which the LicenseHub communicates with nodes. This port needs to be open in any firewalls, and must match the port configured in the licenseHub.config file in each node as described above | required |
| BindAddress | the IP address that the LicenseHub will bind to on startup. In most cases, this can be left as 0.0.0.0 which is localhost | required |
| ExpectedHeartbeatIntervalSeconds | the number of seconds the LicenseHub expects nodes to periodically send a heartbeat call. If this interval is exceeded, the LicenseHub will begin preparing to release that node's allocation if the node continues to miss heartbeat calls. | required (5 – 1800) |
| HeartbeatWarningThresholdSeconds | Maximum time since the last heartbeat before a node is marked as "warning" (deadband state). If a node misses heartbeats beyond this threshold, the Hub considers it potentially disconnected but doesn't immediately revoke its license. | required (10 – 3600) |
| CleanupIntervalSeconds | How often the LicenseHub checks for expired or timed-out node allocations. Nodes that exceed the heartbeat timeout (3× the expected heartbeat interval) are released and their license slots become available for other nodes. | required (5 – 60) |
| Logging | Controls logging output to the Logs directory within the LicenseHub installation directory. If omitted entirely, logging will be disabled. If included, you can toggle on/off with tne Enabled property and choose to set the Level to Debug or Information. Debug is more verbose and technical output that may help with debugging any behavior. | optional |
Tips
The ExpectedHeartbeatIntervalSeconds is only set within the LicenseHub, and passed down to the OAS service nodes controlling the rate at which they call back to the Hub to reaffirm connectivity. In this way the Hub and nodes always remain in sync.
Any change to the hubconfig.json requires the LicenseHub service to be restarted.
Handling Connectivity Scenarios
| Scenario | LicenseHub Behavior | Node(s) Behavior |
|---|---|---|
| After nodes connect, the LicenseHub is rebooted | LicenseHub restarts and listener is brought back online with a new certificate | Heartbeat call fails, so nodes reestablish connectivity handshake and send new license request |
| Node has a successful license, but then cannot connect to LicenseHub for heartbeats | If 3x expected heartbeat intervals is exceeded, the LicenseHub releases that node's allocations back into the pool | If unable to connect after 5 retries, the node will disable its own license |
| Node requests allocations that exceed available tags, servers, or drivers | Responds with failure message indicating the invalid allocation request | receives failure message and disables the license |
| Node does not have matching licenseReg file with LicenseHub | rejects all communications from that node as unauthorized | License is disabled |
| LicenseHub does not have either the licenseKey or licenseReg files | all communications is disabled | License is disabled |
