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

Publish Over SSH plugin doesn't work with Windows node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • CentOS 6.7, Jenkins ver. 1.648, Publish Over SSH 1.14, Java 1.8.0_77-b03

      Hello,

      I need to copy artifact (a war file) to 2 nodes: linux (CentOS 6) and windows (Windows 2008 R2 SP1). On windows node I'm using openssh server , 12_22_2015 build (x86_64).

      # telnet 192.168.88.219 2222
      Trying 192.168.88.219...
      Connected to 192.168.88.219.
      Escape character is '^]'.
      SSH-2.0-OpenSSH_7.1p1 Microsoft_Win32_port_with_VS
      

      Console output from the windows node

      14:50:12 Started by user Alex
      14:50:12 Running as Alex
      14:50:12 [EnvInject] - Loading node environment variables.
      14:50:12 Building on master in workspace /var/lib/jenkins/jobs/tl-resin-win2k8_01-deploy/workspace
      14:50:12 [WS-CLEANUP] Deleting project workspace...
      14:50:12 [WS-CLEANUP] Done
      14:50:12 [EnvInject] - Executing scripts and injecting environment variables after the SCM step.
      14:50:12 Copied 1 artifact from "tl-build-war" build number 26
      14:50:12 SSH: Connecting from host [ci.example.net]
      14:50:12 SSH: Connecting with configuration [TL-STAGING-WIN2K8-01] ...
      14:50:13 ERROR: Exception when publishing, exception message [Failed to connect SFTP channel. Message [java.io.IOException: channel is broken]]
      14:50:13 Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
      14:50:13 Finished: UNSTABLE
      

      In the Jenkins log file I see the following errors

      Apr 05, 2016 3:07:12 PM jenkins.plugins.publish_over.BPInstanceConfig perform
      WARNING: An exception was caught when invoking perform
      jenkins.plugins.publish_over.BapPublisherException: Exception when publishing, exception message [Failed to connect SFTP channel. Message [java.io.IOException: channel is broken]]
              at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:68)
              at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:37)
              at hudson.FilePath.act(FilePath.java:990)
              at hudson.FilePath.act(FilePath.java:968)
              at jenkins.plugins.publish_over.BPInstanceConfig.perform(BPInstanceConfig.java:138)
              at jenkins.plugins.publish_over.BPPlugin.perform(BPPlugin.java:111)
              at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
              at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
              at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
              at hudson.model.Build$BuildExecution.post2(Build.java:185)
              at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
              at hudson.model.Run.execute(Run.java:1763)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
              at hudson.model.ResourceController.execute(ResourceController.java:98)
              at hudson.model.Executor.run(Executor.java:410)
      Caused by: jenkins.plugins.publish_over_ssh.BapSshSftpSetupException: Failed to connect SFTP channel. Message [java.io.IOException: channel is broken]
              at jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.connectSftpChannel(BapSshHostConfiguration.java:293)
              at jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.setupSftp(BapSshHostConfiguration.java:250)
              at jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.createClient(BapSshHostConfiguration.java:236)
              at jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.createClient(BapSshHostConfiguration.java:210)
              at jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.createClient(BapSshHostConfiguration.java:47)
              at jenkins.plugins.publish_over.BapPublisher$Performer.perform(BapPublisher.java:229)
              at jenkins.plugins.publish_over.BapPublisher$Performer.access$000(BapPublisher.java:205)
              at jenkins.plugins.publish_over.BapPublisher.perform(BapPublisher.java:158)
              at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:64)
              ... 14 more
      

      P.S.
      is that normal that jsch-0.1.53.jar file which comes with plugin and from a mirror has different size?

      # curl -s -I http://ufpr.dl.sourceforge.net/project/jsch/jsch.jar/0.1.53/jsch-0.1.53.jar | grep Content-Length
      Content-Length: 278297
      
      # ls -l /var/lib/jenkins/plugins/publish-over-ssh/WEB-INF/lib/jsch-0.1.53.jar
      -rw-r--r-- 1 jenkins jenkins 280205 Mar 24 22:48 /var/lib/jenkins/plugins/publish-over-ssh/WEB-INF/lib/jsch-0.1.53.jar
      

      Mirror: 278297
      Plugin: 280205

            slide_o_mix Alex Earl
            alex_hha Alex Domoradov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: