-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Powered by SuggestiMate
when installing jenkins-2.332.3-1.1.noarch on amazon linux 2 the war is placed in an incorrect location:
[ec2-user@xxxxxx war]$ ls
bootstrap executable images LogFileOutputStream$1.class MainDialog.class robots.txt winstone.jar
ColorFormatter.class favicon.ico JNLPMain.class LogFileOutputStream.class Main$FileAndDescription.class scripts
css help jsbundles Main.class META-INF WEB-INF
[ec2-user@xxxxxx war]$ pwd /var/lib/jenkins/%C/jenkins/war
This is a fresh install on the latest version of amazon linux 2. This worked prior to the systemd change.
[JENKINS-68600] jenkins war location incorrect in jenkins-2.332.3-1.1.noarch.rpm on amazon linux
This ticket is filed in the incorrect component. It is not a core issue. It should be filed against the packaging component, which has now been archived because new packaging issues are (apparently) expected to be filed in GitHub issues under https://github.com/jenkinsci/packaging. I plan to close this ticket in about a week, as it is not filed in the appropriate place.
The packaging component was unarchived, so I moved this issue to the newly-unarchived component.
nfplatzke We do automated testing on Amazon Linux 2: https://github.com/jenkinsci/packaging/blob/ee3ab917bdf68c4396ccfc09b39337e604ca6959/molecule/default/molecule.yml#L41-L43=
That automated testing is passing. This makes me suspect the problem is on your end, not ours.
- Please provide the name, version, and architecture of the Linux distribution you are using (e.g., Ubuntu 20.04.4 LTS x86_64).
- Please provide the contents of the old System V init(8) configuration in /etc/sysconfig/jenkins, sanitized as necessary.
- Please provide the contents of the systemd(1) drop-in unit in /etc/systemd/system/jenkins.service.d/override.conf, sanitized as necessary.
- Please provide steps to reproduce the issue from scratch on a clean installation of Linux; the scenario should fail when the steps are followed on Jenkins 2.335 or later and pass when the steps are followed on Jenkins 2.334 or earlier.
We noticed very same issue on Amazon Linux 2. Until last month it was working OK up to 2.138, and now when trying to upgrade we're getting:
May 23 19:56:29 ip-10-220-0-127 jenkins: 2022-05-23 19:56:29.336+0000 [id=26]#011INFO#011hudson.PluginManager#loadDetachedPlugins: Upgrading Jenkins. The last running version was 2.138. This Jenkins is version 2.332.3. May 23 19:56:29 ip-10-220-0-127 jenkins: 2022-05-23 19:56:29.390+0000 [id=27]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Started initialization May 23 19:56:29 ip-10-220-0-127 jenkins: 2022-05-23 19:56:29.444+0000 [id=26]#011INFO#011hudson.PluginManager#loadDetachedPlugins: Upgraded Jenkins from version 2.138 to version 2.332.3. Loaded detached plugins (and dependencies): [trilead-api.hpi, javax-mail-api.hpi, sshd.hpi, javax-activation-api.hpi] May 23 19:56:29 ip-10-220-0-127 jenkins: 2022-05-23 19:56:29.659+0000 [id=29]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Listed all plugins May 23 19:56:29 ip-10-220-0-127 jenkins: 2022-05-23 19:56:29.679+0000 [id=26]#011SEVERE#011jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin JAXB plugin v2.3.6-1 (jaxb) May 23 19:56:29 ip-10-220-0-127 jenkins: java.io.IOException: Failed to load: JAXB plugin (jaxb 2.3.6-1) May 23 19:56:29 ip-10-220-0-127 jenkins: - Update required: JavaBeans Activation Framework (JAF) API (javax-activation-api 1.2.0-2) to be updated to 1.2.0-3 or higher May 23 19:56:29 ip-10-220-0-127 jenkins: at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:1018) May 23 19:56:29 ip-10-220-0-127 jenkins: at hudson.PluginManager$2$1$1.run(PluginManager.java:542) May 23 19:56:29 ip-10-220-0-127 jenkins: at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175) May 23 19:56:29 ip-10-220-0-127 jenkins: at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305) May 23 19:56:29 ip-10-220-0-127 jenkins: at jenkins.model.Jenkins$5.runTask(Jenkins.java:1156) May 23 19:56:29 ip-10-220-0-127 jenkins: at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222) May 23 19:56:29 ip-10-220-0-127 jenkins: at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121) May 23 19:56:29 ip-10-220-0-127 jenkins: at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) May 23 19:56:29 ip-10-220-0-127 jenkins: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) May 23 19:56:29 ip-10-220-0-127 jenkins: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) May 23 19:56:29 ip-10-220-0-127 jenkins: at java.lang.Thread.run(Thread.java:748) May 23 19:56:29 ip-10-220-0-127 jenkins: 2022-05-23 19:56:29.680+0000 [id=29]#011SEVERE#011jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jackson 2 API Plugin v2.13.3-285.vc03c0256d517 (jackson2-api) May 23 19:56:29 ip-10-220-0-127 jenkins: java.io.IOException: Failed to load: Jackson 2 API Plugin (jackson2-api 2.13.3-285.vc03c0256d517) May 23 19:56:29 ip-10-220-0-127 jenkins: - Update required: JavaBeans Activation Framework (JAF) API (javax-activation-api 1.2.0-2) to be updated to 1.2.0-3 or higher May 23 19:56:29 ip-10-220-0-127 jenkins: - Failed to load: JAXB plugin (jaxb 2.3.6-1)
And we noticed the same behaviour, war is placed under `/var/lib/jenkins/%C/jenkins`
mic_kul Are you able to provide the information that I requested in https://issues.jenkins.io/browse/JENKINS-68600?focusedCommentId=426057&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-426057 ?
basil I think we're using default configs (I just increased timeout yesterday). I will try to reproduce this on clean installation of Linux, in the meantime here are configs requested: (We don't have /etc/systemd/system/jenkins.service.d/override.conf)
Our platform:
$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Amazon Description: Amazon Linux release 2 (Karoo)
/etc/sysconfig/jenkins:
## Path: Development/Jenkins ## Description: Jenkins Automation Server ## Type: string ## Default: "/var/lib/jenkins" ## ServiceRestart: jenkins # # Directory where Jenkins store its configuration and working # files (checkouts, build reports, artifacts, ...). # JENKINS_HOME="/var/lib/jenkins" ## Type: string ## Default: "" ## ServiceRestart: jenkins # # Java executable to run Jenkins # When left empty, we'll try to find the suitable Java. # JENKINS_JAVA_CMD="" ## Type: string ## Default: "jenkins" ## ServiceRestart: jenkins # # Unix user account that runs the Jenkins daemon # Be careful when you change this, as you need to update # permissions of $JENKINS_HOME and /var/log/jenkins. # JENKINS_USER="jenkins" ## Type: string ## Default: "false" ## ServiceRestart: jenkins # # Whether to skip potentially long-running chown at the # $JENKINS_HOME location. Do not enable this, "true", unless # you know what you're doing. See JENKINS-23273. # #JENKINS_INSTALL_SKIP_CHOWN="false" ## Type: string ## Default: "-Djava.awt.headless=true" ## ServiceRestart: jenkins # # Options to pass to java when running Jenkins. # JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Djenkins.install.runSetupWizard=false" ## Type: integer(0:65535) ## Default: 8080 ## ServiceRestart: jenkins # # Port Jenkins is listening on. # Set to -1 to disable # JENKINS_PORT="8080" ## Type: string ## Default: "" ## ServiceRestart: jenkins # # IP address Jenkins listens on for HTTP requests. # Default is all interfaces (0.0.0.0). # JENKINS_LISTEN_ADDRESS="" ## Type: integer(0:65535) ## Default: "" ## ServiceRestart: jenkins # # HTTPS port Jenkins is listening on. # Default is disabled. # JENKINS_HTTPS_PORT="" ## Type: string ## Default: "" ## ServiceRestart: jenkins # # Path to the keystore in JKS format (as created by the JDK 'keytool'). # Default is disabled. # JENKINS_HTTPS_KEYSTORE="" ## Type: string ## Default: "" ## ServiceRestart: jenkins # # Password to access the keystore defined in JENKINS_HTTPS_KEYSTORE. # Default is disabled. # JENKINS_HTTPS_KEYSTORE_PASSWORD="" ## Type: string ## Default: "" ## ServiceRestart: jenkins # # IP address Jenkins listens on for HTTPS requests. # Default is disabled. # JENKINS_HTTPS_LISTEN_ADDRESS="" ## Type: integer(1:9) ## Default: 5 ## ServiceRestart: jenkins # # Debug level for logs -- the higher the value, the more verbose. # 5 is INFO. # JENKINS_DEBUG_LEVEL="5" ## Type: yesno ## Default: no ## ServiceRestart: jenkins # # Whether to enable access logging or not. # # JENKINS_ENABLE_ACCESS_LOG="yes" ## Type: integer ## Default: 100 ## ServiceRestart: jenkins # # Maximum number of HTTP worker threads. # JENKINS_HANDLER_MAX="100" ## Type: integer ## Default: 20 ## ServiceRestart: jenkins # # Maximum number of idle HTTP worker threads. # JENKINS_HANDLER_IDLE="20" ## Type: string ## Default: "" ## ServiceRestart: jenkins # # Pass arbitrary arguments to Jenkins. # Full option list: java -jar jenkins.war --help # JENKINS_ARGS=""
/etc/systemd/system/jenkins.service
# # This file is managed by systemd(1). Do NOT edit this file manually! # To override these settings, run: # # systemctl edit jenkins # # For more information about drop-in files, see: # # https://www.freedesktop.org/software/systemd/man/systemd.unit.html # [Unit] Description=Jenkins Continuous Integration Server Requires=network.target After=network.target [Service] Type=notify NotifyAccess=main ExecStart=/usr/bin/jenkins Restart=on-failure SuccessExitStatus=143 # Configures the time to wait for start-up. If Jenkins does not signal start-up # completion within the configured time, the service will be considered failed # and will be shut down again. Takes a unit-less value in seconds, or a time span # value such as "5min 20s". Pass "infinity" to disable the timeout logic. TimeoutStartSec=300 # Unix account that runs the Jenkins daemon # Be careful when you change this, as you need to update the permissions of # $JENKINS_HOME, $JENKINS_LOG, and (if you have already run Jenkins) # $JENKINS_WEBROOT. User=jenkins Group=jenkins # Directory where Jenkins stores its configuration and workspaces Environment="JENKINS_HOME=/var/lib/jenkins" WorkingDirectory=/var/lib/jenkins # Location of the Jenkins WAR #Environment="JENKINS_WAR=/usr/share/java/jenkins.war" # Location of the exploded WAR Environment="JENKINS_WEBROOT=%C/jenkins/war" # Location of the Jenkins log. By default, systemd-journald(8) is used. #Environment="JENKINS_LOG=%L/jenkins/jenkins.log" # The Java home directory. When left empty, JENKINS_JAVA_CMD and PATH are consulted. #Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" # The Java executable. When left empty, JAVA_HOME and PATH are consulted. #Environment="JENKINS_JAVA_CMD=/etc/alternatives/java" # Arguments for the Jenkins JVM Environment="JAVA_OPTS=-Djava.awt.headless=true" # IP address to listen on for HTTP requests. # The default is to listen on all interfaces (0.0.0.0). #Environment="JENKINS_LISTEN_ADDRESS=" # Port to listen on for HTTP requests. Set to -1 to disable. # To be able to listen on privileged ports (port numbers less than 1024), # add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities # directive below. Environment="JENKINS_PORT=8080" # IP address to listen on for HTTPS requests. Default is disabled. #Environment="JENKINS_HTTPS_LISTEN_ADDRESS=" # Port to listen on for HTTPS requests. Default is disabled. # To be able to listen on privileged ports (port numbers less than 1024), # add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities # directive below. #Environment="JENKINS_HTTPS_PORT=443" # Path to the keystore in JKS format (as created by the JDK's keytool). # Default is disabled. #Environment="JENKINS_HTTPS_KEYSTORE=/path/to/keystore.jks" # Password to access the keystore defined in JENKINS_HTTPS_KEYSTORE. # Default is disabled. #Environment="JENKINS_HTTPS_KEYSTORE_PASSWORD=s3cR3tPa55w0rD" # IP address to listen on for HTTP2 requests. Default is disabled. # # Note: HTTP2 support may require additional configuration. # See the Winstone documentation for more information. #Environment="JENKINS_HTTP2_LISTEN_ADDRESS=" # HTTP2 port to listen on. Default is disabled. # To be able to listen on privileged ports (port numbers less than 1024), # add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities # directive below. # # Note: HTTP2 support may require additional configuration. # See the Winstone documentation for more information. #Environment="JENKINS_HTTP2_PORT=" # Controls which capabilities to include in the ambient capability set for the # executed process. Takes a whitespace-separated list of capability names, e.g. # CAP_SYS_ADMIN, CAP_DAC_OVERRIDE, CAP_SYS_PTRACE. Ambient capability sets are # useful if you want to execute a process as a non-privileged user but still # want to give it some capabilities. For example, add the CAP_NET_BIND_SERVICE # capability to be able to listen on privileged ports (port numbers less than # 1024). #AmbientCapabilities=CAP_NET_BIND_SERVICE # Debug level for logs. The higher the value, the more verbose. 5 is INFO. #Environment="JENKINS_DEBUG_LEVEL=5" # Set to true to enable logging to /var/log/jenkins/access_log. #Environment="JENKINS_ENABLE_ACCESS_LOG=false" # Folder for additional JAR files to add to the Jetty class loader. Default # is disabled. See the Winstone documentation for more information. #Environment="JENKINS_EXTRA_LIB_FOLDER=" # Servlet context (important if you want to use reverse proxying) #Environment="JENKINS_PREFIX=/jenkins" # Arbitrary additional arguments to pass to Jenkins. # Full option list: java -jar jenkins.war --help #Environment="JENKINS_OPTS=" # Maximum core file size. If unset, the value from the OS is inherited. #LimitCORE=infinity # Maximum file size. If unset, the value from the OS is inherited. #LimitFSIZE=infinity # File descriptor limit. If unset, the value from the OS is inherited. #LimitNOFILE=8192 # Maximum number of processes. If unset, the value from the OS is inherited. #LimitNPROC=32768 # Set the umask to control the permission bits of files that Jenkins creates. # # 0027 makes files read-only for group and inaccessible for others, which some # security sensitive users might consider beneficial, especially if Jenkins # is running on a server that is used for multiple purposes. Beware that 0027 # permissions would interfere with sudo scripts that run on the controller # (see JENKINS-25065). # # Note also that the particularly sensitive parts of $JENKINS_HOME (such as # credentials) are always written without 'other' access. So the umask values # only affect job configuration, build records, etc. # # If unset, the value from the OS is inherited, which is normally 0022. # The default umask comes from pam_umask(8) and /etc/login.defs. #UMask=0022 [Install] WantedBy=multi-user.target
And what exactly is the symptom of your problem? All that is written in the issue description is "the war is placed in an incorrect location", which is a claim made without evidence and therefore not a cogent claim.
The issue is that files shouldn't just arbitrarily change location. And if they are going to be moved then that should be called out in the changelog.
The Jenkins project does not advertise a stable API for file locations. File locations may change as an implementation detail from one release to the next.
This is the code that introduced this behavior: https://github.com/jenkinsci/packaging/blob/798a3f6729c774adc2ba333866cdfe203f4b3088/systemd/jenkins.service#L45