[JIRA] (JENKINS-53079) Could not copy slave.jar into '<dir>' on slave

27 views
Skip to first unread message

ian.williams1@telus.com (JIRA)

unread,
Aug 16, 2018, 5:50:02 PM8/16/18
to jenkinsc...@googlegroups.com
Ian Williams created an issue
 
Jenkins / Bug JENKINS-53079
Could not copy slave.jar into '<dir>' on slave
Issue Type: Bug Bug
Assignee: Ivan Fernandez Calvo
Components: ssh-slaves-plugin
Created: 2018-08-16 21:49
Environment: Jenkins ver. 1.651.3
ssh-slaves-plugin:1.11
OS: Linux 2.6.32-642.11.1.el6.x86_64
Priority: Minor Minor
Reporter: Ian Williams

Attempting to start Linux node results in failure:

08/16/18 17:47:31] [SSH] Copying latest slave.jar...
hudson.util.IOException2: Could not copy slave.jar into '/build' on slave
        at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1054)
        at hudson.plugins.sshslaves.SSHLauncher.access$300(SSHLauncher.java:137)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:723)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706)
        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: hudson.util.IOException2: Could not copy slave.jar to '/build/slave.jar' on slave
        at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1049)
        ... 7 more
Caused by: com.trilead.ssh2.SFTPException: Failure (SSH_FX_FAILURE: An error occurred, but no specific error code exists to describe the failure.)
        at com.trilead.ssh2.SFTPv3Client.openFile(SFTPv3Client.java:1201)
        at com.trilead.ssh2.SFTPv3Client.createFile(SFTPv3Client.java:1074)
        at com.trilead.ssh2.SFTPv3Client.createFile(SFTPv3Client.java:1055)
        at hudson.plugins.sshslaves.SFTPClient.writeToFile(SFTPClient.java:93)
        at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1039)
        ... 7 more

Turns out root cause is file system went read-only:

mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).
       It's possible that information reported by mount(8) is not
       up to date. For actual information about system mount points
       check the /proc/mounts file.

Reporting error because of the response in the logs:

(SSH_FX_FAILURE: An error occurred, but no specific error code exists to describe the failure.)

This is a different failure condition to other documented bugs (JENKINS-42441, JENKINS-42856|https://issues.jenkins-ci.org/browse/JENKINS-42856]), so worth mentioning and perhaps code can be fixed to provide more descriptive failure response

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

ian.williams1@telus.com (JIRA)

unread,
Aug 16, 2018, 5:53:02 PM8/16/18
to jenkinsc...@googlegroups.com
Ian Williams updated an issue
Change By: Ian Williams
This is a different failure condition to other documented bugs ([JENKINS- 42441 42856 |https://issues.jenkins-ci.org/browse/JENKINS- 42441 42856 ], [ JENKINS- 42856 42441 |https://issues.jenkins-ci.org/browse/JENKINS- 42856 42441 ]) , so worth mentioning and perhaps code can be fixed to provide more descriptive failure response

kuisathaverat@gmail.com (JIRA)

unread,
Dec 28, 2018, 11:19:02 AM12/28/18
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo updated an issue
Attempting to start Linux node results in failure:

{ code}
{ { 08/16/18 17:47:31] [SSH] Copying latest slave.jar...}}

{{hudson.util.IOException2: Could not copy slave.jar into '/build' on slave}}
{{        at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1054)}}
{{        at hudson.plugins.sshslaves.SSHLauncher.access$300(SSHLauncher.java:137)}}
{{        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:723)}}
{{        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706)}}
{{        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: hudson.util.IOException2: Could not copy slave.jar to '/build/slave.jar' on slave}}
{{        at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1049)}}
{{        ... 7 more}}
{{Caused by: com.trilead.ssh2.SFTPException: Failure (SSH_FX_FAILURE: An error occurred, but no specific error code exists to describe the failure.)}}
{{        at com.trilead.ssh2.SFTPv3Client.openFile(SFTPv3Client.java:1201)}}
{{        at com.trilead.ssh2.SFTPv3Client.createFile(SFTPv3Client.java:1074)}}
{{        at com.trilead.ssh2.SFTPv3Client.createFile(SFTPv3Client.java:1055)}}
{{        at hudson.plugins.sshslaves.SFTPClient.writeToFile(SFTPClient.java:93)}}
{{        at hudson.plugins.sshslaves.SSHLauncher.copySlaveJar(SSHLauncher.java:1039)}}
{{        ... 7 more}}
{code}
Turns out root cause is file system went read-only:

mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).
       It's possible that information reported by mount(8) is not
       up to date. For actual information about system mount points
       check the /proc/mounts file.

Reporting error because of the response in the logs:

{{(SSH_FX_FAILURE: An error occurred, but no specific error code exists to describe the failure.)}}

This is a different failure condition to other documented bugs ([JENKINS-42856|https://issues.jenkins-ci.org/browse/JENKINS-42856] , [JENKINS-42441|https://issues.jenkins-ci.org/browse/JENKINS-42441]) so worth mentioning and perhaps code can be fixed to provide more descriptive failure response
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 9:04:02 AM7/21/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo closed an issue as Cannot Reproduce
 

unsupported Jenkins core version and ssh-slaves-plugin

Status: Open Closed
Resolution: Cannot Reproduce

ian.williams1@telus.com (JIRA)

unread,
Jul 21, 2019, 4:42:02 PM7/21/19
to jenkinsc...@googlegroups.com
Ian Williams commented on Bug JENKINS-53079
 
Re: Could not copy slave.jar into '<dir>' on slave

I realize it took 10 months to get to this point, but just wondering if you read to the end of the description?
It seems fairly self-explanatory and could be verified by inspection.

My guess is you should be handling one of the other error responses - eg:

SSH_FX_PERMISSION_DENIED 3
SSH_FX_WRITE_PROTECT 12

The complete list can be found at SSH File Transfer Protocol: Status response

I believe the impacted code is here - SFTPv3Client.java

Several of the other "Similar Issues" also appear to meet the conditions of one of the known error responses.

I am 100% certain the condition remains in the latest LTS. Shall I reproduce under under the latest release for you?

Please re-review.

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 5:34:03 PM7/21/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo reopened an issue
 
Resolution: Cannot Reproduce
Status: Closed Reopened

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 5:34:03 PM7/21/19
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 5:37:02 PM7/21/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo commented on Bug JENKINS-53079
 
Re: Could not copy slave.jar into '<dir>' on slave

I was closing old stuff, this one I didn't really want to close it.

>I realize it took 10 months to get to this point, but just wondering if you read to the end of the description?

BTW, really unpolite comment.

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 5:38:01 PM7/21/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo updated an issue
 
Environment: Jenkins ver. 1.651.3 , 2.150.1
ssh-slaves-plugin:1.11
-1.30.1
OS: Linux 2.6.32-642.11.1.el6.x86_64

kuisathaverat@gmail.com (JIRA)

unread,
Jul 21, 2019, 5:38:02 PM7/21/19
to jenkinsc...@googlegroups.com
I was closing old stuff, this one I really didn't really want to close it.


>I realize it took 10 months to get to this point, but just wondering if you read to the end of the description?

BTW, really unpolite comment.

ian.williams1@telus.com (JIRA)

unread,
Jul 21, 2019, 5:56:02 PM7/21/19
to jenkinsc...@googlegroups.com

ian.williams1@telus.com (JIRA)

unread,
Jul 21, 2019, 5:59:02 PM7/21/19
to jenkinsc...@googlegroups.com
Ian Williams edited a comment on Bug JENKINS-53079
Apologies for the sarcasm antagonism

kuisathaverat@gmail.com (JIRA)

unread,
Jul 28, 2019, 7:28:02 AM7/28/19
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Jul 28, 2019, 7:42:04 AM7/28/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo closed an issue as Not A Defect
Status: Open Closed
Resolution: Not A Defect

kuisathaverat@gmail.com (JIRA)

unread,
Jul 28, 2019, 7:42:06 AM7/28/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo commented on Bug JENKINS-53079
 
Re: Could not copy slave.jar into '<dir>' on slave

I've dug in how Trilead-ssh2 library implements the SSH error manage and it simply relays the error code and adds the error message described in SSH File Transfer Protocol: Status response so the implementation is correct, it depends on the implementation that the SSH server made and the error codes that it returns, if those codes are incorrect or lazy implemented the information that the Trilead-ssh2 can return has the same level of detail. So I am afraid that I can not do anything here to improve the user experience.

https://github.com/jenkinsci/trilead-ssh2/blob/master/src/com/trilead/ssh2/SFTPv3Client.java#L1201
https://github.com/jenkinsci/trilead-ssh2/blob/master/src/com/trilead/ssh2/SFTPException.java
https://github.com/jenkinsci/trilead-ssh2/blob/master/src/com/trilead/ssh2/sftp/ErrorCodes.java

Reply all
Reply to author
Forward
0 new messages