Introduction
This knowledge base article provides guidance and solutions for common Consul licensing issues. Whether you're facing problems during initial license activation, encountering renewal errors, or dealing with unexpected license expirations, this guide will help you identify, understand, and resolve these challenges effectively.
We'll cover a range of topics, including:
- Common license error messages and their meanings.
- Troubleshooting steps for specific license problems.
- Best practices for managing your Consul licenses.
- Tips for preventing license-related issues.
By following the information and instructions provided here, you can ensure the smooth operation of your Consul deployments and avoid disruptions caused by licensing problems.
Prerequisites
- A Consul Enterprise License
- A Consul Enterprise Binary
Scenarios
Problem: The Consul license has expired, even though there is sufficient time before the termination date.
To better understand the Consul license status and pinpoint any potential issues, run the following command:
$ consul license inspect /path/license.hclic
-
Important: Make sure to replace
/path/to/your/license.hclic
with the actual path and filename of your Consul license file. - For more details related to this command, refer to the Consul License inspect documents.
$ consul license inspect license.hclic Source: license.hclic Product: consul License ID: 6d43db62-bc7d-9d79-1a91-5da295531xxx Customer ID: 1354a45b-0975-9beb-3193-4c0339dedxxx Installation ID: * Issue Time: 2020-10-23 09:19:17.567677828 +0000 UTC Start Time: 2020-10-23 00:00:00 +0000 UTC Expiration Time: 2021-10-22 00:00:00 +0000 UTC Termination Time: 2031-10-21 00:00:00 +0000 UTC Features: Automated Backups Automated Upgrades Validation Errors: * license is expired
The output above shows that the Consul license has expired, but it's important to understand the distinction between expiration and termination:
- Expiration Time: This indicates when your license is no longer valid for receiving updates or support. Consul will continue to function normally after this date.
- Termination Time: This marks the date when Consul will cease operation. It is typically set 10 years after the expiration date.
In this case, Consul will continue to run without issues for now.
Next Steps
- Contact your Account Manager: Reach out to your account manager to obtain a renewed license file.
-
Apply the new license: Once you receive the updated license, apply it to your Consul servers using the
consul license put
command.
For more information on managing Consul licenses, please refer to this helpful guide: Consul Enterprise License
Problem: Validation Errors Updating Consul License (incorrectly formatted license)
$ consul license inspect license.hclic Source: license.hclic Validation Errors: incorrectly formatted license
It appears that the license file in question might be invalid or corrupted. To help resolve this, answer the following questions:
- Have any manual changes been made to the license file? If so, it's essential to revert to the original, unaltered file.
- Are you working with the original license file you received from HashiCorp? If the issue persists with the original file, your CSM can provide a new one.
In the meantime, please share the original license file with our Support Team. This will allow us to test it in our lab environment and identify any issues.
Important: Ensure you're using the correct license version for your Consul version:
- License Version 1 (v1): For Consul versions older than 1.6
- License Version 2 (v2): For Consul versions 1.6 and later
You can check your license version using this command:
echo "License Type is: v$(cat <license_file> | cut -c2)"
- Replace
<license_file>
with the actual path to your license file.
If there's a mismatch between your Consul version and the license version, please contact your account manager or Sales representative to obtain the correct license.
-
The following list serves as an excellent starting point for gaining insights into the license changes introduced in Consul Enterprise 1.10.0+ent.
Problem: Receiving the Error "error decoding version: expected integer" in Consul
When you run the consul license inspect
command and encounter the error message "error decoding version: expected integer," it indicates that Consul is unable to read the license file.
Cause
The "error decoding version: expected integer" message often means your license file is corrupted or invalid. This can happen if the file was altered unintentionally.
For example, some programs add special hidden characters called Byte Order Marks (BOMs) to the beginning of files. If you use the cat <license_file>
command to view your license file's content, you might see characters like �� at the beginning, indicating the presence of BOMs. These characters can interfere with Consul's ability to read the license file.
Solution
-
Verify File Integrity: Ensure the license file hasn't been modified or corrupted during download or storage. Re-download the file if necessary.
- Inspect File Content: If possible, open the license file in a text editor to look for any obvious errors or unusual characters. However, be cautious not to modify the file.
Recreate the license file using a text editor program that doesn't encode with BOMs or use the command line interface to create a file without the miscellaneous characters.
Conclusion
This knowledge base article is your go-to resource for navigating Consul licensing. We've compiled information and effective solutions to common licensing challenges, empowering you to resolve issues confidently.
Whether you're troubleshooting activation errors, exploring license features, or seeking best practices for license management, this guide has you covered. We aim to enhance your Consul experience by providing clear explanations and practical solutions.
We hope this information helps you use Consul seamlessly and efficiently. If you have any further questions or require additional assistance, please don't hesitate to contact our support team.