This is a prerelease version.

View latest

Manage Enterprise Edition license keys

To use Hazelcast Enterprise Edition, you need an Enterprise Edition license key. This topic explains how to get a license key, install it on a member, and manage it.

Get Enterprise Edition license key

Hazelcast Enterprise Edition requires a license key. You can get a 10-day trial license from the Hazelcast website.

  1. Complete the form on the Hazelcast website

  2. Check your email for an automated email from [email protected]

  3. You should have a license key that looks like:

    TrialLicense#10Nodes#eyJhbGxvd2VkTmF0aXZlTWVtb3J5U2l6ZSI6MTAwLCJhbGxvd2VkTnVtYmVyT2ZOb2RlcyI6MTAsImFsbG93ZWRUaWVyZWRTdG9yZVNpemUiOjAsImFsbG93ZWRUcGNDb3JlcyI6MCwiY3JlYXRpb25EYXRlIjoxNzUyMTU0ODYzLjMxODUyNzg2MSwiZXhwaXJ5RGF0ZSI6MTc1NDY5NzU5OS45OTk5OTk5OTksImZlYXR1cmVzIjpbMCwyLDMsNCw1LDYsNyw4LDEwLDExLDEzLDE0LDE1LDE3LDIxLDIyXSwiZ3JhY2VQZXJpb2QiOjAsImhhemVsY2FzdFZlcnNpb24iOjk5LCJvZW0iOmZhbHNlLCJ0cmlhbCI6dHJ1ZSwidmVyc2lvbiI6IlY3In0=.enSTWffnYK_rBdTC7LOVISPYYaEfwdM7giv8ZBH4iq2b5vHuA5U-OswteJUmF8jHXyyo9j0oKBWkvgxe6PBKAQ==

    In any provided code examples in this documentation, you should replace any instances of <YOUR_LICENSE_KEY> with your specific license key.

Configure a license key on members

To use Hazelcast Enterprise Edition, you need to add a license key for all members in a cluster.

Hazelcast Enterprise Edition license keys are only required for members. You don’t need to set a license key for Java clients that are connected to members.
  • XML

  • YAML

  • Java

  • Environment Variable

  • System Property

Replace <YOUR_LICENSE_KEY> with your official license key.

<hazelcast>
    <license-key><YOUR_LICENSE_KEY></license-key>
</hazelcast>

Replace <YOUR_LICENSE_KEY> with your official license key.

hazelcast:
  license-key: <YOUR_LICENSE_KEY>

Replace <YOUR_LICENSE_KEY> with your official license key. Add your license using the setLicenseKey() method:

Config config = new Config();
config.setLicenseKey( "<YOUR_LICENSE_KEY>" );
HZ_LICENSEKEY=<YOUR_LICENSE_KEY>
-Dhazelcast.enterprise.license.key=<YOUR_LICENSE_KEY>

Monitor license keys

It’s important to keep track of when your license key is due to expire. If you have an expired license, Hazelcast will not start.

When a license is about to expire, Hazelcast issues the following warning in the member logs:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
HAZELCAST LICENSE WILL EXPIRE IN 29 DAYS.
Your Hazelcast cluster will stop working after this time.

Your license holder is [email protected], you should have them contact
our license renewal department, urgently on [email protected]
or call us on +1 (650) 521-5453

Please quote license id CUSTOM_TEST_KEY
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

The frequency of these warnings varies depending on the time remaining before license expiry.

Table 1. Frequency of warnings about license expiration
Time until expiry Warning frequency

Two months

Daily

One month

Hourly

One week

Every 30 minutes

To get details about your current license, you can use Management Center, the JMX API, or REST API.

Get license details with JMX API

The MBean HazelcastInstance.LicenseInfo holds all license details and can be accessed through Hazelcast’s JMX port (if enabled). The following parameters represent these details:

  • maxNodeCountAllowed: Maximum members allowed to form a cluster under the current license.

  • expiryDate: Expiration date of the current license.

  • typeCode: Type code of the current license.

  • type: Type of the current license.

  • ownerEmail: Email of the current license’s owner.

  • companyName: Company name on the current license.

The following list shows license types and codes:

MANAGEMENT_CENTER(1, "Management Center"),
ENTERPRISE(0, "Enterprise"),
ENTERPRISE_SECURITY_ONLY(2, "Enterprise only with security"),
ENTERPRISE_HD(3, "Enterprise HD"),
CUSTOM(4, "Custom");

Get license details using the REST API

You can access license details by sending a GET request to the /license endpoint.

curl -v http://localhost:5701/hazelcast/rest/license

Its output is similar to the following:

{
  "licenseInfo": {
    "expiryDate": 4090168799999,
    "maxNodeCount": 99,
    "type": 3,
    "companyName": null,
    "ownerEmail": null,"keyHash":"OsLh4O6vqDuKEq8lOANQuuAaRnmDfJfRPrFSEhA7T3Y="
  }
}

Get license details using Management Center

See Enterprise licenses in the Management Center documentation.

Renew a license key

License keys are valid for a certain period of time. For more information, see expiry date. To renew or upgrade, you can choose one of the following actions:

  • Send an email to Sales.

  • Send an email to Support.

  • Call your sales representative.

If your license expires on a running cluster or Management Center, do not restart the host device. Instead, contact Hazelcast Support to resolve any issues with an expired license.

Update a license key at runtime

When you receive the renewed or upgraded license, you can update it as follows:

  1. Shut down the members.

  2. Update the license key, as per Configuring a License Key on Members.

  3. Restart the members.

Alternatively, you can update the license key dynamically, without shutting down the members. You can use any of the dynamic configuration options to update a license key at runtime. For further information on these options, see Adding Dynamic Configuration.

The example in this section uses the REST API option with its dedicated /license endpoint. To update a license key at runtime:

  1. Enable the REST API.

  2. Send a POST request to the /license endpoint:

    curl --data "{cluster-name}&{password}&{license}" http://localhost:5001/hazelcast/rest/license
    The request parameters must be URL-encoded as described in the REST Client section.

    This command updates the license on all running Hazelcast members of the cluster. If successful, you should see something like the following:

{
  "status": "success",
  "licenseInfo": {
    "expiryDate": 1560380399161,
    "maxNodeCount": 10,
    "type": -1,
    "companyName": "ExampleCompany",
    "ownerEmail": "[email protected]",
    "keyHash": "ml/u6waTNQ+T4EWxnDRykJpwBmaV9uj+skZzv0SzDhs="
  },
  "message": "License updated at run time - please make sure to update the license in the persistent configuration to avoid losing the changes on restart."
}

If the update fails on some members, the whole operation fails, leaving the cluster in a potentially inconsistent state where some members have been switched to the new license while some have not. You must resolve this situation manually.

By default, if a member shuts down after you dynamically update the license key, its license key will not be retained.

To persist the license key, you can either enable persistence for dynamic configuration or update your members' configuration to include the new license key before you restart them.

For further information, see the following topics: