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

InstallPluginCommand: Cannot upgrade bundled plugins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • cli, core
    • None
    • # java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ version
      1.622

      I believe this bug affects any plugins, so I've marked it major. It seems be https://issues.jenkins-ci.org/browse/JENKINS-12514 but I'm not 100% sure so I didn't want to re-open.

      Basically, I'm unable to upgrade ssh-credentials-plugin. Because I use chef, this means chef tries and restarts Jenkins repeatedly, making the service unusable.

      Steps to reproduce:

      1. java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ list-plugins | grep ssh-credentials
        ssh-credentials SSH Credentials Plugin 1.10 (1.11)
      1. java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ install-plugin http://updates.jenkins-ci.org/latest/ssh-credentials.hpi
        Installing a plugin from http://updates.jenkins-ci.org/latest/ssh-credentials.hpi
      1. java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ list-plugins | grep ssh-credentials
        ssh-credentials SSH Credentials Plugin 1.10 (1.11)
      1. service jenkins restart
      • Restarting Jenkins Continuous Integration Server jenkins [ OK ]
      1. java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ list-plugins | grep ssh-credentials
        ssh-credentials SSH Credentials Plugin 1.10 (1.11)

      (expected version 1.11).

      Other potentially useful information:

      1. find /var/lib/jenkins -type f -iname "ssh-credentials"
        /var/lib/jenkins/plugins/ssh-credentials.jpi
      1. cp /var/lib/jenkins/plugins/ssh-credentials.jpi /tmp/
      2. unzip /tmp/ssh-credentials.jpi
      1. grep -i version META-INF/MANIFEST.MF
        Manifest-Version: 1.0
        Archiver-Version: Plexus Archiver
        Implementation-Version: 1.10
        Compatible-Since-Version: 1.0
        Plugin-Version: 1.10
        Hudson-Version: 1.532.2
        Jenkins-Version: 1.532.2
      1. java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ install-plugin http://updates.jenkins-ci.org/latest/ssh-credentials.hpi -deploy
        Installing a plugin from http://updates.jenkins-ci.org/latest/ssh-credentials.hpi
        java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:215)
        at java.util.zip.ZipFile.<init>(ZipFile.java:145)
        at java.util.jar.JarFile.<init>(JarFile.java:154)
        at java.util.jar.JarFile.<init>(JarFile.java:133)
        at hudson.ClassicPluginStrategy.getShortName(ClassicPluginStrategy.java:107)
        at hudson.PluginManager.dynamicLoad(PluginManager.java:439)
        at hudson.cli.InstallPluginCommand.run(InstallPluginCommand.java:105)
        at hudson.cli.CLICommand.main(CLICommand.java:237)
        at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
        at hudson.remoting.CallableDecoratorAdapter.call(CallableDecoratorAdapter.java:18)
        at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

      (Downloading and unzipping manually works great.)

            danielbeck Daniel Beck
            martinb3 Martin Smith
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: