Why is it copying into /var/lib/Jenkins. Is that your agent workspace root.
/Var/libs/Jenkins looks like a restricted space.  you can try users home
directory as agent root to be sure you have access

On Thu, Jan 27, 2022, 12:08 PM Michael Renner <[email protected]> wrote:

> Moin,
>
> a strange problem. For some time now, the remoting.jar can no longer be
> copied
> to the nodes. The error occurs after every Jenkins update (so very often):
>
> [01/27/22 20:35:23] [SSH] Checking java version of java
> [01/27/22 20:35:23] [SSH] java -version returned 1.8.0_161.
> [01/27/22 20:35:23] [SSH] Starting sftp client.
> [01/27/22 20:35:23] [SSH] Copying latest remoting.jar...
>
> java.io.IOException: Could not copy remoting.jar into '/var/lib/jenkins' on
> agent
>         at
> hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:739)
>         at
> hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:112)
>         at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:
> 457)
>         at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:
> 422)
>         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:
> 264)
>         at java.base/
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
> 1128)
>         at java.base/
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
> 628)
>         at java.base/java.lang.Thread.run(Thread.java:829)
> 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:
> 797)
>         at
> hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:708)
>         ... 7 more
> [01/27/22 20:35:24] Launch failed - cleaning up connection
>
>
> The file permissions on the nodes are okay and haven't changed since it
> worked
> fine for many years:
>
> renner@boulder:~$ ls -l /var/lib/jenkins/
> total 1500
> -rw------- 1 jenkins jenkins     144 Aug  6 11:36 dead.letter
> drwxr-xr-x 4 jenkins jenkins    4096 Apr 28  2020 remoting
> -rw-r--r-- 1 jenkins jenkins 1522173 Jan 21 13:51 remoting.jar
> drwxr-xr-x 6 jenkins jenkins    4096 Dec 30 06:17 workspace
>
> What it solves: delete the remoting.jar by hand and relaunch the process on
> the node. Then the file can be copied. But not overwritten:
>
> [01/27/22 20:43:33] [SSH] Checking java version of java
> [01/27/22 20:43:34] [SSH] java -version returned 1.8.0_161.
> [01/27/22 20:43:34] [SSH] Starting sftp client.
> [01/27/22 20:43:34] [SSH] Copying latest remoting.jar...
> [01/27/22 20:43:35] [SSH] Copied 1,522,173 bytes.
>
>
> Any hints?
> --
> |Michael Renner      E-mail: [email protected]  |
> |81541 Munich        Twitter: @dd0ul                |
> |Germany             Don't drink as root!      ESC:wq
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/2094600.irdbgypaU6%40solaris
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAJgiyW9G91%3Dgqm%3DSdwg5rZ0JdaAV83ocOmdkDb7K-OoSyJQv4Q%40mail.gmail.com.

Reply via email to