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

FTPPublisher doesn't work when port 20 is blocked (creates 0 byte files)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ftppublisher-plugin
    • None

      FTPPublisher doesn't work when port is 20 blocked (and 21 open). It creates 0 byte sized files and doesn't show any errors.

      Console log is as follows:

      Connecting to crm-test file:/usr/local/hudson/.hudson/jobs/crm-commons/workspace/
      current root dir /jboss423
      current root dir /jboss423/deploy/common
      transferred 1 files to deploy/common
      Transfered 1 files
      Finished: SUCCESS
      

      Could you possibly implement an option for PASV (passive) transfers?

          [JENKINS-6638] FTPPublisher doesn't work when port 20 is blocked (creates 0 byte files)

          torbent added a comment -

          Oh, that would also be why our transfers don't work ...
          I need to transfer through a firewall, and only passive transfers will be possible.

          torbent added a comment - Oh, that would also be why our transfers don't work ... I need to transfer through a firewall, and only passive transfers will be possible.

          evernat added a comment -

          https://wiki.jenkins-ci.org/display/JENKINS/FTP-Publisher+Plugin ;
          A comment in the plugin page says:

          Switching to passive mode is easy if you're adventurous enough (plugin recompile). I have only one FTP server so I skipped the part of adding a parameter to the FTP site and just went and edited the createSession method on FTPSite object:

          Index: src/main/java/com/zanox/hudson/plugins/FTPSite.java
          ===================================================================
          — src/main/java/com/zanox/hudson/plugins/FTPSite.java (revision 37130)
          +++ src/main/java/com/zanox/hudson/plugins/FTPSite.java (working copy)
          @@ -264,6 +264,7 @@
          if (!ftpClient.changeWorkingDirectory(ftpDir))

          { throw new IOException("Can't connect/access FTP directory:" + ftpDir); }

          + ftpClient.enterLocalPassiveMode();
          }

          /**

          evernat added a comment - https://wiki.jenkins-ci.org/display/JENKINS/FTP-Publisher+Plugin ; A comment in the plugin page says: Switching to passive mode is easy if you're adventurous enough (plugin recompile). I have only one FTP server so I skipped the part of adding a parameter to the FTP site and just went and edited the createSession method on FTPSite object: Index: src/main/java/com/zanox/hudson/plugins/FTPSite.java =================================================================== — src/main/java/com/zanox/hudson/plugins/FTPSite.java (revision 37130) +++ src/main/java/com/zanox/hudson/plugins/FTPSite.java (working copy) @@ -264,6 +264,7 @@ if (!ftpClient.changeWorkingDirectory(ftpDir)) { throw new IOException("Can't connect/access FTP directory:" + ftpDir); } + ftpClient.enterLocalPassiveMode(); } /**

          Actually there is a better plugin (IMHO) which already supports passive transfers:

          http://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+FTP+Plugin

          Michał Minicki added a comment - Actually there is a better plugin (IMHO) which already supports passive transfers: http://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+FTP+Plugin

            benjaminjaton benjaminjaton
            Valgoerad Valgoerad
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: