我有一个远程Windows 7机器上运行的FileZilla服务器。 我有一个在debian 7上安装了一个slave的jenkins master。
如果我ssh到debian7奴隶,做一个ftp / put到filezilla服务器,我可以上传一个test.txt文件就好:
$ ftp myfileZillaFtp 21 Connected to myfileZillaFtp. 220-FileZilla Server version 0.9.41 beta 220-written by Tim Kosse ([email protected]) 220 Please visit http://sourceforge.net/projects/filezilla/ Name (myfileZillaFtp:jenkins): admin 331 Password required for admin Password: 230 Logged on Remote system type is UNIX. ftp> cd test 250 CWD successful. "/test" is current directory. ftp> put test.txt local: test.txt remote: test.txt 200 Port command successful 150 Opening data channel for file transfer. 226 Transfer OK 6364 bytes sent in 0.00 secs (24959.2 kB/s) ftp>
但是,如果我在Jenkins自由式作业中运行相同的步骤,并在此处添加了基于指令的FTP发布步骤:
https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+FTP+Plugin
我得到:
FTP: Connecting from host [debian7-slave] FTP: Connecting with configuration [myfileZillaFtp] ... 220-FileZilla Server version 0.9.41 beta 220-written by Tim Kosse ([email protected]) 220 Please visit http://sourceforge.net/projects/filezilla/ FTP: Logging in, command printing disabled FTP: Logged in, command printing enabled CWD test 250 CWD successful. "/test" is current directory. FTP: Remote root is not absolute, getting absolute directory from PWD PWD 257 "/test" is current directory. TYPE I 200 Type set to I CWD /test 250 CWD successful. "/test" is current directory. PASV 227 Entering Passive Mode (172,22,80,8,192,46) FTP: Disconnecting configuration [myfileZillaFtp] ... ERROR: Exception when publishing, exception message [Connection timed out] Build step 'Send files over FTP' changed build result to UNSTABLE Finished: UNSTABLE
为什么通过jenkins运行时,ftp上传失败?
编辑:
最有可能的错误: https : //wiki.jenkins-ci.org/display/JENKINS/Publish+Over+FTP+Plugin
它适用于这个插件: http : //wiki.hudson-ci.org/display/HUDSON/FTP-Publisher+Plugin
任何build议仍然受欢迎。
我遇到了同样的问题。 通过将插件configuration为“使用活动数据模式”,我能够获得传输工作。 还要确保你允许Jenkins服务器端口21的连接。
首先,我们可以用lftp命令loginftp服务器,ftp命令更好。
现在,我们可以…