Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72203

install-plugin over jenkins-cli.jar is not working anymore (regression in 2.428)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • cli
    • - Jenkins docker image updated to latest version 2.428
      - jenkins-cli 2.428
      - Java 11.0.15+10 OpenJDK Temurin
    • 2.429

      Hi there,

      I currently can't run the jenkins-cli command "install-plugin" with the latest version of the jenkins-cli.jar. I get the following error:

      ERROR: URI is not absolute

       

      Downgrading jenkins to 2.426 makes install-plugin work again.
      I haven't tested jenkins 2.427, but 2.428 definitly throws me this error, when I try to install/update a plugin over the CLI.

      My command looks like this:

      java -jar ./jenkins-cli.jar -s http://localhost:8080 -auth user:pw install-plugin credentials

      Running it from within the docker container as root.

      I have to say, the docker-image is jenkins/jenkins:lts-jdk11 from 04-05-2022.
      If I update jenkins, I update the jenkins.war and the plugins within the container over a script.

      This is a summary of that said script:

      • Download latest jenkins-cli.jar from localhost/jnlpJars/jenkins-cli.jar
      • Download latest jenkins.war
      • Replace current jenkins.war and create a backup
      • Get list of plugins with list-plugins and parse updatable plugins (that still works fine)
      • Update plugins with install-plugin (this is, where the error occurs).

      I tried different plugins, it is always the same error.

      As I said, rollback to 2.426 and install-plugin works without a problem.

      Maybe there is an easy solution to this, I'm just missing, because I'm not very good with URI related issues. Help would be highly appreciated.

          [JENKINS-72203] install-plugin over jenkins-cli.jar is not working anymore (regression in 2.428)

          Mark Waite added a comment - - edited

          I have to say, the docker-image is jenkins/jenkins:lts-jdk11 from 04-05-2022.

          If I update jenkins, I update the jenkins.war and the plugins within the container over a script.

          Please don't upgrade the Jenkins war file from inside the container image. The Jenkins project does not support that upgrade path. Upgrade by changing from a version labeled Jenkins container (like jenkins/jenkins:2.414.1) to another version labeled Jenkins container (like jenkins/jenkins:2.414.2)

          When you upgrade inside the Docker container instead of replacing the Docker container, you do not receive any of the other updates that happen in those container images. The current Jenkins container images are delivering Java 11.0.20.1 rather than the Java 11.0.15 that you're using. Other container content improvements are missing as well.

          Does the same problem happen when you try to install plugins from the command line without using a Docker container?

          Mark Waite added a comment - - edited I have to say, the docker-image is jenkins/jenkins:lts-jdk11 from 04-05-2022. If I update jenkins, I update the jenkins.war and the plugins within the container over a script. Please don't upgrade the Jenkins war file from inside the container image. The Jenkins project does not support that upgrade path. Upgrade by changing from a version labeled Jenkins container (like jenkins/jenkins:2.414.1) to another version labeled Jenkins container (like jenkins/jenkins:2.414.2) When you upgrade inside the Docker container instead of replacing the Docker container, you do not receive any of the other updates that happen in those container images. The current Jenkins container images are delivering Java 11.0.20.1 rather than the Java 11.0.15 that you're using. Other container content improvements are missing as well. Does the same problem happen when you try to install plugins from the command line without using a Docker container?

          Mark Waite added a comment - - edited

          Thanks for the report. I've duplicated the issue on my installation of Jenkins 2.428 and have confirmed on my local installation that it is not an issue with Jenkins 2.426.

          Basil has identified that the bug was introduced in a 2.428 pull request

          Mark Waite added a comment - - edited Thanks for the report. I've duplicated the issue on my installation of Jenkins 2.428 and have confirmed on my local installation that it is not an issue with Jenkins 2.426. Basil has identified that the bug was introduced in a 2.428 pull request

          Fabian König added a comment -

          Hi Mark,

          glad to hear, that you could replicate the issue, since I only tested it from inside a docker-container.
          My company is currently undergoing a CI/CD rework, which will also contain the step to pull a newer image-version.
          Thanks for pointing out the updated java-version. I will definitly setup a more best-practice approach to update our Jenkins-Server.

          Fabian König added a comment - Hi Mark, glad to hear, that you could replicate the issue, since I only tested it from inside a docker-container. My company is currently undergoing a CI/CD rework, which will also contain the step to pull a newer image-version. Thanks for pointing out the updated java-version. I will definitly setup a more best-practice approach to update our Jenkins-Server.

          Basil Crow added a comment -

          Basil Crow added a comment - Reverted in https://github.com/jenkinsci/jenkins/pull/8637 toward 2.429.

            basil Basil Crow
            fakoelobster Fabian König
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: