Bug #21243
closedBug #21137: Upgrade to Jetty 10
Bad webapp directory in jetty 10
Added by François ARMAND over 2 years ago. Updated over 2 years ago.
Description
Jetty looks into /opt/rudder/etc/rudder-jetty-base/webapps
for webapps and seems to ignore the configuration done in /opt/rudder/etc/rudder-jetty-base/start.ini
Files
clipboard-202206091514-h6ppv.png (22.5 KB) clipboard-202206091514-h6ppv.png | François ARMAND, 2022-06-09 15:14 | ||
clipboard-202206091515-lzcrc.png (15.1 KB) clipboard-202206091515-lzcrc.png | François ARMAND, 2022-06-09 15:15 |
Updated by François ARMAND over 2 years ago
Start command seems ok (ie config options from start.ini seems to be taken in to account): (linebreak added for readability)
root@server:/home/vagrant# ps aux |grep jett root 18228 0.8 3.6 2546312 73480 ? Sl 13:18 0:01 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.io.tmpdir=/tmp -Djetty.home=/opt/rudder/jetty -Djetty.base=/opt/rudder/etc/rudder-jetty-base --class-path /opt/rudder/etc/rudder-jetty-base/resources:/opt/rudder/jetty/lib/logging/slf4j-api-2.0.0-alpha6.jar:/opt/rudder/jetty/lib/logging/jetty-slf4j-impl-10.0.9.jar:/opt/rudder/jetty/lib/jetty-servlet-api-4.0.6.jar:/opt/rudder/jetty/lib/jetty-http-10.0.9.jar:/opt/rudder/jetty/lib/jetty-server-10.0.9.jar:/opt/rudder/jetty/lib/jetty-xml-10.0.9.jar:/opt/rudder/jetty/lib/jetty-util-10.0.9.jar:/opt/rudder/jetty/lib/jetty-io-10.0.9.jar:/opt/rudder/jetty/lib/jetty-security-10.0.9.jar:/opt/rudder/jetty/lib/jetty-servlet-10.0.9.jar:/opt/rudder/jetty/lib/jetty-webapp-10.0.9.jar:/opt/rudder/jetty/lib/jetty-deploy-10.0.9.jar:/opt/rudder/jetty/lib/setuid/jetty-setuid-java-1.0.4.jar org.eclipse.jetty.xml.XmlConfiguration java.version=11.0.15 java.version.major=11 java.version.micro=15 java.version.minor=0 java.version.platform=11 jetty.base=/opt/rudder/etc/rudder-jetty-base jetty.base.uri=file:///opt/rudder/etc/rudder-jetty-base jetty.deploy.monitoredPath=/opt/rudder/share/webapps jetty.deploy.scanInterval=0 jetty.home=/opt/rudder/jetty jetty.home.uri=file:///opt/rudder/jetty jetty.http.host=127.0.0.1 jetty.http.port=8080 jetty.httpConfig.requestHeaderSize=8192 jetty.httpConfig.sendDateHeader=false jetty.httpConfig.sendServerVersion=false jetty.setuid.groupName=root jetty.setuid.startServerAsPrivileged=true jetty.setuid.umask=0007 jetty.setuid.userName=root jetty.state=/opt/rudder/etc/rudder-jetty-base/rudder-jetty.state jetty.webapp.addServerClasses=org.eclipse.jetty.logging.,${jetty.home.uri}/lib/logging/,org.slf4j. OPTIONS=Server runtime.feature.alpn=true slf4j.version=2.0.0-alpha6 /opt/rudder/jetty/etc/jetty-bytebufferpool.xml /opt/rudder/etc/rudder-jetty-base/etc/console-capture.xml /opt/rudder/jetty/etc/jetty-threadpool.xml /opt/rudder/jetty/etc/jetty.xml /opt/rudder/jetty/etc/jetty-webapp.xml /opt/rudder/jetty/etc/jetty-deploy.xml /opt/rudder/jetty/etc/jetty-http.xml /opt/rudder/jetty/etc/jetty-setuid.xml /opt/rudder/jetty/etc/jetty-started.xml start-log-file=/var/log/rudder/webapp/java.log
Updated by François ARMAND over 2 years ago
More debug info:
root@server:/opt/rudder/etc/rudder-jetty-base# java -jar /opt/rudder/jetty/start.jar --list-config Enabled Modules: ---------------- 0) bytebufferpool transitive provider of bytebufferpool for server ini template available with --add-module=bytebufferpool 1) resources ${jetty.base}/start.ini 2) logging/slf4j transitive provider of logging/slf4j for logging-jetty dynamic dependency of logging-jetty 3) logging-jetty transitive provider of logging for threadpool transitive provider of logging for server transitive provider of logging for console-capture 4) console-capture ${jetty.base}/start.ini 5) threadpool transitive provider of threadpool for server ini template available with --add-module=threadpool 6) server ${jetty.base}/start.ini 7) security transitive provider of security for webapp 8) servlet transitive provider of servlet for webapp 9) webapp ${jetty.base}/start.ini 10) deploy ${jetty.base}/start.ini 11) http ${jetty.base}/start.ini 12) setuid ${jetty.base}/start.ini Java Environment: ----------------- java.home = /usr/lib/jvm/java-11-openjdk-amd64 java.vm.vendor = Debian java.vm.version = 11.0.15+10-post-Debian-1deb11u1 java.vm.name = OpenJDK 64-Bit Server VM java.vm.info = mixed mode, sharing java.runtime.name = OpenJDK Runtime Environment java.runtime.version = 11.0.15+10-post-Debian-1deb11u1 java.io.tmpdir = /tmp user.dir = /opt/rudder/etc/rudder-jetty-base user.language = en user.country = null Jetty Environment: ------------------ jetty.version = 10.0.9 jetty.tag.version = jetty-10.0.9 jetty.build = a9eaf8d5d73369acf610ce88f850c0d56c4b1113 jetty.home = /opt/rudder/jetty jetty.base = /opt/rudder/etc/rudder-jetty-base Config Search Order: -------------------- <command-line> ${jetty.base} -> /opt/rudder/etc/rudder-jetty-base ${jetty.home} -> /opt/rudder/jetty System Properties: ------------------ (no system properties specified) Properties: ----------- java.version = 11.0.15 java.version.major = 11 java.version.micro = 15 java.version.minor = 0 java.version.platform = 11 jetty.base = /opt/rudder/etc/rudder-jetty-base jetty.base.uri = file:///opt/rudder/etc/rudder-jetty-base jetty.deploy.monitoredPath = /opt/rudder/share/webapps jetty.deploy.scanInterval = 0 jetty.home = /opt/rudder/jetty jetty.home.uri = file:///opt/rudder/jetty jetty.http.host = 127.0.0.1 jetty.http.port = 8080 jetty.httpConfig.requestHeaderSize = 8192 jetty.httpConfig.sendDateHeader = false jetty.httpConfig.sendServerVersion = false jetty.setuid.groupName = root jetty.setuid.startServerAsPrivileged = true jetty.setuid.umask = 0007 jetty.setuid.userName = root jetty.webapp.addServerClasses = org.eclipse.jetty.logging.,${jetty.home.uri}/lib/logging/,org.slf4j. runtime.feature.alpn = true slf4j.version = 2.0.0-alpha6 Jetty Server Classpath: ----------------------- Version Information on 14 entries in the classpath. Note: order presented here is how they would appear on the classpath. changes to the --module=name command line options will be reflected here. 0: (dir) | ${jetty.base}/resources 1: 2.0.0-alpha6 | ${jetty.home}/lib/logging/slf4j-api-2.0.0-alpha6.jar 2: 10.0.9 | ${jetty.home}/lib/logging/jetty-slf4j-impl-10.0.9.jar 3: 4.0.6 | ${jetty.home}/lib/jetty-servlet-api-4.0.6.jar 4: 10.0.9 | ${jetty.home}/lib/jetty-http-10.0.9.jar 5: 10.0.9 | ${jetty.home}/lib/jetty-server-10.0.9.jar 6: 10.0.9 | ${jetty.home}/lib/jetty-xml-10.0.9.jar 7: 10.0.9 | ${jetty.home}/lib/jetty-util-10.0.9.jar 8: 10.0.9 | ${jetty.home}/lib/jetty-io-10.0.9.jar 9: 10.0.9 | ${jetty.home}/lib/jetty-security-10.0.9.jar 10: 10.0.9 | ${jetty.home}/lib/jetty-servlet-10.0.9.jar 11: 10.0.9 | ${jetty.home}/lib/jetty-webapp-10.0.9.jar 12: 10.0.9 | ${jetty.home}/lib/jetty-deploy-10.0.9.jar 13: 1.0.4 | ${jetty.home}/lib/setuid/jetty-setuid-java-1.0.4.jar Jetty Active XMLs: ------------------ ${jetty.home}/etc/jetty-bytebufferpool.xml ${jetty.base}/etc/console-capture.xml ${jetty.home}/etc/jetty-threadpool.xml ${jetty.home}/etc/jetty.xml ${jetty.home}/etc/jetty-webapp.xml ${jetty.home}/etc/jetty-deploy.xml ${jetty.home}/etc/jetty-http.xml ${jetty.home}/etc/jetty-setuid.xml
Updated by François ARMAND over 2 years ago
OK, property name changed from jetty.deploy.monitoredPath
to jetty.deploy.monitoredDir
Updated by François ARMAND over 2 years ago
Now I get:
[2022-06-09T13:51:02.519Z] ERROR FATAL An error happen during Rudder boot. Rudder will stop now. Error: SystemError: Error during initialization of Rudder; cause was: java.lang.ExceptionInInitializerError: null -> java.lang.ExceptionInInitializerError at bootstrap.liftweb.LiftInitContextListener.contextInitialized(LiftInitContextListener.scala:128) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:705) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:40) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:183) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:516) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186) at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:462) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58) at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282) at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709) at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605) at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) at org.eclipse.jetty.server.Server.start(Server.java:469) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) at org.eclipse.jetty.server.Server.doStart(Server.java:414) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810) Caused by: com.typesafe.config.ConfigException$Missing: merge of system properties,String: 1: No configuration setting found for key 'ldap' at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:157) at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:150) at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:177) at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189) at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:194) at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:251) at bootstrap.liftweb.RudderConfig$.<clinit>(RudderConfig.scala:308) ... 40 more
Updated by François ARMAND over 2 years ago
OK, first comment was erroneous. It misses all JAVA options that we set in /opt/rudder/share/webapps/rudder-jetty.conf
Updated by François ARMAND over 2 years ago
Java options is not correctly pass to jetty start command.
Updated by François ARMAND over 2 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND over 2 years ago
The last problem is a bug in jetty: https://github.com/eclipse/jetty.project/issues/8152
Updated by François ARMAND over 2 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder-packages/pull/2615
Updated by François ARMAND over 2 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-packages|35558fe51a0a23d79e232e73069851b20b452a72.
Updated by Alexis Mousset over 2 years ago
- Fix check changed from To do to Checked
Updated by Vincent MEMBRÉ over 2 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.2.0~beta1 which was released today.