After clean install of SuiteCRM 7.11.5 indexing for global search is not working

We had a working SuiteCRM 7.9.17 install we tried to upgrade to next version (7.10.17). We had no luck. Whenever we moved to a 7.10.x version the layout was completely destroyed.
At the end we made a clean SuiteCRM 7.11.5 install and imported a backup dump from the 7.9.17 version into the database.
After importing customizations via Module Loader and a casual Quick Repair and Rebuild we were up and running again.

Now, the only thing I can’t get to work again is the global search in particular the indexing.
I have done this: https://pgorod.github.io/Reindex-AOD/
Under Schedulars when I look into “Perform Lucene Index” and “Optimise AOD Index” I get new entries, so the cron job seems to work.
In the folder “/modules/AOD_Index/Index/Index” nothing is happening. I have currently four files in there:
read.lock.file - 0kb - last change 20.06.2019
segments.gen - 1kb - last change 17.06.2019
segments_1 - 1kb - last change 17.06.2019
write.lock.file - 0kb - last change 17.06.2019

For “Perform Lucene Index” last successful run: 26.06.2019 00:00
For “Optimise AOD Index” last successful run: 26.06.2019 14:00

Would it make sense to copy back the old Index folder from the SuiteCRM 7.9.17 install?

Any ideas how to solve this?
Thank you for your time reading all this.
If you need more information to solve this let me know.

Hi, welcome.

Importing a database dump from a 7.9 to a 7.11 seems a really dangerous idea to me… there are differences in database structure, there are upgrade scripts that make changes to the system… it is never appropriate to import a different version of database into an installation. I would be surprised if you don’t find many problems in the future…

About the rest, I would start by checking your logs for any messages related to the indexing, there might be clues there about what is going wrong. You probably have some peculiarity about your ownerships/permissions scheme that needs to be fixed so that the CLI process can write to the files.

Can you please post the results of these two commands, given from your SuiteCRM base directory:


ls -al
ls -al modules/AOD_Index/Index/Index

This will help me get a quick glance of your ownerships and directory bits, etc.

Also, how did you set up your cron jobs? Which user’s crontab did you use, and which command did you write there? See Admin / Schedulers, at the bottom, for instructions specific to your system.

1 Like

Hi pgr

Thank you for the super quick reply.

I’m with you, the move from 7.9 to 7.11 was not the best idea ever but it was the only one that acutally worked.

From the suitecrm.log:
Mon Jun 17 13:35:50 2019 [30129][9a8d4539-6103-fc27-5141-58c947132cb9][FATAL] error loading relationship project_resource
Mon Jun 17 13:35:50 2019 [30129][9a8d4539-6103-fc27-5141-58c947132cb9][FATAL] error loading relationship am_projecttemplates_resources
Mon Jun 17 13:35:50 2019 [30129][9a8d4539-6103-fc27-5141-58c947132cb9][FATAL] [ERROR] Failed to remove bean to index
Mon Jun 17 13:35:50 2019 [30129][9a8d4539-6103-fc27-5141-58c947132cb9][FATAL] [ERROR] SuiteCRM\Search\Exceptions\SearchException: Elasticsearch trying to re-indexing a bean but indexer is disabled in configuration. in /home/info4cne/public_html/suite-crm-7-9-17/lib/Search/ElasticSearch/ElasticSearchHooks.php:123
Stack trace:
#0 /home/info4cne/public_html/suite-crm-7-9-17/lib/Search/ElasticSearch/ElasticSearchHooks.php(105): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndex(Object(Contact))
#1 /home/info4cne/public_html/suite-crm-7-9-17/lib/Search/ElasticSearch/ElasticSearchHooks.php(92): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndexSafe(Object(Contact))
#2 /home/info4cne/public_html/suite-crm-7-9-17/include/utils/LogicHook.php(272): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->beanDeleted(Object(Contact), ‘after_delete’, Array)
#3 /home/info4cne/public_html/suite-crm-7-9-17/include/utils/LogicHook.php(213): LogicHook->process_hooks(Array, ‘after_delete’, Array)
#4 /home/info4cne/public_html/suite-crm-7-9-17/data/SugarBean.php(3129): LogicHook->call_custom_logic(‘Contacts’, ‘after_delete’, Array)
#5 /home/info4cne/public_html/suite-crm-7-9-17/data/SugarBean.php(5267): SugarBean->call_custom_logic(‘after_delete’, Array)
#6 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(723): SugarBean->mark_deleted(‘d62a5610-501c-f…’)
#7 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(525): SugarController->action_delete()
#8 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(494): SugarController->do_action()
#9 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(468): SugarController->handle_action()
#10 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(373): SugarController->process()
#11 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/SugarApplication.php(113): SugarController->execute()
#12 /home/info4cne/public_html/suite-crm-7-9-17/index.php(52): SugarApplication->execute()
#13 {main}

Thu Jun 20 15:54:46 2019 [11645][77b878cc-9b2a-b30b-7141-58c161ab571f][FATAL] Exception handling in /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php:400
Thu Jun 20 15:54:46 2019 [11645][77b878cc-9b2a-b30b-7141-58c161ab571f][FATAL] Exception in Controller: Subpanel was not defined
Thu Jun 20 15:54:46 2019 [11645][77b878cc-9b2a-b30b-7141-58c161ab571f][FATAL] backtrace:
#0 /home/info4cne/public_html/suite-crm-7-9-17/include/SubPanel/SubPanelViewer.php(61): sugar_die(‘Subpanel was no…’)
#1 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(1087): require_once(’/home/info4cne/…’)
#2 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(468): SugarController->handleActionMaps()
#3 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/Controller/SugarController.php(373): SugarController->process()
#4 /home/info4cne/public_html/suite-crm-7-9-17/include/MVC/SugarApplication.php(113): SugarController->execute()
#5 /home/info4cne/public_html/suite-crm-7-9-17/index.php(52): SugarApplication->execute()
#6 {main}

There is not much else, some failed logins.
We do not use Elasticsearch, I have clicked on it in the admin panel just to check it out when I realised the search is not really working.

Please find attach some pics of the ownerships/permissions scheme.

I’m on a shared hosting only crontab -e works. I set the cron job according to the instructions in “Admin / Schedulers”.

Thanks

The permissions look right. But all those log errors really worry me. I fear your migration will leave you with a broken system, and as you use it you will only find out more pieces that are broken about it.

You said you tried an upgrade but the layouts didn’t turn out well - I believe we could fix that with a few repairs and clean-ups, do you want to try it again?

Thank you for your reply.

Do you know when the next update is coming? (7.11.x) I would like to try and see what happends.
Do you know what all has changed from a database point of view between 7.9 and 7.11?

The thing is the system works well, I have it in production for around 2 weeks now and no complaints except the search is not really working.

There’s a new version out now.

The think is that you have no way of knowing (except VERY complex ways) what is actually missing. You could find out serious problems much later, and then there is no turning back…

1 Like

Thanks for this, have seen the new version yesterday. Had no time to check the update so far.
I fear the same thing as you do but going back now is kind of also not an option. :sick: