[fix] jetty configuration changes don't stick, and eventually crash eXist-db #4899
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Updated jetty-http.xml and jetty-ssl.xml were being written by the configurator with a bad DTD, which on subsequent read by the configurator caused an exception, so that the NEXT versions of jetty-http.xml and jetty-ssl.xml were made empty. This then caused a startup crash.
Also, configurator was reading the wrong field(s) for the http configuration, so
Reference:
Closes #4729
Type of tests:
Unfortunately it is not simple to automate this testing. We have built a test distribution with the changes, installed it (
java -jar ./exist-installer/target/exist-installer-7.0.0-SNAPSHOT.jar
) and confirmed through the use of ./bin/launcher.sh in the new installation that modifications of the jetty configuration are stored, restored and used on startup as the jetty ports. A distribution built without the change allowed us to reproduce the failed configuration changes, crashes and empty files produced in the initial problem report.