Issue
- Elasticsearch is not running properly, receiving the below errors:
ERROR [liferay/search_writer/SYSTEM_ENGINE-371][ElasticsearchIndexWriter:143] java.lang.RuntimeException: org.elasticsearch.client.transport.NoNodeAvailableException:
NoNodeAvailableException[None of the configured nodes are available.[WARN ][o.e.b.Natives ] [node-1] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch.LhNfdE3i/jna--1985354563/jna2430506984811668592.tmp: /tmp/elasticsearch.LhNfdE3i/jna--1985354563/jn
Environment
- Liferay DXP 7.2
Resolution
-
If it is a single-node elasticsearch cluster then try to add the discovery.type: single-node in the elasticsearch.yml.
- The discovery.type: specifies whether Elasticsearch should form a multiple-node cluster.
1. Defaults to multi-node, which means that Elasticsearch discovers other nodes when forming a cluster and allows other nodes to join the cluster later.
2. If set to single-node, Elasticsearch forms a single-node cluster. When this setting is enabled, a node will elect itself as the master and will not join a cluster with other nodes -
After adding the above property, try to restart the server after clearing the temporary directories, as mentioned below:
a. Delete {Liferay_Home}/osgi/state folder
c. Delete{Liferay_Home}/work
d. Delete{Tomcat_Home}/temp and {Tomcat_Home}/work
e. Restart the server