When you use an Alibaba Cloud Logstash cluster to transfer data to an Alibaba Cloud Elasticsearch cluster that is specified as the output for a Logstash pipeline, you may encounter some issues. For example, the network cannot be connected, pipeline configurations are invalid, the load of the source, Logstash pipeline, or Elasticsearch cluster is high, the pipeline is started but no data is written to the Elasticsearch cluster, and the related services normally run but no data can be queried from the source or the data write operation for the destination is abnormal. This topic describes solutions to these issues.
Failed network connection
Check item | Sample scenario for the issue | Recommended solution |
Check whether your Logstash cluster resides in the same network environment as the destination Elasticsearch cluster and the source. Note Alibaba Cloud Logstash clusters and Elasticsearch clusters are deployed in virtual private clouds (VPCs). We recommend that you deploy the Logstash cluster and the Elasticsearch cluster in the same VPC. | The source resides on the Internet, while the Logstash cluster resides in a VPC. | Use one of the following solutions:
|
Check whether the NAT gateway is correctly configured. |
| Use one of the following solutions based on your business requirements:
|
Check whether the uploaded Java Database Connectivity (JDBC) driver is valid. | When a JDBC driver is used to synchronize data from PolarDB, no error is reported in the log but data cannot be written to the destination Elasticsearch cluster. After a JDBC driver of an earlier version is used, data can be written. | Use a JDBC driver of an appropriate version. For more information, see Configure third-party libraries. |
Check whether the whitelist mechanism or security group rules for the source limits the access to the Logstash cluster. | Filebeat is used to collect data from the source to the Logstash cluster. Filebeat is deployed on ECS instances of the client side. However, the ports of ECS instances are not enabled in a security group. | Use one of the following solutions based on your business requirements:
|
Check whether the RAM users specified in the input and output configurations of the Logstash pipeline have the required permissions. |
| Use one of the following solutions based on your business requirements:
|
Invalid pipeline configurations
Check item | Sample scenario for the issue | Recommended solution |
Query the cluster logs of the Logstash cluster and check whether errors are reported in the logs. For information about how to query the cluster logs of a Logstash cluster, see Query logs. | A required plug-in is not installed for the Logstash cluster. For example, if the cluster logs contain the error message | Use one of the following solutions:
|
Configuration information contains hidden special characters. | Manually enter the configuration information. | |
Code fails to be filtered based on the configurations in the filter part. For example, invalid Ruby code fails to be filtered out based on the configurations in the filter part. | Use one of the following solutions:
| |
The parameter names or parameter values that you configure in pipeline configurations are invalid. For example, you enter the parameter name hosts as host when you configure the logstash-output-elasticsearch plug-in, or you enter an invalid RDS instance name. | For information about how to configure pipeline settings, see open source Logstash documentation or Best practices for Alibaba Cloud Logstash. | |
The connection times out when the Logstash cluster connects to the source or the Elasticsearch cluster. For example, if the Logstash cluster cannot connect to the Elasticsearch cluster for a long period of time, the error message | Make sure that the Logstash cluster can connect to the Elasticsearch cluster and the endpoints of the source and the Elasticsearch cluster are correct. | |
HTTPS is enabled for the Elasticsearch cluster, but you specify http when you configure the Logstash pipeline. | Modify the configurations of the pipeline to make sure that the Logstash pipeline, the source, and the Elasticsearch cluster use the same protocol. |
Abnormal load
Check item | Sample scenario for the issue | Recommended solution |
Check whether the disk usage of nodes is excessively high. For more information, see Cluster monitoring overview. |
| Use one of the following solutions based on your business requirements:
|
Check whether an out of memory (OOM) error is reported for the memory usage of nodes. For more information, see Cluster monitoring overview. | An OOM error is reported for the memory usage of nodes. As a result, nodes fail to start. | Restart the nodes in the Elasticsearch cluster. |
Check whether the load of the source or the Elasticsearch cluster is normal. | The Elasticsearch cluster is in an unhealthy state. As a result, data cannot be written to the cluster. | Pause the write operation and recover the Elasticsearch cluster to a normal state. We recommend that you scale out the cluster. |
No data written to the Elasticsearch cluster after the pipeline is started
Check item | Sample scenario for the issue | Recommended solution |
Enable the pipeline configuration debugging feature for the Logstash cluster and view the debug logs of the cluster to check whether data is transferred to the Logstash cluster. To enable the pipeline configuration debugging feature, you must install the logstash-output-file_extend plug-in for the Logstash cluster. For information about how to use the pipeline configuration debugging feature, see Use the pipeline configuration debugging feature.
| If no data is transferred to the Logstash cluster, the following situations may occur:
| Use one of the following solutions based on your business requirements:
|
If data is transferred to the Logstash cluster, the following situations may occur:
| Use one of the following solutions based on your business requirements:
|
Abnormal data query from the source or abnormal data write to the destination while all services normally run
Check item | Sample scenario for the issue | Recommended solution |
Perform the following operations based on the pipeline configuration scenario and the attributes of the pipeline plug-ins:
| If you use JDBC, the following situations may occur:
| Use one of the following solutions based on your business requirements:
|
If you use the logstash-input-elasticsearch plug-in, the following situations may occur:
| Logstash is not suitable for real-time data synchronization. If data is written to the source in real time, we recommend that you specify a long query interval. This can prevent frequent queries in the source and frequent write operations in the Elasticsearch cluster. | |
View the slow logs of the Logstash cluster to check whether data is written to the Elasticsearch cluster at a low speed. For information about how to view slow logs, see Query logs. | The loads on the source and the Elasticsearch cluster have not encountered bottlenecks. However, the default value is retained for the Pipeline Workers parameter. As a result, data is written to the destination Elasticsearch cluster at a low speed. | Set the Pipeline Batch Size and Pipeline Workers parameters to larger values. For more information, see Use configuration files to manage pipelines. |