Elasticsearch fails to index after upgrade to 7.14 and PHP 8.2

Hello
I’ve noticed that Elastic search reindex does not work after upgrade to 7.14.2 and PHP 8.2.
I know that there is an open bug report about re index not working but I’ve found that even full index in CLI does not work any longer.

Before I’ve wiped all indexed records from Elasticsearch I could search for records successfully, but only for older records, newer records could not be found.

I’m running on Debian latest, Apache 2, PHP 8.2.7 in php-fpm mode
Elasticsearch 7.17.16

When I use robo to run a full index job I get the following

vendor/bin/robo elastic:index 0
[=][02:59:12] Starting indexing procedures
[@][02:59:12] Indexing is performed using JsonSerializerDocumentifier
[@][02:59:12] A full indexing will be performed
[@][02:59:12] Removed index ā€˜accounts’
[@][02:59:12] Created new index ā€˜accounts’
[@][02:59:12] Removed index ā€˜contacts’
[@][02:59:12] Created new index ā€˜contacts’
[@][02:59:12] Removed index ā€˜leads’
[@][02:59:13] Created new index ā€˜leads’
[@][02:59:13] Removed index ā€˜notes’
[@][02:59:13] Created new index ā€˜notes’
[@][02:59:13] Removed index ā€˜aos_contracts’
[@][02:59:13] Created new index ā€˜aos_contracts’
[@][02:59:13] Removed index ā€˜meetings’
[@][02:59:13] Created new index ā€˜meetings’
[@][02:59:13] Removed index ā€˜opportunities’
[@][02:59:13] Created new index ā€˜opportunities’
[@][02:59:13] Indexing module Accounts…
[@][02:59:14] Finished Accounts. Processed 975 Records
[@][02:59:14] Indexing module Contacts…
[@][02:59:14] Finished Contacts. Processed 728 Records
[@][02:59:14] Indexing module Leads…
[@][02:59:14] Finished Leads. Processed 4 Records
[@][02:59:14] Indexing module Notes…
[@][02:59:15] Finished Notes. Processed 1000 Records
[@][02:59:15] Indexing module AOS_Contracts…
[@][02:59:15] Finished AOS_Contracts. Processed 228 Records
[@][02:59:15] Indexing module Meetings…
[@][02:59:15] Finished Meetings. Processed 37 Records
[@][02:59:15] Indexing module Opportunities…
[@][02:59:15] Finished Opportunities. Processed 362 Records
[@][02:59:15] No record has been indexed
[=][02:59:15] Indexing complete

And while indexes are created , they are empty
curl ā€˜localhost:9200/_cat/indices?v’
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open .geoip_databases gXCDGK_gR9GG4IgMUtzX3g 1 0 42 4 39.2mb 39.2mb
yellow open aos_contracts ZJkpOEEYSuqHQgRnRVKcyQ 1 1 0 0 227b 227b
yellow open notes aQIzK2IiTL66UTinYuBGqA 1 1 0 0 227b 227b
yellow open leads H_EQgxDcT52lPlgt0omYcg 1 1 0 0 227b 227b
yellow open meetings VrDtnRR0QoKHW-rfj90hKg 1 1 0 0 227b 227b
yellow open accounts T0gdKV8ySpWiAovpEqa3hQ 1 1 0 0 227b 227b
yellow open opportunities d74huQyxSUmZYlaCxIMYUQ 1 1 0 0 227b 227b
yellow open contacts jDcqig1KRWOWweDj_a-YMQ 1 1 0 0 227b 22

I wonder if anyone has any ideas how to deal with this.

Anton

The fix is here, it just hasn’t been added in yet. Thanks go to @jansiero

Related

@rsp
I’ve tried this fix, it stops cron from generating errors, but does not resolve my problem.
I still get No record has been indexed in differential or full indexing.

Is there a way to release a hotfix? I can test it on my system, if you need a tester

Anton

Did you try chris001’s solution?

@rsp

No I didn’t . I’ve never used a github so I’m not sure how to pull the diff from it.

The solution you’ve linked just had 2 small code changes , so I’ve tried to use it by changing files manually.

I really don’t want to modify by hand all the files listed in solution linked by @chris001.

If you know of a guide on how to pull changed files from github, let me know so I can test it.

Anton

I think you need to update your code from here:

If you have dev instance try on it.

To apply and test the Elasticsearch fix from @jansiero :

  1. Go to your Debian linux terminal,
  2. cd (change directory) to the base directory of your SuiteCRM 7.14.2, for example: cd /home/suite7/public_html
  3. Make sure you have these commands installed, run: apt -y install wget git
  4. Get the fix: wget https://github.com/salesagility/SuiteCRM/pull/10275.diff
  5. Apply the fix: git apply 10275.diff
  6. Go to Admin, Repair, Quick Repair Rebuild.
  7. Go to Admin, Elasticsearch, try everything, see how it works!
  8. Report back your results!

@chris001
Thank you, I’ll try on a weekend
Anton

Hi, because the current code base consists out of different commits, applying the diff won’t work.

To apply the patch you can go to Admin / Module Loader and install the module that I attach here.

Please note:

  • It only installs on Suite 7.14.2
  • Before upgrading please first uninstall this module

@chris001 thank you for having kept this issue on the radar in the forum and on Github!

patch_10275.zip (124.4 KB)

1 Like

Did you able to set up the Elasticsearch on your SuiteCRM?