Collection disappear after restart of lucee

Description

The list of collections were disappearing in web admin while restart of lucee. Even I'm created those collections via web admin or cfcollection tag, both are disappearing after restart of lucee.

https://dev.lucee.org/t/collection-disappear-after-restart-of-lucee/4666

Environment

None

Activity

Show:

Ivan McAvinchey 28 February 2019 at 02:56

Thank you for this Pothys.

I tested 5.3.2.47-SNAPSHOT and it is resolved in this. It won't clean up a broken search from the buggy version but if you manually go in and delete the search.xml (in our case /opt/lucee/tomcat/lucee-web/[sitehash]/search/search.xml) and collection and then start again from scratch subsequent server restarts do not break the search.

So this is fine and working- the necessary steps after the update are just the same as we do manually to deal with the bug:

  • delete the /search/search.xml

  • delete the collection (this may not be necessary)

  • restart Lucee

  • recreate the collection

  • reindex the collection

From then on the collections survive server restarts.

Pothys - MitrahSoft 20 November 2018 at 05:56

Issue fixed in latest 5.3.2.16 snapshot version

Pothys - MitrahSoft 19 November 2018 at 16:37

Hi ,

I've analyzed your comment & I saw the following issue in my local.

Steps to reproduce:

Step1: Create collection & search the keyword, it's working fine,

Step2: Run lucee again & run the search page agian, it throws error like "E:\portables\lucee-express-5.2.8.50_new\webapps\ROOT\WEB-INF\lucee\search\search.xml, file already exists;lucee.runtime.exp.NativeException: can't create file E:\portables\lucee-express-5.2.8.50_new\webapps\ROOT\WEB-INF\lucee\search\search.xml, file already exists"

Step3: Refresh once again it erro disappear,

Step4: Create collection, collection created & it will throw "java.lang.NullPointerException" error, but no error logged in exception.log,

Step5: Try to search the same keyword, it doesn't work's fine.

Step6: Search.xml is in 0kb, delete the search.xml also no luck.

Step7 : Delete the entire WEB-INF folder, search work's fine

Ivan McAvinchey 6 November 2018 at 16:57
Edited

I am seeing similar behaviour that I think is related. I had though it was for us during search index rebuilds. Not always, but sometimes, something happens and the collections seem to get detached and disappear from the admin. The collection files are still there if I look on the server.

EDIT: thinking about it, I think it is the restart. We have a scheduled restart and then the error occurs shortly after that with the first search attempt.

There are java.lang.NullPointerExceptions in the Lucee Admin search page after this happens.

When this happens, and I try to then recreate the collections (after deleting the collection files manually), I get

can't create file [...] /trunk/WEB-INF/lucee/search/search.xml, file already exists

I need to go in and delete that as well. After I delete that (actually I deleted the whole WEB-INF and restart Lucee) I can recreate the collections and re-index them.

I am on Lucee 5.2.8.50 (Java 1.8.0_144 (Oracle Corporation) 64bit) on Ubuntu.

This is something similar that we have seen before, so it may not be new, but I have been stuck with this in particular recently. Our search reindex rebuild was disabled, so not triggering the problem I think, when I re-enabled it, it seems to work OK for a few days but then one of the rebuilds seems to cause this behaviour.

The reindexing seems to occur OK without error at 1:05 AM, and then the first error I see in the log is on the front-end site search at 4:42 AM, so this error seems to be the first time someone searches:

can't create file [...] /trunk/WEB-INF/lucee/search/search.xml, file already exists

We have a scheduled server restart at 4:00 AM, so I think this is the first search after the restart, and it is the restart that is doing it.

Then all subsequent searches the error is collection [CollectionName] is undefined until I manually go in, delete the collections, delete WEB-INF and recreate everything.

When in this state, any attempt to recreate the collections will give this can't create file [...] /trunk/WEB-INF/lucee/search/search.xml, file already exists error.

I don't see this problem on my development machine on Windows 10, same Lucee, Tomcat and Java versions. Only on our production Linux box.

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 9 October 2018 at 05:44
Updated 1 March 2021 at 08:31
Resolved 26 November 2018 at 15:46

Flag notifications