Custom Elasticsearch Plug-in Installation Guide
Symptom
Install custom plug-ins when using Elasticsearch.
Precautions
- The plug-in version must be the same as the MRS Elasticsearch kernel version. Otherwise, the startup may fail. You are advised to install and verify the plug-in on the open source Elasticsearch of the same version before using the plug-in.
- The plug-in needs to be installed on all Elasticsearch instances. After the installation, you need to restart the Elasticsearch service. To prevent JAR file conflicts between the plug-in package and existing plug-ins in MRS Elasticsearch, you are advised to install and verify the plug-in on one Elasticsearch instance before installing the plug-in on a large scale.
Prerequisites
- You have obtained the plug-in package to install.
- The Elasticsearch client has been installed.
- You have created a service user who has the permission to access Elasticsearch.
Procedure
- Upload the plug-in package to the node where SetupTool is installed in the cluster and decompress the package. The name of the decompressed plug-in folder must be the same as the value of the plug-in parameter in the ${BIGDATA_HOME}/FusionInsight_Elasticsearch_xxx/install/FusionInsight-Elasticsearch-xxx/elasticsearch/plugins/plugin-descriptor.properties file in the subdirectory. If they are different, change the folder name.
- Run the scp command as user omm to copy the decompressed plug-in folder to the plugins directory on the node where any Elasticsearch instance resides. (The plug-in owner must be user omm, and the group must be wheel.)
scp Path of the decompressed plug-in omm@Service IP address of any Elasticsearch instance:${BIGDATA_HOME}/FusionInsight_Elasticsearch_xxx/install/FusionInsight-Elasticsearch-xxx/elasticsearch/plugins
- To obtain the service IP address of an Elasticsearch instance, log in to FusionInsight Manager, choose Cluster > Services > Elasticsearch > Instance, and view the service IP address of any instance.
- xxx indicates the Elasticsearch component package and kernel version. Replace it based on site requirements.
- Log in to FusionInsight Manager and choose Cluster > Services > Elasticsearch. Click Instance. On the page that is displayed, select the instance used in 2, and choose More > Restart Instance.
- Check whether the /var/log/Bigdata/elasticsearch/Instance name/elasticsearch_cluster.log file contains error information and whether the plug-in can be started. Instance name indicates the instance used in 2.
- Log in to the instance used in 2 as user root and run the following commands to check whether the plug-in is loaded:
cd Client installation directory
source bigdata_env
kinit Service user (skip this command for normal clusters)
- For a cluster in security mode, run the following command: curl -XGET --negotiate -k -u: "https://Service IP address of the instance that you have logged in to:Port/_cat/plugins"
- For a cluster in normal mode, run the following command: curl -XGET "http://Service IP address of the instance that you have logged in to:Port/_cat/plugins"
If the plug-in is displayed, the load is successful.
To obtain the port number of the instance, log in to FusionInsight Manager, choose Cluster > Services > Elasticsearch, click Configurations then All Configurations, and search for SERVER_PORT in the search box.
- Copy the decompressed plug-in to the following path of all Elasticsearch instances as user omm:
./clusterscp.sh put Path of the decompressed plug-in ${BIGDATA_HOME}/FusionInsight_Elasticsearch_xxx/install/FusionInsight-Elasticsearch-xxx/elasticsearch/plugins
- The clusterscp.sh script is stored in FusionInsight_SetupTool/preinstall/tools/cluste. If you do not have the permission to access Fusioninsight_SetupTool as user omm, run the following command to change the permission:
chown omm:wheel -R Fusioninsight_SetupTool path
- After the replication is complete, ensure that the owner and group of plugin on each node are omm:wheel. You can run the following command to modify the owner information of all nodes:
./clustercmd.sh "chown -R -v Installed plugin path"
- The clusterscp.sh script is stored in FusionInsight_SetupTool/preinstall/tools/cluste. If you do not have the permission to access Fusioninsight_SetupTool as user omm, run the following command to change the permission:
- Log in to FusionInsight Manager and choose Cluster > Services > Elasticsearch. Choose More > Restart. Verify the identity and click OK. Wait until the restart is successful.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot