Alibaba Cloud Elasticsearch cluster FAQ
Answers to common questions about Alibaba Cloud Elasticsearch, including cluster purchase, configuration, access, queries, writes, plugins, tokenization, logs, restarts, cluster status, backup, and monitoring.
FAQ
Purchase and cancellation
What should I do if I select an incorrect configuration when purchasing an Elasticsearch cluster?
What specific versions do the version options on the Elasticsearch purchase page correspond to?
What should I do if no VPCs are available when I purchase an Elasticsearch cluster?
Does the access endpoint change if I cancel an Elasticsearch cluster and purchase a new one?
How do I release or unsubscribe from an Elasticsearch cluster?
How long after stopping an Elasticsearch cluster is it released?
What should I do if resources are unavailable when purchasing a cluster?
Can I get a free trial of an Alibaba Cloud Elasticsearch cluster?
What should I do if my Elasticsearch cluster remains in the "Creating" state after purchase?
Is a separate Kibana purchase required after creating an Elasticsearch cluster?
When do I need to purchase dedicated master nodes and client nodes for an Elasticsearch cluster?
Product features
Does Alibaba Cloud Elasticsearch support version upgrades or downgrades?
Can I log on to an Elasticsearch cluster over SSH to modify the configuration?
How can I view the kernel version of an Elasticsearch cluster?
When should I use force restart on an Elasticsearch cluster, and what are its impacts?
How can I verify that the Log4j2 vulnerability is fixed for my Elasticsearch cluster?
How do I enable private network communication between Elasticsearch clusters in different regions?
Do I need to purchase client nodes to enable the HTTPS protocol?
What is the maximum number of shards supported by a single node?
How are indices that start with .monitoring-es generated, and what are their purposes?
How do I archive cold data from an Elasticsearch cluster to OSS?
Data migration and synchronization
Cluster restart
How long does it take to restart an Elasticsearch cluster or a node?
Does enabling or disabling public access trigger a cluster restart?
Does changing the cluster access password trigger a cluster restart?
If an index has no replicas, will it affect a cluster restart?
How do I restart a node of a specific role, such as a Kibana node, or an individual node?
Can I schedule periodic node restarts for an Elasticsearch cluster?
Cluster load and status
What should I do when CPU utilization and load are unevenly distributed across cluster nodes?
What should I do if my Elasticsearch cluster status is YELLOW?
What should I do if my Elasticsearch cluster status is RED due to a high load?
What should I do if monitoring data or an alert indicates high CPU usage?
What should I do if the disk usage of my Elasticsearch cluster is too high?
What should I do if monitoring data or an alert indicates high memory usage?
How do I check the actual amount of memory allocated in the JVM configuration?
Cluster query and write
What should I do if a query to my Elasticsearch cluster is slow or returns no results?
How do I query the detailed content of documents in an index?
Is there a limit on the number of documents in a bulk insert operation in Elasticsearch?
What should I do about the time lag between query results and actual data?
Cluster configuration and changes
How should I plan the resources, specifications, and shard count for an Elasticsearch cluster?
How do I view the configuration parameters of an Elasticsearch cluster?
Will changing the cluster configuration affect the Elasticsearch service?
After the number of nodes is changed, does the cluster automatically rebalance the shards?
After upgrading the cluster specifications, can I downgrade the configuration? If so, how?
When I upgrade a cluster, the message
UpgradeVersionMustFromConsoleis returned. What should I do?Will upgrading the Elasticsearch version affect cluster services?
I cannot change the cluster configuration. What should I do?
Will changing the cloud disk type for an Elasticsearch cluster cause data loss?
Can I upgrade only the CPU of an Elasticsearch cluster to avoid data migration?
Plug-ins, tokenizers, and synonyms
How do I customize and extend the dictionary for the IK analyzer?
When I use the IK analysis plug-in, an
ik startOffseterror is reported. What should I do?If my local IK dictionary files are lost, can I retrieve them from the cluster management page?
After I update the IK dictionary, how can I apply the new dictionary to existing data?
Can custom plug-ins access external networks, for example, to read dictionary files from GitHub?
How is the analysis-aliws tokenizer configured, and what is its file format?
What are the differences among Elasticsearch synonyms, the IK tokenizer, and the AliNLP tokenizer?
What built-in Chinese tokenizers does Alibaba Cloud Elasticsearch support?
Does the IK analyzer used by Alibaba Cloud Elasticsearch support remote dictionaries?
Will restarting a cluster to install a plug-in affect cluster services?
Logs
Can I set a retention period for .security logs in Elasticsearch?
I cannot view the query and update logs of Elasticsearch. What should I do?
How do I configure and view the slow logs of an Elasticsearch cluster?
How do I programmatically and periodically pull the slow logs of an Elasticsearch cluster?
How do I find out which clients are using my Elasticsearch cluster?
Data backup and restoration
Cluster monitoring and alerting
Cluster access
Indexing
Instance purchase and cancellation
Incorrect cluster configuration
If your cluster configuration does not meet your requirements, use the following table to find a solution.
If a solution requires unsubscribing from a cluster, be sure to back up your data first (see Manual backup and restoration). After you unsubscribe, the data is deleted and cannot be recovered.
Parameter | Solution |
billing method | If you purchased a pay-as-you-go cluster, you can switch to subscription billing. Change the billing method of a cluster from pay-as-you-go to subscription. If you purchased a subscription cluster, you can switch to pay-as-you-go billing. Change the billing method of a cluster from subscription to pay-as-you-go. |
version | You can change the cluster version only under the following conditions:
To upgrade the cluster version, see Upgrade cluster versions. For version changes not listed above, unsubscribe from the cluster and purchase a new one. |
region | This configuration item cannot be changed. You need to unsubscribe from the cluster and purchase a new one. |
zone | You can migrate the cluster to a different zone. Migrate Elasticsearch nodes in a zone or upgrade the deployment mode of an Elasticsearch cluster. Note Before migrating the zone, ensure your Elasticsearch cluster is in the Active state. |
Number of zones | This configuration item cannot be changed. You need to unsubscribe from the cluster and purchase a new one. |
instance specification | This configuration can be changed. Upgrade cluster configuration and Downgrade a cluster. |
storage type | This configuration can be changed. Upgrade cluster configuration and Downgrade a cluster. |
cloud disk encryption | This configuration item cannot be changed. You need to unsubscribe from the cluster and purchase a new one. |
Storage space per node | This configuration can be changed. Upgrade cluster configuration. |
Number of data nodes | This configuration can be changed. Upgrade cluster configuration and Downgrade a cluster. |
Network type, VPC, and vSwitch | These configuration items cannot be changed. You need to unsubscribe from the cluster and purchase a new one. Note Elasticsearch clusters support only the VPC network type. |
username | The default administrator username, elastic, cannot be changed. Create new users and assign permissions through Manage access control with Elasticsearch X-Pack roles. |
password | This configuration can be changed. Reset an Elasticsearch cluster password. |
For configuration items not listed in this table, see the Upgrade cluster configuration and Downgrade a cluster documentation to determine if they can be modified.
Mapping buy page versions to Elasticsearch versions
Buy page version | Specific version |
8.15 | 8.15.1 |
8.13 | 8.13.4 |
8.9 | 8.9.1 |
8.5 | 8.5.1 |
7.16 | 7.16.2 |
7.10 | 7.10.0 |
7.7 | 7.7.1 |
6.8 | 6.8.6 |
6.7 | 6.7.0 |
6.3 | 6.3.2 |
5.6 | 5.6.16 |
5.5 | 5.5.3 |
When purchasing a cluster, choose a version close to your existing self-managed cluster. If you have no existing cluster, select the latest version.
No VPCs available when purchasing Elasticsearch
See View RAM user details to check if the RAM user has permission to list VPCs. If the user lacks this permission, see Create a custom policy to grant it.
Error: "vSwitch: may not be empty"
This error means no vSwitches exist in your selected zone. Check which zone you selected on the cluster configuration page, then verify in the VPC console whether a vSwitch exists in that zone. If not, create one. Create a VPC with an IPv4 CIDR block.
Endpoint change on instance replacement
Yes. Update your client code with the new endpoint before unsubscribing from the original instance to avoid service disruption.
Release or unsubscribe from an Elasticsearch cluster
To release a pay-as-you-go cluster or an expired subscription cluster, see Release a cluster.
To unsubscribe from an unexpired subscription cluster:
In the top navigation bar of the console, choose, go to theUser Centerto unsubscribe. For more information, seeUnsubscription methods.
Retention period for expired instances
The instance is released 7 days after its service ends. Once released, its data is permanently deleted and cannot be recovered. Expiration and overdue payments.
Single-node Elasticsearch clusters
No. A minimum of two data nodes is required. Configure nodes for an Alibaba Cloud Elasticsearch cluster.
Unavailable resources during instance creation
If instance creation fails due to insufficient capacity, try one of the following solutions:
Select another region.
Select another zone.
Select a different resource configuration.
If resources remain unavailable, try again later. Resource inventory is dynamic and Alibaba Cloud continually replenishes resources.
Upgrade 1 vCPU, 2 GiB data nodes
Alibaba Cloud Elasticsearch stopped selling 1 vCPU, 2 GiB data nodes in May 2021 due to performance stability concerns. Existing nodes are unaffected but suitable for learning only, not production, and are not covered by the SLA. Upgrade to higher specifications as soon as possible. Upgrade cluster configuration.
Free trial of ES
New users can try an Alibaba Cloud ES instance with the free trial. To learn the basic features of ES, see the Use Alibaba Cloud Elasticsearch to perform a basic search tutorial.
Elasticsearch cluster stuck initializing
Initialization time depends on cluster specifications, data structure, and size. This process can take several hours.
A newly purchased cluster does not display its internal endpoint while the cluster is in the Activating state. The internal endpoint becomes available after the cluster is created.
If the change involves restarting the Elasticsearch cluster, the restart duration depends on the index data, the cluster size, and the restart method. It typically takes several hours. For more information, see Restart a cluster or node.
You can monitor the change progress in the task list to determine whether cluster creation or restart is proceeding normally. If the change progress remains unchanged for a long period, see View instance task progress to troubleshoot the issue.
Do I need to purchase Kibana separately?
No. Each Elasticsearch cluster includes a Kibana node by default, which you cannot disable. You can click Edit in the Kibana node section to select its specifications. For detailed instructions, see Create an Alibaba Cloud Elasticsearch cluster.
For stability, choose a Kibana node with at least 2 vCPUs and 4 GiB of memory. The 1 vCPU, 2 GiB option is free but suitable for testing only.
Cannot find a created instance
Make sure you have selected the correct region in the region selector at the top of the Elasticsearch console. If the region is correct but the cluster is still not visible, try the following methods:
Clear your browser cache and log on to your Alibaba Cloud account again. If your logon session has expired, you must log on again to restore it.
Try a different network.
Go to the Order Management page in the Expenses and Costs console and filter the orders by Alibaba Cloud Elasticsearch. Check the order status to confirm whether the cluster was released because it was not renewed. A cluster is released 7 days after its service ends. Once released, its data is permanently deleted and cannot be recovered by renewal. Create a new cluster.
When to purchase dedicated master and coordinating nodes
Dedicated master nodes are responsible for cluster-wide operations, such as creating or deleting an index, tracking which nodes are in the cluster, and deciding which shards to allocate to which nodes. A stable master node is essential for cluster health. You should purchase dedicated master nodes in the following scenarios:
The data nodes that also serve as master nodes are under heavy load.
The cluster handles write-intensive workloads.
High cluster stability is critical.
Coordinating nodes handle incoming query and write requests, forward the requests to the appropriate data nodes, and then merge the results. If your cluster frequently runs resource-intensive aggregation queries, purchase dedicated coordinating nodes. Generally, maintain a 1:5 ratio of coordinating nodes to data nodes (1 coordinating node for every 5 data nodes), with a minimum of two. The specifications of the coordinating nodes should match those of the data nodes. For a more detailed guide, see specification and capacity evaluation.
Default username
The default username is elastic. You can also create custom users. Manage access control with Elasticsearch X-Pack roles.
Feature FAQ
Version upgrades and downgrades
In-place upgrades are available only for specific version paths: 5.5 to 5.6, 5.6 to 6.3, and 6.3 to 6.7.
For other upgrade paths or for downgrades, you must create a new cluster and manually migrate your data. This involves purchasing a new cluster of the target version, migrating the data from your original cluster, and then unsubscribing from or releasing the original cluster.
Alibaba Cloud Elasticsearch free trial clusters are available only for versions 8.5 and 8.9 and cannot be modified after creation.
For in-place version upgrades, see Upgrade cluster versions.
To create a new cluster, see Create an Alibaba Cloud Elasticsearch cluster.
For data migration between Alibaba Cloud Elasticsearch clusters, see Migration between Alibaba Cloud Elasticsearch clusters.
To unsubscribe from an unexpired subscription cluster, see Unsubscription and refund policies. To release a pay-as-you-go cluster, see Release a cluster.
Take note of the following limits when you downgrade a version:
Object Storage Service (OSS) snapshots cannot be restored from a later Elasticsearch version to an earlier Elasticsearch version.
If you use Logstash to migrate data, make sure that the Logstash version is compatible with the Elasticsearch version of the destination cluster. Alibaba Cloud Logstash supports versions 8.11, 7.4, and 6.7.
The Kibana version matches the Elasticsearch version of the cluster and cannot be downgraded separately.
Modifying cluster configuration via SSH
No. Elasticsearch does not support SSH access. To modify your cluster configuration, see Overview of cluster configuration.
Logstash 6.7 and Elasticsearch 6.3 compatibility
Yes, they are compatible. See product compatibility.
Support for Elasticsearch as a data source
You can connect Quick BI to Elasticsearch over the public network by adding the Quick BI IP addresses to the public whitelist of your Elasticsearch cluster. Alternatively, you can use Kibana or DataV for data analysis and visualization.
Scoring plugin support
Elasticsearch supports creating tokenizers for indexes and sorting by score. Quick start: From instance creation to data retrieval.
LDAP support
Yes. Deploy and test an on-premises Elasticsearch cluster of the same version first. Once tests pass, configure the LDAP template in the console. Best practices for integrating LDAP authentication with X-Pack.
Alibaba Cloud Elasticsearch Java SDK
Yes. Each version has its own SDK. Java API.
Kernel version
By default, Elasticsearch clusters use the latest kernel version. Available versions are listed in Kernel version release notes. If your cluster does not use the latest kernel version, the Basic information page of your cluster displays the message A new kernel patch is available.. Click the message to view the current kernel version of your cluster.
Forced restart of an Elasticsearch cluster
If your Elasticsearch cluster is unhealthy (in a yellow or red state), you cannot perform a standard restart. Instead, you must perform a forced restart. This is a high-risk action that may cause service instability, data loss, or read and write failures. Proceed with caution.
Verify the Log4j 2 fix
A successful cluster restart confirms that the vulnerability is fixed. [Vulnerability Alert] Apache Log4j 2 Remote Code Execution Vulnerability.
Log4j2 vulnerability and Elasticsearch upgrade
No. Simply follow the Procedure.
Private network communication for cross-region Elasticsearch instances
To enable private network communication between Elasticsearch instances in different regions, use one of the following methods:
Migrate data between Elasticsearch clusters
Migration approaches vary by scenario (between Alibaba Cloud clusters, or from self-managed/third-party clusters). migration method selection.
Coordinating nodes for HTTPS
You do not need to purchase coordinating nodes to enable the HTTPS protocol for the following Alibaba Cloud Elasticsearch versions. If your cluster already has coordinating nodes, you can disable them.
Version 7.16 and later.
Version 7.10 in some regions. For specific availability, check the console.
For all other versions, enabling the HTTPS protocol requires coordinating nodes. Once purchased, these nodes cannot be disabled or removed.
Alibaba Cloud Elasticsearch regularly updates certificates after HTTPS is enabled. Versions 7.10 and below do not support rolling certificate updates on data nodes, so certificates are deployed on coordinating nodes to minimize service impact during updates. If your cluster lacks coordinating nodes, the system prompts you to purchase them when enabling HTTPS. Use the HTTPS protocol.
Maximum shards per node
In Elasticsearch 7.x, a single node supports a maximum of 1,000 shards. Other versions have no limit. Configure shards per node based on your cluster specifications. Evaluate specifications and storage capacity and Size your shards.
Run the following command to temporarily change the maximum number of shards per node using the max_shards_per_node parameter:
PUT /_cluster/settings
{
"transient": {
"cluster": {
"max_shards_per_node":10000
}
}
}Avoid setting this parameter to a large value as a long-term solution. Instead, add more nodes or reduce the number of shards in your cluster. Plan your shards properly to maintain cluster stability and prevent high load.
The .monitoring-es indexes
By default, the X-Pack monitoring component collects cluster data every 10 seconds and stores it in indexes prefixed with .monitoring-*. For example, in a version 6.x instance, two primary index types are created and rolled over daily: .monitoring-es-6-* and .monitoring-kibana-6-*, with data stored in an index prefixed with .monitoring-es-6- and suffixed with the current date.
The .monitoring-es-6-* indexes consume significant disk space, primarily storing cluster status, cluster statistics, node statistics, and index statistics. Configure monitoring for an Elasticsearch cluster.
Encryption algorithm for data disks
Disk encryption for Elasticsearch uses AES-256 and Key Management Service (KMS) to encrypt cloud disks. Disk Encryption.
Port 9300 support
While Alibaba Cloud Elasticsearch 5.x supports both port 9300 (TCP) and 9200 (HTTP/HTTPS), later versions support only port 9200.
Alibaba Cloud Elasticsearch 6.0 and later instances do not support connecting to port 9300 with the Transport Client. To access port 9300, you must purchase a 5.x instance.
Archive ES cold data to OSS
Use the Log-Enhanced Edition with OpenStore storage. Store massive amounts of data by customizing hot and cold storage with OpenStore.
Data migration and synchronization
Synchronize MongoDB to Alibaba Cloud Elasticsearch
Use Monstache to synchronize data from ApsaraDB for MongoDB to Alibaba Cloud Elasticsearch in real time. Use Monstache to synchronize data from MongoDB to Elasticsearch in real time.
Instance restart
Cluster and node restart duration
Restart duration depends on cluster specifications, data structure, and data volume. It typically takes several hours. Restart a cluster or node.
Public network access and cluster restart
No. While this action briefly changes the cluster's status as it takes effect, it does not affect normal operations.
Password change and cluster restart
No. A password change triggers a cluster reload, not a restart. Reset an Elasticsearch cluster password.
Impact of no index replicas on cluster restart
Yes. Without replicas, service interruptions can occur during restart. With low load, replica shards, and off-peak timing, the service generally remains available. However, timeouts may occur during high concurrency, force restarts, heavy workloads, or when indexes lack replicas. Configure a retry mechanism on your client and restart during off-peak hours.
Restart a node role or a single node
Restart a node role
On the Basic Information page of the instance, click Restart, set the Operation Type to Node Role, and select the corresponding node role. Restart a cluster or node.
Restart a single node
You can restart a single node in one of the following ways:
On the Basic Information page of your instance, click Restart. In the dialog box that appears, set Operation Type to Node and select the node you want to restart. Restart a cluster or node.
On the Basic Information page, find the Node Visualization section, hover over the node you want to restart, and click Restart in the pop-up. View cluster status and node information.
Stuck instance restart
Check the instance change task details in View instance task progress. For instances not running version 7.16, a restart can take several hours. If the progress remains unchanged for a long period, follow the troubleshooting steps in the table below.
Possible cause | Solution |
A plug-in issue prevents a node from starting. | Delete the plug-in. |
Shard allocation fails due to high disk usage. Note Check disk usage on the cluster monitoring page. Metrics and exception handling. | Delete an index or temporarily set the number of replica shards to 0. |
Shard allocation fails due to a misconfigured cluster parameter. | Run the |
The number of replica shards is greater than the number of nodes. | Adjust the number of replica shards. |
The cluster runs out of memory (OOM) because its specifications are insufficient. |
Periodic restart of Elasticsearch nodes
Periodic node restarts are not supported. As a workaround, call the RestartInstance API from a scheduled task that you configure yourself.
Abnormal cluster load or status
Unbalanced node load
This issue stems from an unbalanced cluster load, which can be caused by several factors, including improper shard settings, uneven segment sizes, hot and cold data requirements, and unreleased persistent connections related to Service Load Balancer (SLB) or multi-zone deployments. Troubleshoot based on your scenario. Analysis Methods and Solutions for Unbalanced Cluster Load.
Before you troubleshoot the issue, check your cluster specifications. If your cluster uses nodes with 1 vCPU and 2 GiB of memory, upgrade the nodes to 2 vCPUs and 4 GiB of memory or higher. Upgrade cluster configuration.
Nodes with 1 vCPU and 2 GiB of memory are for learning only, not production, and are not covered by the SLA. These specifications have limited stability and are no longer available for purchase. Upgrade existing 1 vCPU, 2 GiB nodes as soon as possible.
Use nodes with 2 vCPUs and 4 GiB of memory for testing environments. For production, use higher specifications.
Resolve a yellow Elasticsearch cluster status
Cause
An Elasticsearch cluster enters a yellow state if the configured number of replicas for an index exceeds the number of available nodes minus one. This state prevents Elasticsearch from allocating all replica shards.
Solution
Run the
GET _cat/indices?vcommand to view the shard distribution, identify the yellow index, and set its number of replicas to 0. After the cluster status returns to green, restore the original number of replicas for the index.WarningSetting the number of replicas to 0 can cause data loss if a node goes offline, so proceed with caution. After the cluster status returns to green (in about one minute), restore the original number of replicas as soon as possible.
PUT test/_settings { "index" : { "number_of_replicas":"0" } }
Troubleshoot a red cluster status
A red cluster status occurs when a node hosting a primary shard is unavailable, preventing the shard from being allocated. Run the GET /_cat/indices?v command to view the shard distribution and identify the index with a red status. Use the following table to troubleshoot the issue.
Cause | Solution |
An imbalanced load leads to insufficient cluster resources. | Adjust the total number of primary and replica shards to be a multiple of the data node count. How to rebalance unevenly distributed shards. |
The cluster contains unnecessary index data. | Periodically clean up unnecessary index data, especially monitoring indexes that start with .monitoring. Configure monitoring indices. |
Shards are unassigned. | Run the |
High cache usage is consuming resources. | Run the |
A cluster configuration change, such as an upgrade, is in progress. | Interrupt the current change and select Forced Update on the upgrade page. Upgrade cluster configuration. |
Low instance specifications, such as 1 vCPU and 2 GiB or 2 vCPUs and 4 GiB, cause insufficient resources. | Upgrade cluster configuration. Note
|
Disk usage exceeds 85%(check disk usage using Advanced Monitoring or the | Delete unnecessary historical data or expand the disk capacity. Troubleshoot and resolve high cluster disk usage and read-only issues. |
You can also troubleshoot using Kibana monitoring or the Advanced Monitoring and alerting feature.
High cluster CPU utilization
The following table describes common causes and solutions.
Cause | Solution |
Advanced Monitoring shows that an increase in write or query QPS increases CPU utilization. | Reduce concurrent writes, lower the write and query QPS, or scale up or scale out the cluster. Perform stress testing in your production environment to determine the appropriate specifications. |
High resource consumption from the index cache. | Run the |
The cluster specifications are too low. | |
High CPU utilization on a single node due to an unbalanced load. | Optimize the shard load by setting the total number of primary and replica shards to a multiple of the data node count. How to rebalance unevenly distributed shards. |
Handle high disk usage in an Elasticsearch cluster
Run the DELETE /<index_name> command to delete unnecessary indexes. Once disk usage drops below 75%, upgrade cluster configuration in the console. If a single node's disk usage is too high, optimize shard distribution. How to rebalance unevenly distributed shards.
To prevent high disk usage from impacting your cluster, enable monitoring and alerting. Metrics and exception handling. The impact on the cluster varies depending on the disk usage threshold:
Exceeds 85%: The system no longer allocates new shards to the affected node.
Exceeds 90%: Elasticsearch attempts to move shards from the affected node to other data nodes with lower disk usage.
Exceeds 95%: The system applies a read_only_allow_delete block to every index in the cluster. This prevents write operations. You can only read from or delete the indexes.
Handling high memory usage in Elasticsearch
The following table describes common causes and their solutions.
Cause | Solution |
High cluster cache usage. | Clear the cache by running |
High query and write throughput. | Stop read and write operations, then enable throttling with the cluster throttling plugin (aliyun-qos). |
Unnecessary indexes consuming memory. | Delete unnecessary indexes, especially those prefixed with.monitoring-*. Set a retention period via Configure monitoring logs. |
Uneven shard distribution that causes high memory usage on a single node. | Optimize the shard load by setting the total number of primary and replica shards to a multiple of the data node count. How do I rebalance unevenly distributed shards?. |
Expensive or abnormal queries, such as queries that contain long strings of special characters from your application. | Run the |
Rebalancing uneven shards
To distribute the load evenly and prevent overloaded nodes, plan your shards so that the total number of primary and replica shards is a multiple of the number of data nodes in your cluster.
If your cluster has three data nodes, you can set the number of primary shards to 3 and the number of replicas to 1, for a total of 6 shards.
If your cluster has eight data nodes, you can set the number of primary shards to 4 and the number of replicas to 1, for a total of 8 shards. Alternatively, you can set the number of primary shards to 8 and the number of replicas to 1, for a total of 16 shards.
After adjusting the number of shards, reindex your data during off-peak hours to apply the change. A higher number of replica shards improves cluster availability and query performance but also consumes more memory.
The size and number of shards are critical factors that affect the stability and performance of an Elasticsearch cluster. Every index in an Elasticsearch cluster requires proper shard planning. This planning helps prevent performance degradation from oversized shards, which often result from unclear business requirements. For recommendations on shard planning, see Evaluate Shard.
An uneven shard distribution leads to an imbalanced cluster load. You can check for this issue by using the following methods:
Meanings of metrics and suggestions for handling anomalies. If a node has a consistently high load on its CPU, memory, or disk, it indicates an uneven shard distribution.
Run the
GET _cat/shards?vcommand to view shard information for your indexes. The distribution is uneven if too many of an index's shards reside on the same high-load nodes.
High cluster load and java.lang.StackOverflowError
This error indicates a Lucene stack overflow and is caused by queries using regular expressions or fuzzy matching. This issue is fixed in Elasticsearch 6.0 and later. To resolve this, upgrade the cluster version or optimize your query statement. java.lang.StackOverflowError for the entire cluster.
High fielddata usage
Use advanced monitoring to track fielddata cache usage. Investigate if a node's fielddata cache exceeds one gigabyte (GB). To troubleshoot, run the GET /_nodes/stats/indices/fielddata?fields=* command to view the memory usage of fielddata on each node. You can also run the GET _cat/fielddata command to identify which fields have high fielddata usage, and then examine the slow log to determine which queries are running on those fields.
Common scenarios that lead to high fielddata usage include:
Sorting by _id in queries.
Running aggregations, sorting, or script queries on a text field with fielddata enabled.
If your use case involves these scenarios, optimize your query statements and field types. As a short-term solution, run the POST _cache/clear?fielddata=true command to clear the cache and reduce memory usage. Troubleshoot and resolve high fielddata memory usage.
Check JVM heap memory
Run GET _nodes/stats/jvm?pretty. By default, the heap memory is half of the cluster memory. This setting cannot be changed.
Cluster query and write
Adjust queue size
To adjust the queue size, specify the thread_pool.write.queue_size parameter in your YML parameter configuration (Configure YML parameters). Before you make the adjustment, run GET /_cat/thread_pool?v to check queue usage.
For Elasticsearch clusters earlier than version 6.0, use the thread_pool.index.queue_size parameter.
Query or export data by time range
To query data for a specific time range, use a range query.
To export data for a specific time range, filter it with Logstash. Logstash configuration file.
Size limit for bulk requests
Yes. The default maximum payload for a single bulk request is 100 MB (HTTP settings). Total size depends on document size and complexity, not just count. If your documents are large, reduce the number per batch. Start with 5-15 MB batches and increase gradually. Using and Sizing Bulk Requests.
Handling time discrepancies in Elasticsearch query results
By default, Elasticsearch stores dates in UTC. To handle time zone differences, use one of the following methods:
When querying date-type data, include the time_zone parameter. Alternatively, store time data as a timestamp. Parameters for <field>.
Include a time zone offset when writing time data. For example:
"time" : "2022-07-15T12:58:17.136+0800"(UTC+8).Use Kibana to display the data. Kibana detects the browser's time zone and automatically converts UTC time for display. How do I adjust the time zone for data displayed in Kibana?.
If you use Logstash to synchronize data and encounter an 8-hour time difference, you can manually adjust the time in your pipeline configuration. For example, use the following filter:
filter{ ruby{ code => "event.set('update_time', event.get('update_time').time.localtime + 8*60*60)" } }.
Slow or timed-out Elasticsearch queries
Check the slow query logs in the console and use Metric Definitions and Troubleshooting Suggestions to identify the cause. Common causes and solutions:
Cause | Solution |
Uneven | Optimize the |
Insufficient cluster resources. | If you perform resource-intensive operations such as aggregations, term queries, Note To ensure optimal query performance for an |
Resolving the "Data too large" error
Cause
This error occurs when a high write throughput triggers the circuit breaker, indicating the cluster has insufficient resources to handle the volume of write requests.
Solution
ImportantIf you cannot perform these operations, stop all query and write requests and then force-restart the cluster. After the cluster returns to a normal state, follow the steps below.
Run the
POST /<index_name>/_cache/clear?fielddata=truecommand to clear the index cache. If the issue persists, proceed to the next step.Run the
GET /_cat/indices?vcommand to check whether shards are unevenly distributed. How do I rebalance unevenly distributed shards?. If the issue persists, proceed to the next step.Reduce concurrent writes, delete unnecessary indexes to release resources, and minimize the use of Kibana monitoring. We recommend using advanced monitoring instead.
To disable Kibana monitoring, run the following command:
PUT _cluster/settings { "persistent": { "xpack.monitoring.collection.enabled": false } }If the issue persists, proceed to the next step.
Upgrade the configuration of the cluster to increase its capacity.
Bulk-deleting indexes
To delete indexes in bulk, configure a YML parameter. Set the Index Deletion parameter to Allow Wildcards and restart the cluster. After the restart, you can use a wildcard to bulk-delete indexes. Configure YML parameters.
Deleted indexes cannot be recovered. Use this setting with caution.
"index uuid conflicted" error
This is a known issue. To resolve it, upgrade your instance's kernel version to 1.5.0 or later. See Upgrade cluster versions for instructions.
Modify index.max_result_window
In Elasticsearch, the default value of the index.max_result_window parameter is 10000. This parameter defines the maximum number of documents (from + size) that can be returned in a paged query. If you query for a number of documents that exceeds this value, the following error is returned: Result window is too large, from + size must be less than or equal to: [10000].
For some deep paging search scenarios, you may need to increase this parameter value. You can run the following command to modify the value of index.max_result_window based on your specific needs. The value in the example is for reference only. After the command is run, this configuration persists even if you restart the ES cluster.
PUT /my_index/_settings
{
"index": {
"max_result_window": 50000
}
}Avoid using from and size for deep paging, as this can consume significant CPU and memory. For deep paging scenarios, use the scroll or search after features instead.
Resolving the "more than 1 type" error
This error indicates that the update operation used a type different from that of the original index. Elasticsearch allows only one type per index. Ensure the update operation uses the same type as the original index.
Elasticsearch removed mapping types in version 7.0 and later. All indexes now use the single type _doc.
Query documents in an index
Log on to the Kibana console and run the following request to view documents:
GET _search
{
"query": {
"match_all": {}
}
}Alternatively, use the Discover page in Kibana. To use this page, you must first create an index pattern. For detailed instructions, see the Kibana Guide.
After I insert a document, an immediate update fails with a 404 error indicating the record cannot be found. What should I do?
In Elasticsearch, a newly written document is not immediately visible for search and update operations. Each index has a refresh_interval setting that controls how often the index is refreshed to make recently written documents visible. If you insert a document and immediately try to update it, the update request can be rejected with a 404 error because the document has not yet been refreshed into the visible index segments.
To resolve this issue:
At the application layer, add a short delay between inserting a document and updating it, so that the document has time to become visible after the next refresh cycle.
Check the
refresh_intervalsetting of the target index to confirm that your configured value has taken effect. You can query the current setting by running the following command:GET /<index_name>/_settings/index.refresh_interval.
If the configured refresh_interval value does not match what you expect, reconfigure it and verify the change:
PUT /<index_name>/_settings
{
"index": {
"refresh_interval": "5s"
}
}Cluster configuration and modification
Plan cluster resources, specifications, and shards
Use the capacity planning tool on the purchase page to estimate the required specifications based on your business needs. specification and storage capacity evaluation.
Configuration parameters of an Elasticsearch instance
You can view the parameters on the instance's Basic Information page. View Basic Information of an Instance.
When using a Transport Client to access an Elasticsearch instance, set cluster.name to the instance ID. Transport Client (5.x).
Impact of changing cluster configuration
Changing the cluster configuration triggers a rolling restart. Service typically remains available if the cluster is healthy (green), each index has at least one replica, and resource utilization is moderate. Check metrics on the Cluster Monitoring page — service is likely uninterrupted when node CPU is around 80%, heap memory around 50%, and load_1m below the vCPU count. Perform changes during off-peak hours.
Automatic shard reallocation after node changes
Yes. When the number of data nodes changes, the cluster automatically reallocates shards. However, this automatic reallocation does not guarantee a perfectly even data distribution. Due to factors such as index size, the number of shards, and the number of nodes, data may remain unbalanced across shards after the reallocation. To troubleshoot and resolve uneven shard allocation, see Analysis and solutions for unbalanced cluster load.
Changing the cloud disk type
Yes. You can upgrade or downgrade the cloud disk type. The performance tiers, ordered from highest to lowest, are ESSD, Standard SSD, and Ultra Disk.
Convert Elasticsearch nodes to cold nodes
No. This operation can destabilize the cluster. "Hot-Warm" Architecture in Elasticsearch 5.x.
Downgrade an instance type
Yes. For instructions, see Scale in the data nodes of a cluster or Downgrade a cluster.
Handle temporary traffic surges
To handle a temporary traffic surge, first scale out your cluster (upgrade cluster configuration) and then scale it in (scale in the data nodes of a cluster). Both scaling out and scaling in data nodes require a cluster restart. Before restarting, note the following:
Ensure that the instance is in the Active state (green).
Ensure that each index has at least one replica shard and that resource usage is not excessive. You can view these metrics on the Cluster Monitoring page. For example, NodeCPUUtilization should be around 80%, NodeHeapMemoryUtilization around 50%, and NodeLoad_1m lower than the number of vCPUs for the data node.
"UpgradeVersionMustFromConsole" error
This error indicates that the requested version upgrade is not supported. Alibaba Cloud Elasticsearch supports direct upgrades only along the following version paths: from 5.5.3 to 5.6.16, from 5.6.16 to 6.3.2, and from 6.3.2 to 6.7.0.
Elasticsearch upgrade duration
The upgrade duration depends on your cluster's data volume, data structure, and specifications. A typical upgrade takes about an hour.
Impact of Elasticsearch version upgrades
During an upgrade, the cluster remains readable and writable, but no other changes are allowed. Upgrade during off-peak hours. Upgrade cluster versions.
Configuration upgrade failure or timeout
The most common cause is an unhealthy cluster state. Stop all queries and writes, then follow What to do if an Elasticsearch cluster has a red status due to high load? to resolve it. After recovery, retry the upgrade. Alternatively, perform a forced update to bypass the health check — this can disrupt service, so proceed with caution.
If the configuration upgrade fails for other reasons, troubleshoot and resolve the issue based on the error message.
Cluster reconfiguration failure
To troubleshoot this issue, check the following:
Check if the nodes in your cluster use local disks. Configuration changes are not supported for nodes that use local disks. To upgrade the instance type, you must first switch the disk type to cloud disk.
If the console reports insufficient capacity, try the configuration change in a different zone or wait for other users to release instances in the current zone.
If the console reports an unhealthy cluster status, check for any indexes in the
closestate and temporarily set their status toopen. If the cluster status isred, check for issues such as offline nodes or unassigned shards. You must resolve these cluster issues to proceed.Ensure you meet the following conditions before downgrading a cluster:
For the target instance type, both its vCPU count and memory size must be at least 50% of the current specifications. You cannot downgrade to the following instance types: 1 vCPU and 2 GiB of memory, 2 vCPUs and 2 GiB of memory, 2 vCPUs and 4 GiB of memory, and 4 vCPUs and 4 GiB of memory.
NoteIf you need to downgrade to an instance type with 2 vCPUs and 4 GiB of memory or 4 vCPUs and 4 GiB of memory, create a new instance with the target specifications. Then, migrate data from the original instance to the new one, for example, by using Logstash.
The cluster load must meet the required conditions. Downgrade a cluster.
You cannot reduce disk capacity during a downgrade.
Configure http.max_content_length and discovery.zen.ping_timeout
No. You can only configure the parameters that Alibaba Cloud Elasticsearch provides. Configure YML parameters.
Typically, you do not need to change the following parameters: discovery.zen.ping_timeout, discovery.zen.fd.ping_timeout, discovery.zen.fd.ping_interval, and discovery.zen.fd.ping_retries.
Switching VPC for an Elasticsearch cluster
No. To switch the VPC for an Elasticsearch cluster, you must purchase a new cluster in the target VPC, migrate your data, and then release the original cluster.
Add data nodes during an upgrade
No. You cannot directly add data nodes to a cluster that was created without them. Instead, you must create a new cluster and migrate your data to it. For specific migration solutions, see the Migration Solution Selection Guide.
Data loss when changing cloud disk type
No, existing data will not be lost. However, new data written during the upgrade may be lost. Perform the upgrade during off-peak hours or after stopping write operations. upgrade cluster configuration.
Unhealthy cluster with green status during upgrade
The cluster may contain closed indexes. Run the POST /<index_name>/_open command to open the affected indexes. Upgrade cluster configuration.
vCPU upgrades and data migration
No. Upgrading or downgrading vCPUs triggers a blue-green update, changing node IP addresses and migrating data from the original nodes to the new ones.
If I upgrade the performance level of an ESSD (for example, from PL1 to PL2), does it immediately resolve I/O bottlenecks, and how long does it take to take effect?
Upgrading the performance level (PL) of an ESSD increases the IOPS available to your cluster, but the change does not take effect immediately. The upgrade involves migrating the underlying data to storage that supports the new performance level.
There is no fixed duration for the change to take effect. The actual time depends on factors such as your data volume, the current instance state, and the change method used. Some paths, such as a blue-green update, take longer because nodes are recreated and data is migrated from the original nodes to new ones.
To track progress and confirm the result:
View the migration progress on the configuration change page of the instance in the Elasticsearch console.
After the upgrade completes, use the Cluster Diagnosis feature to verify whether the I/O bottleneck has improved. For more information, see Perform a diagnostic on an Elasticsearch cluster.
When Elasticsearch experiences an I/O bottleneck, should I scale out data nodes or upgrade the disk type?
Both options are effective. Choose based on the cause of the bottleneck:
Scale out data nodes: Suitable when shards are unevenly distributed or a single node is under high load. You can upgrade the cluster configuration to add data nodes, redistributing shards across more nodes to reduce the load on any single node.
Upgrade the disk type: Suitable when a single disk's IOPS or throughput is insufficient. You can upgrade the cloud disk type, for example from a standard cloud disk to a Standard SSD or ESSD, to increase the IOPS and throughput available per node.
Whichever option you choose, ensure that shards remain evenly distributed across data nodes. Uneven shard distribution can create hotspots that limit the actual performance improvement, even after scaling out or upgrading the disk type.
Cold data node downgrade restrictions
Downgrading a cluster has several restrictions. For example, the target specifications must have at least 50% of the current vCPUs and memory. You cannot downgrade to 1 vCPU/2 GiB, 2 vCPUs/2 GiB, 4 vCPUs/4 GiB, or 2 vCPUs/4 GiB. Downgrade a cluster.
If your cluster does not meet the downgrade requirements, you can create a new instance, migrate your data, and then release the original cluster. For data migration solutions, see Migration method selection.
Insufficient resources or abnormal shard allocation error
Possible cause | Solution |
Insufficient cluster resources. After a scale-in, the cluster's remaining resources (disk, memory, and vCPUs) may be insufficient to support its current data volume or workload. | Run the |
Abnormal shard allocation. By design, Elasticsearch does not allocate multiple replicas of the same shard to a single data node. During a scale-in, if an index has a replica count greater than or equal to the number of remaining data nodes, these replicas cannot be allocated, causing a shard allocation error. | Run the |
Error when scaling in data nodes
Use the Cluster Diagnosis feature to check the cluster's health, then resolve the error based on the diagnostic results. Perform a diagnostic on an Elasticsearch cluster.
"Reserved nodes must be greater than 2" error
To ensure cluster reliability, you must reserve at least two data nodes. For a multi-zone cluster, you must also keep at least two nodes in each zone and maintain an equal number of nodes across all zones. If you cannot meet these requirements, you must select different nodes to scale down or migrate, or upgrade the cluster configuration.
Cluster configuration error during data node scale-in
Run the GET _cluster/settings command to check the cluster configuration. Look for a setting that disables data distribution: "cluster.routing.allocation.enable" : "none". If this setting is present, temporarily change it to "cluster.routing.allocation.enable" : "all". If this change affects other operations, revert the setting after the scale-in.
Troubleshoot failures caused by auto_expand_replicas
Cause
Using the X-Pack access control feature can cause this issue. In earlier Elasticsearch versions, this feature applies the
"index.auto_expand_replicas" : "0-all"setting to the .security index by default. This setting leads to failures in data migration or node scale-in operations.Solution
Check the index settings.
GET .security/_settingsThe command returns a result similar to the following:
{ ".security-6" : { "settings" : { "index" : { "number_of_shards" : "1", "auto_expand_replicas" : "0-all", "provided_name" : ".security-6", "format" : "6", "creation_date" : "1555142250367", "priority" : "1000", "number_of_replicas" : "9", "uuid" : "9t2hotc7S5OpPuKEIJ****", "version" : { "created" : "6070099" } } } } }Modify the configuration using one of the following methods.
Method 1
PUT .security/_settings { "index" : { "auto_expand_replicas" : "0-1" } }Method 2
PUT .security/_settings { "index" : { "auto_expand_replicas" : "false", "number_of_replicas" : "1" } }ImportantThe number_of_replicas parameter sets the number of replicas for each primary shard in an index. Configure this parameter based on your business requirements, ensuring the value is at least 1 and does not exceed the number of available data nodes.
Clear the Elasticsearch cache
To clear the cache, log in to the Kibana console and run one of the following commands:
Clear the cache for a specific index
POST /<index_name>/_cache/clear?fielddata=trueClear all caches
POST /_cache/clear
Change Elasticsearch cluster zone
See Migrate Elasticsearch nodes in a zone or upgrade the deployment mode of an Elasticsearch cluster.
Independent disk scaling
Yes. See upgrade cluster configuration.
Scaling triggers a rolling restart. Scale during off-peak hours.
JVM parameter modification
Alibaba Cloud Elasticsearch uses the JVM parameters recommended by Elasticsearch. These parameters cannot be modified. By default, JVM heap size is 50% of cluster memory, up to 32 GB. Heap size settings.
Plugin, tokenization, and synonym
Customize IK analyzer dictionaries
You can add or delete dictionary content using the cold or hot update features of the IK analysis plug-in. Use the IK analysis plug-in (analysis-ik).
IK analysis plug-in: "ik startOffset" error
This error is caused by a bug in Elasticsearch 6.7 and requires a cluster restart. Restart a cluster or node.
Retrieve lost on-premises IK dictionary files
No. You cannot retrieve the file — only delete or update dictionary files on the cluster management page. Download the official main dictionary and stopword files, replace their content with your system dictionary terms, and upload them.
Apply IK dictionary changes to existing data
If an index uses IK tokens, dictionary changes from a cold or hot update apply only to new data. To apply changes to existing data, reindex. Configure YML parameters.
Standard value for full GC
To determine if a full GC (which cleans the entire heap memory) is problematic, analyze service latency and compare current performance against historical baselines. The CMS collector starts garbage collection when memory usage reaches 75% to leave headroom for traffic bursts.
Uninstalling unused built-in plugins
You can uninstall a built-in plugin if Uninstall appears in its Actions column. For instructions, see Install or uninstall a built-in plugin.
IK dictionary consistency
Yes. The Alibaba Cloud Elasticsearch IK analysis plug-in includes the same built-in dictionaries as the open-source version. IK Analysis for Elasticsearch.
Custom plug-in network access
No, custom plug-ins cannot access external networks. To access an external file, upload it to Object Storage Service (OSS) and read it from there.
Custom plugin hot updates
No. To implement hot updates, reference the IK analysis plugin method. IK Analysis for Elasticsearch.
Analysis-aliws configuration and file format
For detailed configuration steps, see Use the analysis-aliws plug-in.
The dictionary file must meet the following requirements:
Name: The file must be named
aliws_ext_dict.txt.File format: The file must be in UTF-8.
Content: Each line must contain a single word without any leading or trailing whitespace. Each line must end with a UNIX or Linux line feed (
\n). If you create the dictionary file in Windows, you must convert it using a tool such asdos2unixon a Linux machine before uploading.
Synonyms, IK tokens, and AliNLP tokens
Type | Usage | Description | File type | Tokenizer or analyzer |
Synonym | Upload a synonym file in the Cluster Configuration module. | Defining synonyms in a file allows a query for one term to also match documents containing its synonymous terms. | UTF-8 encoded TXT file | Used in a custom analyzer. |
IK token | Provided by the | A passage is segmented based on the main.dic file. When you perform a query, if the query content contains any of the segmented words, the passage is returned in the search results. The process also uses the stopword file stop.dic. After segmentation, words found in the stop.dic file are filtered out. You can view the corresponding dictionaries in the official documentation. | UTF-8 encoded DIC file | Tokenizer:
|
AliNLP token | Provided by the | Similar to IK tokenization, but it does not use a separate stopword file. Stopwords are integrated into the main dictionary, | Requires a UTF-8 encoded file named |
|
IK analysis mode configuration
Alibaba Cloud Elasticsearch comes with the IK analyzer plugin pre-installed, which cannot be uninstalled. Apply cold and hot updates to the default dictionary and use it when creating index mappings. Use the IK analyzer plugin (analysis-ik).
Built-in Chinese tokenizers
Alibaba Cloud Elasticsearch supports the built-in Chinese tokenizers analysis-ik and analysis-aliws. You can use them after configuring their corresponding dictionaries.
Automatic updates for dictionary files in OSS
No. Alibaba Cloud Elasticsearch does not currently support hot updates for dictionary files from OSS. After a dictionary file in OSS is modified, you must manually upload and configure it to apply the changes. Furthermore, for an index configured with an IK analyzer, synonyms, or an AliNLP analyzer, the updated dictionary affects only new data. To apply the changes to all existing data, you must reindex.
IK analyzer and remote dictionaries
No. The Alibaba Cloud Elasticsearch IK analyzer supports uploading and updating dictionaries. Use the IK analyzer plugin (analysis-ik). Remote dictionaries and related configurations, such as IKAnalyzer.cfg.xml, are not supported. To use a remote dictionary, see Implement dynamic synonym updates in Alibaba Cloud Elasticsearch.
Install the vector search plugin (aliyun-knn) for Elasticsearch 7.10
For Alibaba Cloud Elasticsearch 7.10 clusters, the vector search plugin is integrated into the apack plug-in, which is installed by default. To manage the vector search plugin, see Use the apack physical replication feature. For other versions, see Use the aliyun-knn vector search plugin.
If your cluster's kernel version is 1.4.0 or later, the apack plug-in is already up to date. You can run the GET _cat/plugins?v command to check the plugin version.
Restart impact on services
Typically, if the cluster load is low and indexes have replicas, the cluster continues serving traffic during a restart. However, timeouts can occur during high-concurrency forced restarts, on heavily loaded clusters, without replica shards, or under heavy workloads. Implement a retry mechanism in your client and restart during off-peak hours.
Log FAQ
Retention period for .security indexes
Yes. Use index lifecycle management (ILM) to configure a retention period. Manage Heartbeat data with index lifecycle management.
The .security indexes store elastic account information. Periodically deleting these indexes may prevent you from logging on to the Kibana console of your Elasticsearch cluster.
Store Elasticsearch logs on-premises
Use the ListSearchLog API to retrieve cluster logs and save them on-premises.
Viewing Elasticsearch logs
Configure slow logs and lower the time threshold. Query logs.
Configure and view slow logs
By default, an Elasticsearch cluster records read and write operations that take 5 to 10 seconds as slow logs. To capture more logs, log in to the Kibana console and run commands to lower the time threshold. Related documentation.
You cannot change the slow log format.
Retrieve slow logs programmatically
Call the ListSearchLog API to retrieve slow logs programmatically.
Find clients of an Elasticsearch cluster
You can view the access logs or audit logs of your Elasticsearch cluster:
To track cluster operations, such as create, delete, update, and query, enable audit logs.
To view request details, such as the requested node and its IP address, bodySize, request content, request time, client IP address, and URI, enable access logs.
For limitations, precautions, and how to enable these logs, see Query logs.
Backup and restoration
Snapshot restoration across different versions
With automatic backups, you can only restore a snapshot to the original cluster or use the cross-cluster snapshot restoration feature. Automatic Backup and Restoration and Cross-Cluster Backup and Restoration with an OSS Bucket.
With manual backups, you can restore a snapshot to other Elasticsearch clusters. Restore between clusters of the same version to avoid compatibility issues. Manual Backup and Restoration.
Unhealthy cluster state during backup for version upgrade
If the cluster state is unhealthy, you cannot create a snapshot backup. Restore the cluster state to green first.
Automatic backup without a configured OSS bucket
Alibaba Cloud Elasticsearch provides an OSS bucket for your cluster by default. To view the automatic snapshots, Log on to the Kibana console and run the GET _snapshot/aliyun_auto_snapshot/_all command.
Shard failure during a snapshot restore when the POST /_cluster/reroute?retry_failed=true command fails
When you restore data from a snapshot, you may encounter an error similar to the following:

To resolve this issue, delete the problematic index and then restore it by calling the _restore API. In the restore command, add the max_restore_bytes_per_sec parameter to limit the restore speed for each node. The default value is 40 MB per second.
POST /_snapshot/aliyun_snapshot_from_instanceId/es-cn-instanceId_datetime/_restore
{
"indices": "myIndex",
"settings": {
"max_restore_bytes_per_sec" : "150mb"
}
}Other related parameters include:
compress: Specifies whether to enable data compression. The default value is true.
max_snapshot_bytes_per_sec: Specifies the snapshot speed per node. The default value is 40 MB per second.
Export data to a local machine
Back up data from your Elasticsearch cluster to OSS, then use the Download objects feature in the OSS console to download the backup locally.
Restore snapshots across clusters
For specific instructions, limitations, and notes on cross-cluster snapshot restoration, see Back up and restore data with a cross-cluster OSS repository. For cross-region data migration within the same account, you can use commands that are used to create manual snapshots for index data and restore data from the snapshots. For more migration methods, see Migration method selection.
Data backup options
Data backup covers available options, use cases, and limitations.
Cluster monitoring and alerting
Configure X-Pack Watcher alerts
To configure a DingTalk or WeCom chatbot to receive alerts from X-Pack Watcher, see Configure a DingTalk robot for Watcher alerts and Configure a WeCom chatbot to receive alert notifications from X-Pack Watcher.
X-Pack Watcher is a monitoring and alerting service based on Elasticsearch. You can integrate it with Alibaba Cloud Elasticsearch to trigger actions when specific conditions are met. For example, you can configure a rule to automatically send a DingTalk message when an 'error' log appears in the 'logs' index.
Handle GC memory allocation failures
Possible causes include high cluster load, high query QPS, or large write volumes:
High cluster load: Troubleshoot and resolve high cluster disk usage and read-only issues.
High query QPS or large write volumes: Enable read/write throttling with the cluster throttling plug-in (aliyun-qos).
NoteFor image retrieval, install the vector search plug-in (aliyun-knn) and plan your cluster and index as described in Use the vector search plug-in (aliyun-knn).
Grafana monitoring
Available only for ES 6.7.0 instances with kernel version 1.2.0 or later. View monitoring metrics.
Cluster status metric values
The cluster status metric indicates cluster health. A value of 0.00 means normal. Metrics and exception handling.
Value | Description |
0.00 | The cluster is in a normal state. |
1.00 | The cluster is in a sub-healthy state when one or more indexes have unassigned replica shards. The cluster can still provide services. |
2.00 | The cluster is in an abnormal state when one or more indexes have unassigned primary shards. The cluster cannot provide services. Restore the cluster to a normal state as soon as possible. |
Elasticsearch disk usage
View disk usage in the console or with X-Pack monitoring in Kibana. Metrics and exception handling and Configure monitoring indices.
CMS GC "promotion failed" error
You might encounter this error when using the CMS garbage collector in Alibaba Cloud Elasticsearch. It typically indicates that there is insufficient space in the old generation, causing object promotion to fail. To resolve this issue, consider the following:
Monitoring and log analysis
Check the GC log for frequent CMS GC or Full GC operations to determine if the
CMS GC promotion failederror is caused by insufficient space in the old generation.Log in to the Log Query page in the Alibaba Cloud Elasticsearch console and search for logs containing
promotion failedto find the root cause.
Adjust heap memory and garbage collector settings
If your Elasticsearch version is 6.7.0 or later and each data node has 32 GB or more of memory, switch the garbage collector to G1 for better performance.
Based on your cluster's resource usage and business requirements, evaluate whether to increase the instance memory.
Tuning suggestions
If memory-related issues persist, evaluate your index data volume, query load, and cluster resource configuration. If necessary, contact Alibaba Cloud technical support for professional tuning guidance.
FAQ: Cluster access
Client connection and open source comparison
To connect to an Alibaba Cloud Elasticsearch cluster, use its internal or public endpoint — equivalent to an open source cluster's address. Use a client to access an Alibaba Cloud Elasticsearch cluster.
Disabling basic authentication
No, you cannot disable basic authentication. It is a Kibana authentication mechanism provided by X-Pack, which is included in all Elasticsearch clusters.
Internal access: Same VPC, different AZs
Yes. An ECS instance can access an Elasticsearch cluster over the internal network as long as they are in the same VPC.
Configure an IP address whitelist
To access an Alibaba Cloud Elasticsearch instance from the public network or a VPC, add your client's IP address to the instance's public or VPC IP address whitelist. Configure an IP address whitelist for an instance. Note the following:
Before you configure a public IP address whitelist, you must enable public network access, which is disabled by default.
An IP address whitelist can contain up to 50 IP addresses or CIDR blocks.
If you specify an entry as a CIDR block, the IP address part of the entry must be the network address of the subnet.
For certain versions (such as Elasticsearch 7.16) and regions (such as China (Chengdu), China (Guangzhou), and China (Ulanqab)), you cannot set the IP address whitelist to 0.0.0.0/0. Check the error message on the page to confirm if this restriction applies. If your IP address changes frequently, configure a CIDR block for your network.
You cannot combine 0.0.0.0/0 with other specific IP addresses or CIDR blocks in the same whitelist. If you do, the system returns an error. For testing with 0.0.0.0/0, ensure it is the only entry.
Connecting to an Elasticsearch cluster from the Internet
To connect to an Elasticsearch cluster from the Internet, use its public endpoint and configure an IP address whitelist. You must also configure the domain name, username, and password. Use a client to access an Alibaba Cloud Elasticsearch cluster.
Cannot access Elasticsearch: Connection refused
The following table describes the possible causes and solutions.
Cause | Solution |
Public access connectivity issue | If you access the Elasticsearch cluster using its public endpoint, follow these steps:
|
Private access connectivity issue | If you access the Elasticsearch cluster using its internal endpoint, follow these steps:
|
Poor cluster health | If the network is reachable but you still cannot access the Elasticsearch cluster, check the cluster's health and resolve any issues using the following methods:
|
Password reset and Elasticsearch access
If you reset the password for the elastic account in the console, only that account's access is affected. Use a custom account with the required permissions in your application code instead. Manage access control with Elasticsearch X-Pack roles.
Changing the password does not trigger an instance restart.
Resolve connection failures with Elasticsearch-Head 5.0.0
This issue is usually caused by the cross-origin resource sharing (CORS) policy enforced by Google Chrome. Follow these steps to resolve the issue on macOS.
Create an empty folder.
Open the terminal and run the following command.
open -n /Applications/Google\ Chrome.app --args --disable-web-security --user-data-dir=/path/to/your/empty/folder
Elasticsearch-Head is no longer maintained for versions later than 5.x. Use Cerebro instead.
Index FAQ
Close an index
You cannot query or write to a closed Elasticsearch index.
POST /<index_name>/_open # Open an index
POST /<index_name>/_close # Close an index