com.jcraft.jsch.JSchException: connection is closed by foreign host

Jenkins JIRA | Sam Xiao | 4 years ago
  1. 0

    Jenkins issues - [JIRA] [publish-over-ftp] (JENKINS-18085) Support for FTPS is broken

    nabble.com | 8 months ago
    com.jcraft.jsch.JSchException: connection is closed by foreign host
  2. 0

    Box used FTPS for connecting, but it's not working by using this plugin. [https://support.box.com/entries/23597576-Does-Box-support-FTP-connections-] Error log: {quote} 11:47:49 Archiving artifacts 11:47:52 [SCP] Connecting to ftp.box.com 11:49:52 ERROR: Failed to upload files 11:49:52 com.jcraft.jsch.JSchException: connection is closed by foreign host 11:49:52 at com.jcraft.jsch.Session.connect(Session.java:236) 11:49:52 at com.jcraft.jsch.Session.connect(Session.java:150) 11:49:52 at be.certipost.hudson.plugin.SCPSite.createSession(SCPSite.java:153) 11:49:52 at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:160) 11:49:52 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) 11:49:52 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 11:49:52 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) 11:49:52 at hudson.model.Build$BuildExecution.post2(Build.java:183) 11:49:52 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) 11:49:52 at hudson.model.Run.execute(Run.java:1600) 11:49:52 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 11:49:52 at hudson.model.ResourceController.execute(ResourceController.java:88) 11:49:52 at hudson.model.Executor.run(Executor.java:241) 11:49:52 Build step 'Publish artifacts to SCP Repository' changed build result to UNSTABLE 11:49:52 FTP: Connecting from host [bob-20130513] 11:49:52 FTP: Connecting with configuration [BOX.com] ... 11:50:20 FTP: Disconnecting configuration [BOX.com] ... 11:50:20 ERROR: Exception when publishing, exception message [IOException caught while copying.] 11:50:20 Notifying upstream projects of job completion 11:50:20 Finished: UNSTABLE {quote}

    Jenkins JIRA | 4 years ago | Sam Xiao
    com.jcraft.jsch.JSchException: connection is closed by foreign host
  3. 0

    [JENKINS-18085] Support for FTPS is broken - Jenkins JIRA

    jenkins-ci.org | 8 months ago
    com.jcraft.jsch.JSchException: connection is closed by foreign host
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Box used FTPS for connecting, but it's not working by using this plugin. [https://support.box.com/entries/23597576-Does-Box-support-FTP-connections-] Error log: {quote} 11:47:49 Archiving artifacts 11:47:52 [SCP] Connecting to ftp.box.com 11:49:52 ERROR: Failed to upload files 11:49:52 com.jcraft.jsch.JSchException: connection is closed by foreign host 11:49:52 at com.jcraft.jsch.Session.connect(Session.java:236) 11:49:52 at com.jcraft.jsch.Session.connect(Session.java:150) 11:49:52 at be.certipost.hudson.plugin.SCPSite.createSession(SCPSite.java:153) 11:49:52 at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:160) 11:49:52 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) 11:49:52 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 11:49:52 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) 11:49:52 at hudson.model.Build$BuildExecution.post2(Build.java:183) 11:49:52 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) 11:49:52 at hudson.model.Run.execute(Run.java:1600) 11:49:52 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 11:49:52 at hudson.model.ResourceController.execute(ResourceController.java:88) 11:49:52 at hudson.model.Executor.run(Executor.java:241) 11:49:52 Build step 'Publish artifacts to SCP Repository' changed build result to UNSTABLE 11:49:52 FTP: Connecting from host [bob-20130513] 11:49:52 FTP: Connecting with configuration [BOX.com] ... 11:50:20 FTP: Disconnecting configuration [BOX.com] ... 11:50:20 ERROR: Exception when publishing, exception message [IOException caught while copying.] 11:50:20 Notifying upstream projects of job completion 11:50:20 Finished: UNSTABLE {quote}

    Jenkins JIRA | 4 years ago | Sam Xiao
    com.jcraft.jsch.JSchException: connection is closed by foreign host
  6. 0

    I consistently get this error when scp plugin tries to upload: {quote} Recording fingerprints Sending e-mails to: <me> [SCP] Connecting to <hostname> ERROR: Failed to upload files com.jcraft.jsch.JSchException: Auth fail at com.jcraft.jsch.Session.connect(Session.java:473) at com.jcraft.jsch.Session.connect(Session.java:145) at be.certipost.hudson.plugin.SCPSite.createSession(SCPSite.java:149) at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:106) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.post2(Build.java:158) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1296) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) Finished: UNSTABLE {quote} This only happens when uploading to a host that's behind a firewall. It can succesfully upload to a host on the same network as the Hudson master and slave. I can manually, using "system" scp, upload files to the host through the firewall with no problems. The "auth.log" file on the remote host is not touched by Hudson's attempts to upload, indicating that it's not the host itself that denies access.

    Jenkins JIRA | 6 years ago | torbent
    com.jcraft.jsch.JSchException: Auth fail

  1. abrazeneb 1 times, last 4 months ago
96 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.jcraft.jsch.JSchException

    connection is closed by foreign host

    at com.jcraft.jsch.Session.connect()
  2. JSch
    Session.connect
    1. com.jcraft.jsch.Session.connect(Session.java:236)
    2. com.jcraft.jsch.Session.connect(Session.java:150)
    2 frames
  3. be.certipost.hudson
    SCPRepositoryPublisher.perform
    1. be.certipost.hudson.plugin.SCPSite.createSession(SCPSite.java:153)
    2. be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:160)
    2 frames
  4. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
    4. hudson.model.Build$BuildExecution.post2(Build.java:183)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
    6. hudson.model.Run.execute(Run.java:1600)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    8. hudson.model.ResourceController.execute(ResourceController.java:88)
    9. hudson.model.Executor.run(Executor.java:241)
    9 frames