tracker issue : CF-4198725

select a category, or use search below
(searches all categories and all time range)
Title:

Solr collections disappear when restarting 'ColdFusion 2016 Add-on Services' service

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/MustFix

Reporter/Name(from Bugbase): Michael Clark / Michael Clark ()

Created: 05/18/2017

Components: Text Search, Solr

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016,0,04,302561 / 2018.0.0.303787

Priority/Frequency: Normal / All users will encounter

Locale/System: / Win 2008 Server R2 64 bit

Vote Count: 1

Problem Description:

When the Solr home path is changed to anywhere other than the default value (C:\ColdFusion2016\cfusion\jetty\multicore), Solr collections listed in the CF Administrator 'ColdFusion Collections' page disappear when the 'ColdFusion 2016 Add-on Services' service is restarted. The actual collection files are still there, but no record of their existence shows in the CF Administrator.

At this point, if the collection is queried, an error is thrown, stating that the collection does not exist.

But if an attempt to recreate the collection is made, another error is thrown (org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException), presumably because a record of the collection does actually exist somewhere. Then, after this error occurs, the collection does now reappear in the CF Administrator, and is searchable. This happens in both the CF Administrator and programmatically with the <cfcollection> tag.

This also happens when the server is rebooted (because the Add-On service is restarted).

Steps to Reproduce:

1. Change the Solr home path in the CF Administrator 'Solr Server' page
1. In the CF Administrator 'ColdFusion Collections' page, create a new collection
2. Restart the 'ColdFusion 2016 Add-on Services' service
3. Refresh the 'ColdFusion Collections' page
4. Run a search against the collection with the <cfsearch> tag
5. Try to create the same collection again

Actual Result:

1. The new collection (and any others) has disappeared
2. The search throws the following error:

    Exception Type: coldfusion.tagext.search.CollectionDoesNotExistException: The collection Test does not exist.
    Exception Detail: The collection you specified does not exists or is not registered with the ColdFusion Search Service.

3. Trying to create the collection again throws the following error:

    Unable to create Solr collection Test.
    An error occurred while creating the collection: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException. 
    Check the Solr logs for more detail.

4. In spite of the error in 3, the collection reappears in the 'ColdFusion Collections' page (original collection, not a new one).

Expected Result:

Collections survive restarting the 'ColdFusion 2016 Add-on Services' service when the Solr home path is something other than the default value.

Any Workarounds:

As described above.

Attachments:

Comments:

Michael, I am unable to observe the issue with CF2016.0.04.302561/Win7. I'm able to re-index or search a collection after restarting the Add-On services or even after changing the Solr server to a Solr server(CF2016-based) located in a non-default location, and then reverting back to the default Solr server in the CF admin. What is the update level of your CF server? Are you pointing to the right Solr server in the admin, when searching or indexing a collection. A collection created with a Solr server can only be used when CF admin is configured with that server.
Comment by Piyush K.
717 | May 23, 2017 06:30:49 AM GMT
The update level is 2016,0,04,302561, on Win 2008 Server R2 64 bit. The Solr Home variable in the CF Admin page appears to just point to the location of the collections, not the actual executable files of a Solr installation. So, I copied the contents of C:\ColdFusion2016\cfusion\jetty\multicore to E:\solr\cfusion (any location off the C: drive), and when collections are created, they appear in E:\solr\cfusion\collections, as expected. But after restarting the Add-On service, no collections are seen (either in the CF admin page or in the Solr Admin page at http://localhost:8989/solr/#/). After digging deeper, I've found the problem. In C:\ColdFusion2016\cfusion\jetty\jetty.lax, the solr.home parameter passed to the JVM on startup is still pointing to the default 'multicore' directory. If I change it to: lax.nl.java.option.additional=-server -Xms2048m -Xmx2048m -XX:+AggressiveOpts -XX:+ScavengeBeforeFullGC -XX:-UseParallelGC -DSTOP.PORT=8077 -DSTOP.KEY=cfstop -Dsolr.solr.home=E:\solr\cfusion everything works fine. Therefore, I believe the bug is that this JVM parameter in jetty.lax doesn't get changed when 'Solr Home' is changed in the ColdFusion Administrator.
Comment by Michael C.
718 | May 24, 2017 05:12:49 PM GMT
I swear this bug is not yet fixed. I'm running into very similar issues with ColdFusion 2018.
Comment by Wil G.
33369 | April 09, 2020 08:15:33 PM GMT
I swear this bug is not yet fixed. I'm running into very similar issues with ColdFusion 2018.
Vote by Wil G.
33372 | April 09, 2020 08:15:39 PM GMT
This bug is still happening in ColdFusion 2018 update 7. I’ve hit this on six different ColdFusion 2018u7 servers in the past month. I have also verified this bug still exists in ColdFusion 2018 update 8
Comment by Wil G.
33370 | April 09, 2020 09:48:33 PM GMT
Hi Wil, I think the best thing for you to do is open another bug report. Once issues are closed, the support staff tend not to look at new comments, in my experience.
Comment by Michael C.
33371 | April 09, 2020 10:36:32 PM GMT