jenkins.plugins.publish_over.BapPublisherException: Exception when publishing, exception message [Failed to connect SFTP channel. Message [java.io.IOException: channel is broken]]

Jenkins JIRA | Alex Domoradov | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [JIRA] [publish-over-ssh-plugin] (JENKINS-34034) Publish Over SSH plugin doesn't work with Windows node

    Google Groups | 1 year ago | alex...@gmail.com (JIRA)
    jenkins.plugins.publish_over.BapPublisherException: Exception when publishing, exception message [Failed to connect SFTP channel. Message [java.io.IOException: channel is broken]]
  2. 0

    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 | https://github.com/PowerShell/Win32-OpenSSH/], 12_22_2015 build (x86_64). {code} # 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 {code} Console output from the windows node {code} 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 {code} In the Jenkins log file I see the following errors {code} 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 {code} P.S. is that normal that jsch-0.1.53.jar file which comes with plugin and from a mirror has different size? {code} # 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 {code} Mirror: 278297 Plugin: 280205

    Jenkins JIRA | 1 year ago | Alex Domoradov
    jenkins.plugins.publish_over.BapPublisherException: Exception when publishing, exception message [Failed to connect SFTP channel. Message [java.io.IOException: channel is broken]]
  3. 0

    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 | https://github.com/PowerShell/Win32-OpenSSH/], 12_22_2015 build (x86_64). {code} # 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 {code} Console output from the windows node {code} 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 {code} In the Jenkins log file I see the following errors {code} 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 {code} P.S. is that normal that jsch-0.1.53.jar file which comes with plugin and from a mirror has different size? {code} # 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 {code} Mirror: 278297 Plugin: 280205

    Jenkins JIRA | 1 year ago | Alex Domoradov
    jenkins.plugins.publish_over.BapPublisherException: Exception when publishing, exception message [Failed to connect SFTP channel. Message [java.io.IOException: channel is broken]]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. jenkins.plugins.publish_over_ssh
      BapSshHostConfiguration.createClient
      1. jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.connectSftpChannel(BapSshHostConfiguration.java:293)
      2. jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.setupSftp(BapSshHostConfiguration.java:250)
      3. jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.createClient(BapSshHostConfiguration.java:236)
      4. jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.createClient(BapSshHostConfiguration.java:210)
      5. jenkins.plugins.publish_over_ssh.BapSshHostConfiguration.createClient(BapSshHostConfiguration.java:47)
      5 frames
    3. jenkins.plugins.publish_over
      BPCallablePublisher.invoke
      1. jenkins.plugins.publish_over.BapPublisher$Performer.perform(BapPublisher.java:229)
      2. jenkins.plugins.publish_over.BapPublisher$Performer.access$000(BapPublisher.java:205)
      3. jenkins.plugins.publish_over.BapPublisher.perform(BapPublisher.java:158)
      4. jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:64)
      5. jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:37)
      5 frames
    4. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:990)
      2. hudson.FilePath.act(FilePath.java:968)
      2 frames
    5. jenkins.plugins.publish_over
      BPPlugin.perform
      1. jenkins.plugins.publish_over.BPInstanceConfig.perform(BPInstanceConfig.java:138)
      2. jenkins.plugins.publish_over.BPPlugin.perform(BPPlugin.java:111)
      2 frames
    6. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      4. hudson.model.Build$BuildExecution.post2(Build.java:185)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      6. hudson.model.Run.execute(Run.java:1763)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:410)
      9 frames