net.schmizz.sshj.xfer.scp.SCPException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • SCP Task should check whether given Remote Path exists and create it if necessary. At this point it attempts to transfer file(s) to non-existant folder structure and fails. Example. Attempt 1: path fragment ".../*1.1.18-SNAPSHOT-434*/" doesn't exist yet. *{color:red}Fail{color}*. {noformat} 09-V-2013 16:07:28 Starting task 'SCP Task' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask' 09-V-2013 16:07:28 Uploading '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar'... 09-V-2013 16:07:28 Failed to upload file '/myfile.jar' 09-V-2013 16:07:28 net.schmizz.sshj.xfer.scp.SCPException: Remote SCP command had error: scp: /tmp/myproject/1.1.18-SNAPSHOT-434/: Is a directory 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPEngine.check(SCPEngine.java:90) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPEngine.sendMessage(SCPEngine.java:154) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.sendFile(SCPUploadClient.java:92) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.process(SCPUploadClient.java:73) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.startCopy(SCPUploadClient.java:65) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.copy(SCPUploadClient.java:45) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload(SCPFileTransfer.java:52) 09-V-2013 16:07:28 at com.atlassian.bamboo.plugins.scp.ScpTask.transferFiles(ScpTask.java:199) 09-V-2013 16:07:28 at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:97) 09-V-2013 16:07:28 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:188) 09-V-2013 16:07:28 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:94) 09-V-2013 16:07:28 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:87) 09-V-2013 16:07:28 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:206) 09-V-2013 16:07:28 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103) 09-V-2013 16:07:28 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:111) 09-V-2013 16:07:28 at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52) 09-V-2013 16:07:28 at java.lang.Thread.run(Thread.java:722) 09-V-2013 16:07:28 Copy Failed. Some files were not uploaded successfully. {noformat} Attempt 2: path fragment ".../*1.1.18-SNAPSHOT-434*/" has been created manually. *{color:green}Success{color}*. {noformat} 09-V-2013 16:10:10 Starting task 'SCP Task' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask' 09-V-2013 16:10:10 Uploading '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar'... 09-V-2013 16:10:10 '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar' was uploaded successfully. {noformat} This becomes an issue if you indend to use variables in Remote Path field, like I do. For instance: {noformat}Remote Path = /tmp/${bamboo.repository.branch.name}/${bamboo.maven.version}-${bamboo.repository.revision.number}/ {noformat} Thanks for considering, Tomas
    via by Tomas Vala,
  • SCP Task should check whether given Remote Path exists and create it if necessary. At this point it attempts to transfer file(s) to non-existant folder structure and fails. Example. Attempt 1: path fragment ".../*1.1.18-SNAPSHOT-434*/" doesn't exist yet. *{color:red}Fail{color}*. {noformat} 09-V-2013 16:07:28 Starting task 'SCP Task' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask' 09-V-2013 16:07:28 Uploading '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar'... 09-V-2013 16:07:28 Failed to upload file '/myfile.jar' 09-V-2013 16:07:28 net.schmizz.sshj.xfer.scp.SCPException: Remote SCP command had error: scp: /tmp/myproject/1.1.18-SNAPSHOT-434/: Is a directory 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPEngine.check(SCPEngine.java:90) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPEngine.sendMessage(SCPEngine.java:154) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.sendFile(SCPUploadClient.java:92) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.process(SCPUploadClient.java:73) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.startCopy(SCPUploadClient.java:65) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPUploadClient.copy(SCPUploadClient.java:45) 09-V-2013 16:07:28 at net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload(SCPFileTransfer.java:52) 09-V-2013 16:07:28 at com.atlassian.bamboo.plugins.scp.ScpTask.transferFiles(ScpTask.java:199) 09-V-2013 16:07:28 at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:97) 09-V-2013 16:07:28 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:188) 09-V-2013 16:07:28 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:94) 09-V-2013 16:07:28 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:87) 09-V-2013 16:07:28 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:206) 09-V-2013 16:07:28 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103) 09-V-2013 16:07:28 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:111) 09-V-2013 16:07:28 at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52) 09-V-2013 16:07:28 at java.lang.Thread.run(Thread.java:722) 09-V-2013 16:07:28 Copy Failed. Some files were not uploaded successfully. {noformat} Attempt 2: path fragment ".../*1.1.18-SNAPSHOT-434*/" has been created manually. *{color:green}Success{color}*. {noformat} 09-V-2013 16:10:10 Starting task 'SCP Task' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask' 09-V-2013 16:10:10 Uploading '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar'... 09-V-2013 16:10:10 '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar' was uploaded successfully. {noformat} This becomes an issue if you indend to use variables in Remote Path field, like I do. For instance: {noformat}Remote Path = /tmp/${bamboo.repository.branch.name}/${bamboo.maven.version}-${bamboo.repository.revision.number}/ {noformat} Thanks for considering, Tomas
    via by Tomas Vala,
    • net.schmizz.sshj.xfer.scp.SCPException: Remote SCP command had error: scp: /tmp/myproject/1.1.18-SNAPSHOT-434/: Is a directory at net.schmizz.sshj.xfer.scp.SCPEngine.check(SCPEngine.java:90) at net.schmizz.sshj.xfer.scp.SCPEngine.sendMessage(SCPEngine.java:154) at net.schmizz.sshj.xfer.scp.SCPUploadClient.sendFile(SCPUploadClient.java:92) at net.schmizz.sshj.xfer.scp.SCPUploadClient.process(SCPUploadClient.java:73) at net.schmizz.sshj.xfer.scp.SCPUploadClient.startCopy(SCPUploadClient.java:65) at net.schmizz.sshj.xfer.scp.SCPUploadClient.copy(SCPUploadClient.java:45) at net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload(SCPFileTransfer.java:52) at com.atlassian.bamboo.plugins.scp.ScpTask.transferFiles(ScpTask.java:199) at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:97) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:188) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:94) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:87) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:206) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:111) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52) at java.lang.Thread.run(Thread.java:722)
    No Bugmate found.