Symptoms
Searching in Roundcube by subject or sender returns only some of the matching messages. On a server running cPanel Dovecot Solr 9.11.0. The Solr log shows Error loading class 'solr.search.LRUCache', and the problem returns after an update even though the earlier workaround was applied.
The Solr log shows an error like this one:
less /home/cpanelsolr/server/logs/solr.log
... ERROR ... o.a.s.s.CacheConfig Error instantiating cache => org.apache.solr.common.SolrException: Error loading class 'solr.search.LRUCache'Rebuilding the index brings search back for a while, and the problem returns after a package update.
Cause
The cpanel-dovecot-solr-server 9.11.0-1.2.1 package ships /home/cpanelsolr/server/solr/dovecot/conf/solrconfig.xml with class="solr.search.LRUCache". Solr 9 removed the legacy LRUCache, FastLRUCache and LFUCache classes. The file belongs to the package and isn't preserved as a config file, so any update or reinstall of the Solr package restores the legacy class and undoes manual edits.
We've opened an internal case for our development team to review this further. The case ID is CPANEL-59003.
Workaround
Check whether the legacy class is present:
grep -n 'class="solr.search.LRUCache"' /home/cpanelsolr/server/solr/dovecot/conf/solrconfig.xmlReplace it with the Caffeine cache and keep a backup:
sed -i.solrconfig_8.xml -e 's/solr.*LRUCache/solr.CaffeineCache/g' /home/cpanelsolr/server/solr/dovecot/conf/solrconfig.xmlRebuild the index:
/usr/local/cpanel/3rdparty/scripts/cpanel_dovecot_solr_rebuild_indexCheck that no new errors appear:
grep 'solr.search.LRUCache' /home/cpanelsolr/server/logs/solr.log
Repeat these steps after any update to the cpanel-dovecot-solr packages until the fix is released. The update logs in /var/cpanel/updatelogs/ show when the package last changed.
Comments
0 comments
Please sign in to leave a comment.