RE: liferay embedded "reindex all" problem in cluster

pierpaolo rai, modified 6 Years ago. New Member Posts: 12 Join Date: 11/9/12 Recent Posts

hi guys,

I've installed a 2 nodes cluster with liferay 7.1 CE GA1. 

The 2 nodes shares the DB and the document library. 

I know that I have to install en external ES but for the moment I can't, I'm using the embedded ES.

I have a problem in this configuration. When I reindex all form one node everithink is ok, I see the % and then evetithink is ok.

In the other node when I push the reindex all button I have the message "the portal is reindexing" but afther 10 minutes the icon disappear and I have no content. the reindex fails.

I tried to clean all files in the directory /data/liferay/elasticsearch6, I also cleaned the osgi state but nothing

I set elastic log level to debug and I got this error in the search page:

2019-01-18 08:57:34.470 WARN  [http-nio-8080-exec-4][ElasticsearchIndexSearcher:183] [liferay-20099] IndexNotFoundException[no such index]
[liferay-20099] IndexNotFoundException[no such index]
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.indexNotFoundException(IndexNameExpressionResolver.java:678)
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.innerResolve(IndexNameExpressionResolver.java:630)
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:586)
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:164)
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:139)
        at org.elasticsearch.action.search.TransportSearchAction.executeSearch(TransportSearchAction.java:294)
        at org.elasticsearch.action.search.TransportSearchAction.lambda$doExecute$4(TransportSearchAction.java:193)
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60)

And when I do a full reindex I got:

2019-01-18 09:01:57.722 ERROR [liferay/search_writer/SYSTEM_ENGINE-2][ElasticsearchUpdateDocumentCommandImpl:50] failure in bulk execution:_[0]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_WT48rDrZe2cZZwqDI6Exwg==], message [[liferay-20099] IndexNotFoundException[no such index]]_[1]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_tz5p6+jjy2ZtjNcBUkg92A==], message [[liferay-20099] IndexNotFoundException[no such index]]_[2]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_1L4/7Xl13xOn4MPzbpQB+A==], message [[liferay-20099] IndexNotFoundException[no such index]]_[3]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_Hqahoj18coc92uBeHp/QJA==], message [[liferay-20099] IndexNotFoundException[no such index]]_[4]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_NT2tIDT9swBPjfCj1FZB2Q==], message [[liferay-20099] IndexNotFoundException[no such index]]_[5]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_8lYidOlhMfq3oqlACJ1hTQ==], message [[liferay-20099] IndexNotFoundException[no such index]]_[6]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_icAIzummW9QSMxO/ByNyvQ==], message [[liferay-20099] IndexNotFoundException[no such index]]_[7]: index [liferay-20099], type [LiferayDocumentType], id [20099_spellCheckWord_/buX4Pl4M2O8DgEGyAV+xA==], message [[liferay-20099] IndexNotFoundException[no such index]]_[8]: index [liferay-20099], type [LiferayDocumentType], id

 

And this is my cluster config in the portale-ext.properties:

 

cluster.link.enabled=true
cluster.link.autodetect.address=siu-postgresql-1.prd.spc:5434
cluster.link.channel.properties.control=/custom_cache/tcp_control.xml
cluster.link.channel.properties.transport.0=/custom_cache/tcp_transport.xml

 

Any idea?

Is possible to hae a cluster with embedded ES?

Or I have to leave the two node separately?

Many thanks.

thumbnail
Jorge Díaz, modified 6 Years ago. Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts

Hi Pierpaolo rai,

 

First of all, read: https://dev.liferay.com/discover/deployment/-/knowledge_base/7-1/configuring-elasticsearch-for-liferay-0#embedded-vs-remote-operation-mode

Do NOT use embedded Elasticsearch in production. Embedded Elasticsearch is useful for development and demonstration purposes. Refer to the documentation for details on the limitations of embedded Elasticsearch. Remote Elasticsearch connections can be configured in the Control Panel.

 

Having said that, I have to also say that using Embedded Elasticsearch in a Liferay Cluster has never been tested so you will run in unexpected problems.

For example, reindex operation is a background task that will be executed only in master node, so one of the nodes won't be reindexed.

 

And in case a object is created (for example a webcontent) reindex operation will be only triggered in current node, as Liferay expects that there is no necessary to replicate that index operation to the other node