java.io.IOException: Could not copy remoting.jar into ‘/export/build’ on agent

1,191 views
Skip to first unread message

Harald Dunkel

unread,
Dec 23, 2021, 3:28:15 AM12/23/21
to jenkins...@googlegroups.com
Hi folks,

using Jenkins 2.326 (the Debian package) the agent cannot be redeployed. It
fails with

[12/13/21 17:53:49] [SSH] Checking java version of /usr/lib/jvm/java-openjdk/bin/java
[12/13/21 17:53:49] [SSH] /usr/lib/jvm/java-openjdk/bin/java -version returned 1.8.0_302.
[12/13/21 17:53:49] [SSH] Starting sftp client.
[12/13/21 17:53:49] [SSH] Copying latest remoting.jar...
java.io.IOException: Could not copy remoting.jar into '/export/build' 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.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:797)
at hudson.plugins.sshslaves.SSHLauncher.copyAgentJar(SSHLauncher.java:708)
... 7 more
[12/13/21 17:53:49] Launch failed - cleaning up connection
[12/13/21 17:53:49] [SSH] Connection closed.

If I remove the remoting.jar manually on the node it works for a short time,
but then the error comes back. Java on the node is openjdk 8u302 (CentOS) or
AdoptOpenJDK 8u292 (Debian).

Seems to be related to JENKINS-67258 (currently unassigned).

Every helpful comment is highly appreciated.


Regards
Harri

Jeremy Mordkoff

unread,
Dec 23, 2021, 10:56:04 AM12/23/21
to Jenkins Users
what are the perms on /export/build and /export/build/remoting.jar? One of them is not writable by user jenkins 

Ivan Fernandez Calvo

unread,
Dec 23, 2021, 1:40:20 PM12/23/21
to Jenkins Users
you set the workspace of the agent to  '/export/build' the user you use to connect to the Agent must have write permissions on that folder
Reply all
Reply to author
Forward
0 new messages