Lucene Exception

Suite CRM Version 7.12.7

This problem just showed up this morning. First of all I don’t have Lucene Searching enabled.

I have this script that I have been using to import Tickets from an external system into Suite CRM. I have ran this script on my dev box, demo box and now have been running it on the production box for the last several days without any errors until this morning.

I have been running my script as root. On my production box I noticed that some of the files created in the modules/AOD_Index/Index/Index folder were set to root ownership. So I changed the ownership and permissions of all of the files in the modules/AOD_Index to the normal Suite CRM permissions (775 and owned by www-data).

I then decided to run the script as www-data but I still get the same error. The files in the error message, _5iqa.cfs and _5iqa.tis do exist.

I have read some messages here in the forum where others have had this problem. Some suggest rebuilding the AOD_Index while others suggested disabling AOD_Indexes. Since I am not using the Lucene Search engine, I am not sure what I need to do here. Furthermore I don’t understand why over the weekend this suddenly popped up.

###############  Saving Record (otrs) ########################
PHP Fatal error:  Uncaught Error: Class 'Zend_Search_Lucene_Exception' not found in /var/www/SuiteCRM-7.12.0/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Storage/File/Filesystem.php:67        
Stack trace:
#0 /var/www/SuiteCRM-7.12.0/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Storage/Directory/Filesystem.php(353): Zend_Search_Lucene_Storage_File_Filesystem->__construct('modules/AOD_Ind...')   
#1 /var/www/SuiteCRM-7.12.0/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Index/SegmentInfo.php(570): Zend_Search_Lucene_Storage_Directory_Filesystem->getFileObject('_5iqa.cfs', false)         
#2 /var/www/SuiteCRM-7.12.0/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Index/SegmentInfo.php(1796): Zend_Search_Lucene_Index_SegmentInfo->openCompoundFile('.tis', false)                     
#3 /var/www/SuiteCRM-7.12.0/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Index/SegmentMerger.php(233): Zend_Search_Lucene_Index_SegmentInfo->resetTermsStream(234, 2)                           
#4 /var/www/SuiteCRM-7.12.0/vendor/zf1/zend-search-lucene/library/Zend/S in /var/www/SuiteCRM-7.12.0/vendor/zf1/zend-search-lucene/library/Zend/Search/Lucene/Storage/File/Filesystem.php on line 67 


root@SuiteCRM:/var/www/suitecrm/modules/AOD_Index/Index/Index# ls -latr  | grep _5iqa
-rwxrwxr-x 1 www-data www-data      576 Jan 20 18:00 _5iqa.cfs
-rwxrwxr-x 1 www-data www-data      107 Jan 20 18:00 _5iqa.sti
root@SuiteCRM:/var/www/suitecrm/modules/AOD_Index/Index/Index# 

Further looking into the database there is only one record in the aod_index table:

INSERT INTO `aod_index` (`id`, `name`, `date_entered`, `date_modified`, `modified_user_id`, `created_by`, `description`, `deleted`, `assigned_user_id`, `last_optimised`, `location`) VALUES
('1', 'Index', '2021-11-12 21:57:02', '2023-01-21 00:00:01', '1', '1', NULL, 0, '', '2023-01-21 00:00:01', 'modules/AOD_Index/Index/Index');

Anyone have any ideas?

Tony

Well I am a bit confused.

In the Admin page I selected the Search Settings and changed from Basic to Basic + Advanced Search. Did a QR&R. Did a search and then went back to the Admin page and change the Search Settings back to Basic Search. Did another QR&R and tested the Search again. Nothing looked out of the ordinary.

So I ran my script again and its running without error.

I have no clue…

Is it possible that you are also running your cron jobs as root? That causes all sorts of trouble.

Your procedure should be:

  • get all ownerships and permissions correct
  • run all necessary items from Admin / Repairs
  • only then rebuild the index if it’s causing trouble