Issue
- You might encounter a behavior where Liferay tries accessing certain indexes that had a different name in previous versions.
- Normally this is not causing any issues, however you might have specific restrictions in place in your ES installation, and therefore getting an error like the following:
ERROR [main][RankingIndexCreationBundleActivator:56] bundle com.liferay.portal.search.tuning.rankings.web:3.0.57 (474)[com.liferay.portal.search.tuning.rankings.web.internal.index.creation.activator.RankingIndexCreationBundleActivator(7573)] : The activate method has thrown an exception
java.lang.RuntimeException: org.elasticsearch.ElasticsearchStatusException: ElasticsearchStatusException[method [HEAD], host [http://127.0.0.1:9201], URI [/liferay-search-tuning-rankings?include_type_name=true], status line [HTTP/1.1 403 Forbidden]]; nested: ResponseException[method [HEAD], host [http://127.0.0.1:9201], URI [/liferay-search-tuning-rankings?include_type_name=true], status line [HTTP/1.1 403 Forbidden]];
at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:2458) ~[?:?]
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2184) ~[?:?]
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2137) ~[?:?]
at org.elasticsearch.client.IndicesClient.exists(IndicesClient.java:1321) ~[?:?]
Environment
- Liferay DXP 7.2 SP3/FP8+
Resolution
- The error message can be safely ignored as this does not cause any issue normally
- Or you can avoid it by granting access to the user for the old index name.
Additional Information
-
This index is accessed at startup because in earlier versions (e.g. 7.2) the index was called
liferay-search-tuning-rankings
but in 7.2 SP3/FP8, multi-tenancy was introduced for the result rankings (and synonym sets as well) and at that point the index's name started to use the<prefix>-<companyId>-search-tuning-rankings
format. - This means that we needed a process in 7.2 SP3+/FP8+ versions to import documents from the old index to the new one to make sure that there is no data loss when the portal is upgraded from an older version, however the portal is not aware if the data is from a fresh installation or from an upgraded environment therefore the process runs at every startup.
- For more information, please check the following article: Multi-Tenant Elasticsearch Index Names Support in DXP 7.2 FP8/SP3 and DXP 7.3+: Important Changes for Search Tunings and Workflow Metrics
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión