Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Elasticsearch(6.5.0) error after upgrade from 7.0 to 7.2
Hello,After hours of investigations, i cannot find the origin of the problem, i have already installed the necessary plugins in elasticsearch, i have problem running liferay 7.2.02020-01-22 18:00:44.334 ERROR [liferay/search_writer/SYSTEM_ENGINE-5][ElasticsearchIndexWriter:364] Update failed
2020-01-22 18:00:44.335 ERROR [liferay/search_writer/SYSTEM_ENGINE-2][ElasticsearchIndexWriter:364] Update failed
2020-01-22 18:00:44.334 ERROR [liferay/search_writer/SYSTEM_ENGINE-3][ElasticsearchIndexWriter:364] Update failed
2020-01-22 18:00:44.334 ERROR [liferay/search_writer/SYSTEM_ENGINE-4][ElasticsearchIndexWriter:364] Update failed
2020-01-22 18:00:44.334 ERROR [liferay/search_writer/SYSTEM_ENGINE-1][ElasticsearchIndexWriter:364] Update failed
Can you help please!!!it happens while running method updateDocument in ElasticsearchWriter:public void updateDocument(SearchContext searchContext, Document document) {
String indexName = _indexNameBuilder.getIndexName(
searchContext.getCompanyId()); BulkDocumentRequest bulkDocumentRequest = new BulkDocumentRequest(); if (PortalRunMode.isTestMode() || searchContext.isCommitImmediately()) {
bulkDocumentRequest.setRefresh(true);
} DeleteDocumentRequest deleteDocumentRequest = new DeleteDocumentRequest(
indexName, document.getUID()); deleteDocumentRequest.setType(DocumentTypes.LIFERAY); bulkDocumentRequest.addBulkableDocumentRequest(deleteDocumentRequest); IndexDocumentRequest indexDocumentRequest = new IndexDocumentRequest(
indexName, document); indexDocumentRequest.setType(DocumentTypes.LIFERAY); bulkDocumentRequest.addBulkableDocumentRequest(indexDocumentRequest); BulkDocumentResponse bulkDocumentResponse =
_searchEngineAdapter.execute(bulkDocumentRequest); if (bulkDocumentResponse.hasErrors()) {
if (_logExceptionsOnly) {
_log.error("Update failed");
}
else {
throw new SystemException("Update failed");
}
}
}
Could you help please
!
2020-01-22 18:00:44.335 ERROR [liferay/search_writer/SYSTEM_ENGINE-2][ElasticsearchIndexWriter:364] Update failed
2020-01-22 18:00:44.334 ERROR [liferay/search_writer/SYSTEM_ENGINE-3][ElasticsearchIndexWriter:364] Update failed
2020-01-22 18:00:44.334 ERROR [liferay/search_writer/SYSTEM_ENGINE-4][ElasticsearchIndexWriter:364] Update failed
2020-01-22 18:00:44.334 ERROR [liferay/search_writer/SYSTEM_ENGINE-1][ElasticsearchIndexWriter:364] Update failed
Can you help please!!!it happens while running method updateDocument in ElasticsearchWriter:public void updateDocument(SearchContext searchContext, Document document) {
String indexName = _indexNameBuilder.getIndexName(
searchContext.getCompanyId()); BulkDocumentRequest bulkDocumentRequest = new BulkDocumentRequest(); if (PortalRunMode.isTestMode() || searchContext.isCommitImmediately()) {
bulkDocumentRequest.setRefresh(true);
} DeleteDocumentRequest deleteDocumentRequest = new DeleteDocumentRequest(
indexName, document.getUID()); deleteDocumentRequest.setType(DocumentTypes.LIFERAY); bulkDocumentRequest.addBulkableDocumentRequest(deleteDocumentRequest); IndexDocumentRequest indexDocumentRequest = new IndexDocumentRequest(
indexName, document); indexDocumentRequest.setType(DocumentTypes.LIFERAY); bulkDocumentRequest.addBulkableDocumentRequest(indexDocumentRequest); BulkDocumentResponse bulkDocumentResponse =
_searchEngineAdapter.execute(bulkDocumentRequest); if (bulkDocumentResponse.hasErrors()) {
if (_logExceptionsOnly) {
_log.error("Update failed");
}
else {
throw new SystemException("Update failed");
}
}
}
Could you help please
Are you using a Remote Elasticsearch or embedded one (note that embedded is only fine in case of local development environments!)Do you have any kind of warning, error or exception in Elasticsearch side?
Hello Jorge,No i dont have any exception in elasticsearch side, it's a remote elasticsearch which is installed in my machine.Thx a lot for your help
Hi Najlaa,
Try activating DEBUG traces at both Liferay and Elasticsearch;
Try activating DEBUG traces at both Liferay and Elasticsearch;
- In Liferay you can activate DEBUG traces using "Log Levels" section in following documentation: https://portal.liferay.dev/docs/7-2/user/-/knowledge_base/u/server-administration there, you have to change traces to DEBUG for all packages with "search" and "elasticsearch" in its name.
- I cannot help you with the Elasticsearch side.
Thanks a lot Jorge !