[Elasticsearch] Fixing "License is not available, authentication is not possible" in Elasticsearch
Fixing “License is not available, authentication is not possible” in Elasticsearch
Elasticsearch, a powerful search and analytics engine, sometimes encounters licensing issues that prevent proper authentication. This guide will help you fix the “License is not available, authentication is not possible” error by registering, downloading, and activating a license.
Step 1: Register for a Free License
To resolve the licensing issue, you need to obtain a valid license from Elasticsearch. Follow these steps:
- Visit the Elasticsearch registration page: Elastic Registration.
- Complete the registration form to get a free basic license.
- After registration, you will receive an email with a download link for your license.
Step 2: Download the License
Check your email for a message from Elastic. The email contains a link to download your license. For example:
- Download link: Download License
Click the link and download the license file.
Step 3: Activate the License
To activate the license, you need to follow the activation method corresponding to your Elasticsearch version. For this example, we’ll use Elasticsearch 6.2. You can find the activation instructions in the Elasticsearch documentation: Update License.
You can activate the license using the curl
command:
- Open the license file you downloaded and locate the license details.
- Run the following
curl
command, replacing the placeholders with the appropriate values:
1 | curl -X POST "http://<ip>:<port>/_xpack/license?pretty" -H 'Content-Type: application/json' -d' |
Replace <ip>
and <port>
with your Elasticsearch instance’s IP address and port. Replace the license details with those from your downloaded license file.
Step 4: Verify the License Activation
After activating the license, you should verify that it has been correctly applied and check its validity period:
1 | curl -X GET 'http://<ip>:<port>/_xpack/license' |
This command will return the current license details, confirming that the activation was successful.
Step 5: Alternative Method for License Activation
If you prefer, you can also activate the license by uploading the license file directly. Use the following curl
command:
1 | curl -X PUT -u <user> 'http://<host>:<port>/_license' -H "Content-Type: application/json" -d @license.json |
Replace <user>
, <host>
, and <port>
with the appropriate values and ensure the license file is named license.json
.
Conclusion
By following these steps, you can fix the “License is not available, authentication is not possible” error in Elasticsearch. Registering for a free license, downloading it, and activating it using the provided methods will restore proper authentication functionality in your Elasticsearch instance. Always ensure your license is up to date to avoid future interruptions.