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

Jenkins fails to deploy new remoting.jar file after update to 2.326

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • ssh-agent-plugin
    • None
    • Jenkins Version 2.326

      Updated from 2.318 to 2.326. After update Jenkins can not install the new remoting.jar file.

      The file shows permissions as  

      1. ls -l remoting.jar
        rw-rr- 1 root root 1522173 Dec 27 13:55 remoting.jar
      2. If I delete the file remoting.jar then the file is deployed and the agent is started.
      3. Rebooting Jenkins or if the Agent stops it can not deploy the file and restart the agent so that all commands fails to the node including SSH connections.

      USER=root
      [12/27/21 14:52:15] [SSH] Starting sftp client.
      [12/27/21 14:52:15] [SSH] Copying latest remoting.jar...
      java.io.IOException: Could not copy remoting.jar into '/admin' on agent
      at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:717)
      at hudson.plugins.sshslaves.SSHLauncher.access$300(SSHLauncher.java:113)
      at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:457)
      at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:423)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalArgumentException: invalid len argument
      at com.trilead.ssh2.SFTPv3Client.read(SFTPv3Client.java:1232)
      at com.trilead.ssh2.jenkins.SFTPClient$SFTPInputStream.read(SFTPClient.java:172)
      at com.google.common.io.ByteStreams.toByteArrayInternal(ByteStreams.java:184)
      at com.google.common.io.ByteStreams.toByteArray(ByteStreams.java:224)
      at hudson.plugins.sshslaves.SSHLauncher.readInputStreamIntoByteArrayAndClose(SSHLauncher.java:775)
      at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:686)
      ... 7 more
      [12/27/21 14:52:15] Launch failed - cleaning up connection

       

      Remove the file on the node.

      #rm remoting.jar

       

      From Jenkins restart the Agent on the node,

      USER=root
      [12/27/21 14:53:52] [SSH] Starting sftp client.
      [12/27/21 14:53:52] [SSH] Copying latest remoting.jar...
      [12/27/21 14:53:52] [SSH] Copied 1,522,173 bytes.
      Expanded the channel window size to 4MB
      [12/27/21 14:53:52] [SSH] Starting agent process: cd "/admin" && /usr/java8_64/jre/bin/java -jar remoting.jar -workDir /export/nim -jar-cache /export/nim/remoting/jarCache
      Dec 27, 2021 2:53:54 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
      INFO: Using /export/nim/remoting as a remoting work directory
      Dec 27, 2021 2:53:54 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
      INFO: Both error and output logs will be printed to /export/nim/remoting
      <===[JENKINS REMOTING CAPACITY]===>channel started
      Remoting version: 4.11.2
      This is a Unix agent
      Evacuated stdout
      Agent successfully connected and online

       

       

            Unassigned Unassigned
            stanleys Stan Speegle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: