Lucee 5, if restarted from the server admin, is totally wiping out all my server-level settings.

Description

Lucee 5, if restarted from the server admin, is totally wiping out all my server-level settings.

I had restarted it via windows control panel several times without issue. The moment I tried it from the server admin, password was reset (prompted to enter as if new install), and all settings are gone.

Environment

Windows Server 2012

Activity

Show:
Michael Offner
July 15, 2016, 7:25 AM

the source of the issue could be this exception:

what is caused because this method call ( felix.getBundleContext() ):
https://github.com/lucee/Lucee/blob/5.0.0.252/loader/src/main/java/lucee/loader/osgi/BundleLoader.java#L110
returns null

Seems that on Linux/macOS it returns a context, but returns null on windows.
What is not clear to me atm why it does delete part of the context.

Michael Offner
July 15, 2016, 7:46 AM
Edited

i think i know the issue that "getBundleContext" return null, we have this code before:

Problem is that the method "stop" is executed asynchronous ("This method asynchronously shuts down the framework, it must be called at the end of a session in order to shutdown all active bundles."). So i assume we start a new felix, while the old is still shutting down.
Maybe the shutting down of one instance harms the new instance that just get started. In any case we have to wait until the old one is down.
The reason that this only happens in windows could be that threads are handled differently in windows.

Harry Klein
July 15, 2016, 10:47 AM

I also lost my server settings twice in the last days. But I never restart the server from the Lucee admin.
I guess it happened after changing the lucee.jar version. Unfortunately I can not remember from which version to which version.
Maybe it happend as I tried to revert from 5.1 to 5.0.

Michael Offner
July 15, 2016, 11:11 AM

Problem was the async stop as I assumed.
Problem is that code is inside the loader (lucee.jar), so you need to update the jar itself manually by uploading from here and replacing the existing lucee.jar here "/lib/ext/"

Michael Offner
July 15, 2016, 11:12 AM
Fixed

Assignee

Michael Offner

Reporter

Michael Vornkahl

Priority

Blocker

Labels

None

Fix versions

Affects versions

Configure