troubleshoot scptask
Asked by Ivan Scattergood:

Hi

I am trying to use an SCP task to copy and artefact from a build to a deployment server.

I can use SCP successfully from my machine, but It doesn't work from the SCP task, I get the following error:

|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------|
| Connecting to 185.95.244.34 on port: 22 |
| 18-Feb-2016 12:04:21                    | Failed to connect to host                                                                                              |
| 18-Feb-2016 12:04:21                    | [java.net](http://java.net).ConnectException: Connection timed out                                                     |
| 18-Feb-2016 12:04:21                    | at [java.net](http://java.net).PlainSocketImpl.socketConnect(Native Method)                                            |
| 18-Feb-2016 12:04:21                    | at [java.net](http://java.net).AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)                     |
| 18-Feb-2016 12:04:21                    | at [java.net](http://java.net).AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)              |
| 18-Feb-2016 12:04:21                    | at [java.net](http://java.net).AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)                       |
| 18-Feb-2016 12:04:21                    | at [java.net](http://java.net).SocksSocketImpl.connect(SocksSocketImpl.java:392)                                       |
| 18-Feb-2016 12:04:21                    | at [java.net](http://java.net).Socket.connect(Socket.java:589)                                                         |
| 18-Feb-2016 12:04:21                    | at net.schmizz.sshj.SocketClient.connect(SocketClient.java:53)                                                         |
| 18-Feb-2016 12:04:21                    | at net.schmizz.sshj.SocketClient.connect(SocketClient.java:80)                                                         |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:264)                                                  |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.plugins.scp.ScpTask.run(ScpTask.java:127)                                                      |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:112)                                                  |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$80(TaskExecutorImpl.java:265)                        |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202)                 |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:265)                                  |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:108)                                       |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74)                           |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:214)                             |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139)              |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130)              |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:136)                             |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)                                           |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)                              |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)               |
| 18-Feb-2016 12:04:21                    | at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)                                |
| 18-Feb-2016 12:04:21                    | at java.lang.Thread.run(Thread.java:745)                                                                               |
| 18-Feb-2016 12:04:21                    | Finished task 'Copy to Ospero-REHEL-001' with result: Error                                                            |

Is there anyway I can troubleshoot what is going wrong?


Answers:
author: Alexey Chystoprudov
body: You did everything correctly


author: Ivan Scattergood
body: Hi Alexey,

That's what I did, and it created a ticket here.

Are you saying I should create this ticket elsewhere? If so how?


author: Alexey Chystoprudov
body: Ask for help at support.atlassian.com


Tags: cloud