ColdFusion SOLR Collections Stop Working

Author: Steven Neiland
Published:

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

So a SOLR search tool I designed recently decided to stop working for no apparent reason with the follow error description.

An error occurred while performing an operation in the Search Engine library. Error getting collection information.: org.apache.solr.common.SolrException: no_segments_file_found_in_orgapachelucenestore

Yeah that helps a bunch.

Any attempts to rebuild the collection failed so I went digging. After a few google searches I discovered that there is a web console for SOLR you can access to help with debugging.

SOLR Admin

The first step in debugging this is to login to the SOLR administrator web console from a web browser on the servers remote desktop. On a default install this can be accessed at: http://127.0.0.1:8983/solr/

Navigating to this url will display a list of search collections. Click through to each one and you will be presented with this screen.

Click through to "Config" presented me with this error:

 

HTTP ERROR: 400

Can not find: solrconfig.xml [D:\Domains\{collection file path}\conf\solrconfig.xml]
RequestURI=/solr/{collection name}/admin/file/

It seems that somehow the "solrconfig.xml" file had been deleted. This appears to be a known issue with SOLR itself. The most common (but not only) cause is someone deleting the solr collection files without first removing the collection from the system.

In addition as a bonus, breaking one solr collection actually breaks them all.

Fixing Missing solrconfig.xml File

The are two ways of fixing this error. The best solution of course is to restore the missing file from backup.

However if like in this case you don't have access to a backup of the file your other option is to delete the reference to the collection from the main "solr.cml" file. This file location can be seen in the SOLR admin console at the CWD location. For reference depending on your version of ColdFusion the file can be found here:

ColdFusion Standard

C:\ColdFusion9\solr\multicore\solr.xml

ColdFusion Enterprise

C:\JRun4\servers\[server instance]\cfusion-ear\cfusion-war\WEB-INF\cfusion\solr\multicore\solr.xml

Open this file and delete the reference for the collection in question. Save the changes, delete the actual collection files from the system and then restart the SOLR service.

You should now be able to recreate the collection.

Reader Comments

Robert Pender's Gravatar
Robert Pender
Wednesday, April 27, 2016 at 10:21:56 AM Coordinated Universal Time

Saved me here with this buddy - Kudos

Marc's Gravatar
Marc
Thursday, December 1, 2016 at 5:54:39 PM Coordinated Universal Time

I'm having a strange issue with CF11 enterprise where the collections just disappear from the Admin (and searches using solr fail). If I restart the Coldfusion Add-On Service in Windows Services, they reappear and everything is good for a day or two until it happens again.

Steven Neiland's Gravatar
Steven Neiland
Thursday, December 1, 2016 at 9:02:25 PM Coordinated Universal Time

@Marc,
I've switched to Lucee with a few years now. I suggest you ask on the coldfusion channel on slack. http://cfml.slack.com

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain advertisments or appear to be created for the purpose of link building, will not be published.

Archives Blog Listing