From 551ad8bba0bf90fbc2b6e83af5b3d318f35b9910 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 28 Sep 2023 10:24:33 -0500 Subject: [PATCH 01/10] Issue #10473 - Better warnings in `jetty.sh` on filesystem permission issues (#10605) * Issue #10473 - Better warnings in jetty.sh on filesystem permission issues Signed-off-by: Joakim Erdfelt --- jetty-home/src/main/resources/bin/jetty.sh | 101 +++++++++++++++------ 1 file changed, 71 insertions(+), 30 deletions(-) diff --git a/jetty-home/src/main/resources/bin/jetty.sh b/jetty-home/src/main/resources/bin/jetty.sh index 8ade85f247a..bca4af8ea1b 100755 --- a/jetty-home/src/main/resources/bin/jetty.sh +++ b/jetty-home/src/main/resources/bin/jetty.sh @@ -137,6 +137,13 @@ started() local STATEFILE=$1 local PIDFILE=$2 local STARTTIMEOUT=$3 + + if (( DEBUG )) ; then + echo "Looking for $STATEFILE" + echo -n "State Parent Directory: " + ls -lad $(dirname $STATEFILE) + fi + # wait till timeout to see "STARTED" in state file, needs --module=state as argument for ((T = 0; T < $STARTTIMEOUT; T++)) do @@ -162,6 +169,11 @@ started() done (( DEBUG )) && echo "Timeout $STARTTIMEOUT expired waiting for start state from $STATEFILE" echo " timeout" + if running "$PIDFILE" ; then + echo "INFO: Server process is running" + else + echo "** ERROR: Server process is NOT running" + fi return 1; } @@ -173,7 +185,7 @@ pidKill() if [ -r $PIDFILE ] ; then local PID=$(tail -1 "$PIDFILE") if [ -z "$PID" ] ; then - echo "ERROR: no pid found in $PIDFILE" + echo "** ERROR: no pid found in $PIDFILE" return 1 fi @@ -204,7 +216,6 @@ pidKill() fi } - readConfig() { (( DEBUG )) && echo "Reading $1.." @@ -213,26 +224,25 @@ readConfig() dumpEnv() { - echo "JAVA = $JAVA" - echo "JAVA_OPTIONS = ${JAVA_OPTIONS[*]}" - echo "JETTY_HOME = $JETTY_HOME" - echo "JETTY_BASE = $JETTY_BASE" - echo "START_D = $START_D" - echo "START_INI = $START_INI" - echo "JETTY_START = $JETTY_START" - echo "JETTY_CONF = $JETTY_CONF" - echo "JETTY_ARGS = ${JETTY_ARGS[*]}" - echo "JETTY_RUN = $JETTY_RUN" - echo "JETTY_PID = $JETTY_PID" - echo "JETTY_START_LOG = $JETTY_START_LOG" - echo "JETTY_STATE = $JETTY_STATE" - echo "JETTY_START_TIMEOUT = $JETTY_START_TIMEOUT" - echo "JETTY_SYS_PROPS = $JETTY_SYS_PROPS" - echo "RUN_ARGS = ${RUN_ARGS[*]}" + echo "JAVA = $JAVA" + echo "JAVA_OPTIONS = ${JAVA_OPTIONS[*]}" + echo "JETTY_HOME = $JETTY_HOME" + echo "JETTY_BASE = $JETTY_BASE" + echo "START_D = $START_D" + echo "START_INI = $START_INI" + echo "JETTY_START = $JETTY_START" + echo "JETTY_CONF = $JETTY_CONF" + echo "JETTY_ARGS = ${JETTY_ARGS[*]}" + echo "JETTY_RUN = $JETTY_RUN" + echo "JETTY_PID = $JETTY_PID" + echo "JETTY_START_LOG = $JETTY_START_LOG" + echo "JETTY_STATE = $JETTY_STATE" + echo "JETTY_START_TIMEOUT = $JETTY_START_TIMEOUT" + echo "JETTY_SYS_PROPS = $JETTY_SYS_PROPS" + echo "RUN_ARGS = ${RUN_ARGS[*]}" } - ################################################## # Get the action & configs ################################################## @@ -358,7 +368,15 @@ fi if [ -z "$JETTY_RUN" ] then JETTY_RUN=$(findDirectory -w /var/run /usr/var/run $JETTY_BASE /tmp)/jetty - [ -d "$JETTY_RUN" ] || mkdir $JETTY_RUN +fi + +if [ ! -d "$JETTY_RUN" ] ; then + if ! mkdir $JETTY_RUN + then + echo "** ERROR: Unable to create directory: $JETTY_RUN" + echo " Correct issues preventing the creation of \$JETTY_RUN and try again." + exit 1 + fi fi ##################################################### @@ -495,6 +513,11 @@ RUN_ARGS=($JETTY_SYS_PROPS ${JETTY_DRY_RUN[@]}) if (( DEBUG )) then + if expr "${RUN_ARGS[*]}" : '.*/etc/console-capture.xml.*' > /dev/null + then + echo "WARNING: Disable console-capture module for best DEBUG results" + fi + echo "IDs are $(id)" dumpEnv fi @@ -503,13 +526,27 @@ fi ################################################## case "$ACTION" in start) - echo -n "Starting Jetty: " - if (( NO_START )); then echo "Not starting ${NAME} - NO_START=1"; exit fi + if ! touch "$JETTY_PID" + then + echo "** ERROR: Unable to touch file: $JETTY_PID" + echo " Correct issues preventing use of \$JETTY_PID and try again." + exit 1 + fi + + if ! touch "$JETTY_STATE" + then + echo "** ERROR: Unable to touch file: $JETTY_STATE" + echo " Correct issues preventing use of \$JETTY_STATE and try again." + exit 1 + fi + + echo -n "Starting Jetty: " + # Startup from a service file if [ $UID -eq 0 ] && type start-stop-daemon > /dev/null 2>&1 then @@ -519,15 +556,16 @@ case "$ACTION" in CH_USER="--chuid $JETTY_USER" fi - echo ${RUN_ARGS[@]} start-log-file="$JETTY_START_LOG" | xargs start-stop-daemon \ + echo ${RUN_ARGS[@]} --start-log-file="$JETTY_START_LOG" | xargs start-stop-daemon \ --start $CH_USER \ --pidfile "$JETTY_PID" \ --chdir "$JETTY_BASE" \ --background \ + --output "${JETTY_RUN}/start-stop.log" --make-pidfile \ --startas "$JAVA" \ -- - + (( DEBUG )) && echo "Starting: start-stop-daemon" else if running $JETTY_PID @@ -545,16 +583,19 @@ case "$ACTION" in SU_SHELL="-s $JETTY_SHELL" fi - touch "$JETTY_PID" chown "$JETTY_USER" "$JETTY_PID" su - "$JETTY_USER" $SU_SHELL -c " cd \"$JETTY_BASE\" - echo ${RUN_ARGS[*]} start-log-file=\"$JETTY_START_LOG\" | xargs ${JAVA} > /dev/null & - disown \$!" + echo ${RUN_ARGS[*]} --start-log-file=\"$JETTY_START_LOG\" | xargs ${JAVA} > /dev/null & + PID=\$! + disown \$PID" + (( DEBUG )) && echo "Starting: su shell (w/user $JETTY_USER) on PID $PID" else # Startup if not switching users - echo ${RUN_ARGS[*]} | xargs ${JAVA} > /dev/null & - disown $! + echo ${RUN_ARGS[*]} --start-log-file="${JETTY_START_LOG}" | xargs ${JAVA} > /dev/null & + PID=$! + disown $PID + (( DEBUG )) && echo "Starting: java command on PID $PID" fi fi @@ -592,7 +633,7 @@ case "$ACTION" in else # Stop from a non-service path if [ ! -r "$JETTY_PID" ] ; then - echo "ERROR: no pid found at $JETTY_PID" + echo "** ERROR: no pid found at $JETTY_PID" exit 1 fi From 1e1bc5adff9173c691d13fd7615f5e7d52866f38 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 28 Sep 2023 16:19:36 -0500 Subject: [PATCH 02/10] Issue #10606 - Bump build to JDK 21 (#10607) * Issue #10606 - Bump build to JDK 21 * Fix tests that fail on JDK 21 * better use of `@EnabledForJreRange` * Disable JAASLdapLoginServiceTest on JDK 20+ via maven profile Signed-off-by: Joakim Erdfelt Signed-off-by: Olivier Lamy Signed-off-by: Simone Bordet Co-authored-by: Olivier Lamy Co-authored-by: Simone Bordet --- Jenkinsfile | 6 ++--- jetty-jaas/pom.xml | 22 +++++++++++++++++++ .../jetty/jaas/JAASLdapLoginServiceTest.java | 3 +++ .../tests/distribution/DistributionTests.java | 2 +- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index da11262957e..3672a3005ca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,13 +11,13 @@ pipeline { stages { stage("Parallel Stage") { parallel { - stage("Build / Test - JDK19") { + stage("Build / Test - JDK21") { agent { node { label 'linux' } } steps { timeout( time: 180, unit: 'MINUTES' ) { checkout scm - mavenBuild( "jdk19", "clean install -Dspotbugs.skip=true -Djacoco.skip=true", "maven3") - recordIssues id: "jdk19", name: "Static Analysis jdk19", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle()] + mavenBuild( "jdk21", "clean install -Dspotbugs.skip=true -Djacoco.skip=true", "maven3") + recordIssues id: "jdk21", name: "Static Analysis jdk21", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle()] } } } diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index 1e078ad43b6..5576064b61e 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -166,6 +166,28 @@ + + jdk20 + + [20,) + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + **/JAASLdapLoginServiceTest* + + + + + + + diff --git a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java index 3922826aa47..36f5b9ebec7 100644 --- a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java +++ b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java @@ -31,6 +31,8 @@ import org.eclipse.jetty.security.DefaultIdentityService; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.UserIdentity; import org.junit.Test; +import org.junit.jupiter.api.condition.EnabledForJreRange; +import org.junit.jupiter.api.condition.JRE; import org.junit.runner.RunWith; import static org.junit.Assert.assertFalse; @@ -41,6 +43,7 @@ import static org.junit.Assert.assertTrue; /** * JAASLdapLoginServiceTest */ +@EnabledForJreRange(max = JRE.JAVA_17, disabledReason = "sun.security.x509.X509CertInfo.set not present in Java 21, needs a Java 21 compatible version of Apache Directory Server") @RunWith(FrameworkRunner.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP")}) @CreateDS(allowAnonAccess = false, partitions = { diff --git a/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java b/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java index 169fbce48e9..41b751027e0 100644 --- a/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java +++ b/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DistributionTests.java @@ -1436,7 +1436,7 @@ public class DistributionTests extends AbstractJettyHomeTest } @Test - @DisabledForJreRange(max = JRE.JAVA_18) + @EnabledForJreRange(min = JRE.JAVA_19, max = JRE.JAVA_20) public void testVirtualThreadPoolPreview() throws Exception { String jettyVersion = System.getProperty("jettyVersion"); From 270d56ccb1ff875d6c1aa627a50859f2ffbfc02f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:31:00 +0000 Subject: [PATCH 03/10] Bump org.apache.mina:mina-core from 2.2.2 to 2.2.3 Bumps [org.apache.mina:mina-core](https://github.com/apache/mina) from 2.2.2 to 2.2.3. - [Commits](https://github.com/apache/mina/compare/2.2.2...2.2.3) --- updated-dependencies: - dependency-name: org.apache.mina:mina-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1697ddb0de..54c87879568 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 4.4.16 2.2.11 2.5.6 - 2.2.2 + 2.2.3 9.5 4.2.0 6.3.1 From c713d3d404ba09c81e53561a9349e570d58ae65d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:31:24 +0000 Subject: [PATCH 04/10] Bump org.asciidoctor:asciidoctorj-diagram from 2.2.11 to 2.2.13 Bumps [org.asciidoctor:asciidoctorj-diagram](https://github.com/asciidoctor/asciidoctorj-diagram) from 2.2.11 to 2.2.13. - [Release notes](https://github.com/asciidoctor/asciidoctorj-diagram/releases) - [Commits](https://github.com/asciidoctor/asciidoctorj-diagram/compare/v2.2.11...v2.2.13) --- updated-dependencies: - dependency-name: org.asciidoctor:asciidoctorj-diagram dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1697ddb0de..72dbe2d00d9 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 1.11.2 4.5.14 4.4.16 - 2.2.11 + 2.2.13 2.5.6 2.2.2 9.5 From ea11d211bc027c250b70b9405d9e3ff360f34dfb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:31:34 +0000 Subject: [PATCH 05/10] Bump commons-io:commons-io from 2.13.0 to 2.14.0 Bumps commons-io:commons-io from 2.13.0 to 2.14.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1697ddb0de..acc3e6e0516 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ 10.3.4 1.16.0 1.24.0 - 2.13.0 + 2.14.0 3.13.0 2.5.2 3.4.2 From 8a5bbe5c761d306e94d9b004f8b0ed09a8668fa5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:32:32 +0000 Subject: [PATCH 06/10] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1697ddb0de..9886c2cd23b 100644 --- a/pom.xml +++ b/pom.xml @@ -151,7 +151,7 @@ 3.6.0 4.0.6 3.3.0 - 3.5.0 + 3.6.0 3.9.0 3.9.0 3.0.1 From 683772297dae00030d3ef48599a2099fa3ea7132 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:33:05 +0000 Subject: [PATCH 07/10] Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.0 to 3.5.1 Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.0 to 3.5.1. - [Release notes](https://github.com/apache/maven-shade-plugin/releases) - [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.0...maven-shade-plugin-3.5.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-shade-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1697ddb0de..7f9bfe6ef82 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ 3.0.1 3.1.0 3.3.1 - 3.5.0 + 3.5.1 3.1.2 3.3.0 3.4.0 From d6588a0eac068549452ea0ac874f723cce9cf7d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:35:33 +0000 Subject: [PATCH 08/10] Bump org.eclipse.platform:org.eclipse.osgi from 3.18.400 to 3.18.500 Bumps [org.eclipse.platform:org.eclipse.osgi](https://github.com/eclipse-equinox/equinox) from 3.18.400 to 3.18.500. - [Commits](https://github.com/eclipse-equinox/equinox/commits) --- updated-dependencies: - dependency-name: org.eclipse.platform:org.eclipse.osgi dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- jetty-osgi/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 0581a3c1da6..4c4be23ec2b 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -12,7 +12,7 @@ pom - 3.18.400 + 3.18.500 3.11.100 1.6.1 1.5.0 From 4f035b76a9ab7e62cade80b46ad1c15ad422ddc0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:37:43 +0000 Subject: [PATCH 09/10] Bump org.jboss.threads:jboss-threads from 3.5.0.Final to 3.5.1.Final Bumps [org.jboss.threads:jboss-threads](https://github.com/jbossas/jboss-threads) from 3.5.0.Final to 3.5.1.Final. - [Commits](https://github.com/jbossas/jboss-threads/compare/3.5.0.Final...3.5.1.Final) --- updated-dependencies: - dependency-name: org.jboss.threads:jboss-threads dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1697ddb0de..6283d80d5e4 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ 2.2.1.Final 3.5.3.Final 3.0.2.Final - 3.5.0.Final + 3.5.1.Final 1.1 1.0.7 0.18.0 From 57666ee95e3a33841985343fb1fd5cd3b3104ff6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:38:39 +0000 Subject: [PATCH 10/10] Bump org.eclipse.tycho:tycho-p2-repository-plugin from 4.0.2 to 4.0.3 Bumps [org.eclipse.tycho:tycho-p2-repository-plugin](https://github.com/eclipse-tycho/tycho) from 4.0.2 to 4.0.3. - [Release notes](https://github.com/eclipse-tycho/tycho/releases) - [Changelog](https://github.com/eclipse-tycho/tycho/blob/tycho-4.0.3/RELEASE_NOTES.md) - [Commits](https://github.com/eclipse-tycho/tycho/compare/tycho-4.0.2...tycho-4.0.3) --- updated-dependencies: - dependency-name: org.eclipse.tycho:tycho-p2-repository-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- jetty-p2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-p2/pom.xml b/jetty-p2/pom.xml index 96bf750d7e2..bcb39f330a6 100644 --- a/jetty-p2/pom.xml +++ b/jetty-p2/pom.xml @@ -12,7 +12,7 @@ Generates a (maven based) P2 Updatesite pom - 4.0.2 + 4.0.3