Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25367

Unable to SCP a jar file to a remote server

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: scp-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      I am unable to scp a jar file to my remote server as a post build step, I keep getting the following exception

      [SCP] Connecting to "Server"
      ERROR: Failed to upload files
      4:
      at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1720)
      at be.certipost.hudson.plugin.SCPSite.upload(SCPSite.java:188)
      at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:211)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      at hudson.model.Run.execute(Run.java:1784)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      at java.lang.String.charAt(String.java:658)
      at com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(ChannelSftp.java:2359)
      at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1711)
      ... 11 more
      Build step 'Publish artifacts to SCP Repository' changed build result to UNSTABLE
      Finished: UNSTABLE

      Can Someone please help?

        Attachments

          Activity

          Hide
          joomster joom ster added a comment -

          my jar is built on jenkins server at /xyz/target/*.jar

          and destination is my server xxxx@xxx.com:/home/user/jars

          Show
          joomster joom ster added a comment - my jar is built on jenkins server at /xyz/target/*.jar and destination is my server xxxx@xxx.com:/home/user/jars
          Hide
          ramazanyich2 ramazanyich2 added a comment -

          destination is a relative path. the main root path is defined in SCP repository hosts part in Jenkins configuration.
          Please check SCP plugin wiki page for correct usage : https://wiki.jenkins-ci.org/display/JENKINS/SCP+plugin

          Show
          ramazanyich2 ramazanyich2 added a comment - destination is a relative path. the main root path is defined in SCP repository hosts part in Jenkins configuration. Please check SCP plugin wiki page for correct usage : https://wiki.jenkins-ci.org/display/JENKINS/SCP+plugin

            People

            • Assignee:
              ramazanyich2 ramazanyich2
              Reporter:
              joomster joom ster
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: