我有一个运行在远程windows 7机器上的filezilla服务器。我在debian 7上安装了一个运行中的jenkins主人,并安装了一个奴隶。
如果我将ssh发送到debian7从服务器并对filezilla服务器执行ftp/put操作,我就可以上传一个test.txt文件了:
$ ftp myfileZillaFtp 21
Connected to myfileZillaFtp.
220-FileZilla Server version 0.9.41 beta
220-written by Tim Kosse (Tim.Kosse@gmx.de)
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 (Tim.Kosse@gmx.de)
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为什么ftp上传在jenkins中运行失败?
编辑:
很可能是https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+FTP+Plugin中的一个bug
它适用于这个插件:http://wiki.hudson-ci.org/display/HUDSON/FTP-Publisher+Plugin
不过,任何建议都是值得欢迎的。
发布于 2014-08-14 22:48:23
我也经历过同样的问题。通过将插件配置为“使用活动数据模式”,我能够使传输正常工作。还要确保允许从Jenkins服务器在端口21上进行连接。
发布于 2014-08-29 08:48:43
首先,我们可以使用lftp命令登录ftp服务器,最好使用ftp命令。
现在我们可以..。
https://serverfault.com/questions/562268
复制相似问题