FTP publisher plugin appears to succeed, but files are not on the destination machine???

1,272 views
Skip to first unread message

Steve K

unread,
Nov 1, 2012, 4:27:56 PM11/1/12
to jenkins...@googlegroups.com
Hello,

The console output leads me to believe that the file was successfully FTP'd, but the file does not actually show up on the destination machine.
Here is the relevant portion of my console output:
Connecting to 10.555.55.555
file:/C:/Jenkins/workspace/z_Try_FTP/
current root dir /TOP
current root dir /TOP/subdir1/subdir2
transferred 1 files to subdir1/subdir2
Transfered 1 files.
Finished: SUCCESS


Do you have an idea of what is going wrong?

Thank you.

Steve K

unread,
Nov 29, 2012, 11:42:54 AM11/29/12
to jenkins...@googlegroups.com
I'll add to my own question-in case it might help someone see what I'm missing:

:: NOTE: This is the file I'm attempting to ftp:
C:\Jenkins\workspace\z_Try_FTP\Artifacts>dir /b BuildDependency.txt
BuildDependency.txt

:: Here's my interactive ftp session:
C:\Jenkins\workspace\z_Try_FTP\Artifacts>ftp ##.###.##.###
Connected to ##.###.##.###.
220 NASFTPD Turbo station 2.x 1.3.1rc2 Server (ProFTPD) [##.###.##.###]
User (10.112.20.175:(none)): xxxxx
331 Password required for xxxxx
Password:*******
230 User xxxxx logged in
ftp> cd /A/Dir/On/Remote/Machine
250 CWD command successful
ftp> put BuildDependency.txt
200 PORT command successful
550 BuildDependency.txt: No such file or directory
ftp> bye
221 Goodbye.

:: Please note:  My "put" failed.   I'm not sure why, but it did.
   Interactively, ftp lets me know that the 'put' failed.
   The FTP Publish plugin, however,  led me to believe that it had succeeded when, in fact, it failed--probably as a result of the same error experienced in the interactive session.

My wishes are:
(1)  When the FTP Plugin fails to copy a file, it should detect the failure and cause the job status to be "FAILURE".
(2)  I'd like to know why my FTP is failing.  I connect to the remote machine OK, but, when I attempt to "ftp put" the file, I'm slapped with a "No such file or directory" error.

Any ideas?

Thanks

Scott Evans

unread,
Nov 29, 2012, 12:43:39 PM11/29/12
to jenkins...@googlegroups.com
Steve,

Are you sure your ftp session has write permissions on the target directory?  Can you put files elsewhere on the target server (i.e. initial directory when you first initiate the ftp session)?  Can you list other files in the target directory (either with an ls or dir command)? 

One other question... I assume you have direct access privs to the target box - is the file there, just with incorrect permissions that prevent it from being seen by the ftp session?

When I do a test of trying to put a non-existent file to a remote server I don't even get the 200 PORT Command successful, but rather an immediate File not found error.  So, that would seem to indicate to me that the ftp session is finding the source file, it just can't write it.

Scott

Steve K

unread,
Nov 30, 2012, 2:57:04 PM11/30/12
to jenkins...@googlegroups.com

Hello Scott,

Thanks for your reply.

Now that you mention it, I'm NOT sure my ftp session has write permissions on the target directory.
I'll need to double-check with the person who provided the username/login to me.
I can tell you, however, that I receive a different message if I attempt to write to a directory I know I don't have write access to (as shown below):
ftp> pwd
257 "/" is the current directory
ftp> put Hello.txt
200 PORT command successful
550 Hello.txt: Forbidden filename


I know I need to find out how to authenticate so that I will be able to successfully send my files,  but, since the process fails, I think that the FTP Publisher plugin should also cause the job to terminate with a FAILURE status.

I did check from the point of view of the target machine and verified that the file I was attempting to send was not on the target directory.

I'll need to verify that I have been given proper access to the target machine.  I'll post again after I know more, but, would you agree that the plugin should cause a job FAILURE when the ftp "put" fails?

Thank you.

Regards,

Steve K.

Bap

unread,
Dec 1, 2012, 6:40:28 AM12/1/12
to jenkins...@googlegroups.com
Quoting Steve K <Steve.K...@CareStream.com>:

> Hello Scott,
>
> Thanks for your reply.
>
> Now that you mention it, I'm NOT sure my ftp session has write permissions
> on the target directory.
> I'll need to double-check with the person who provided the username/login
> to me.
> I can tell you, however, that I receive a different message if I attempt to
> write to a directory I know I don't have write access to (as shown below):
> ftp> pwd
> 257 "/" is the current directory
> ftp> put Hello.txt
> 200 PORT command successful
> 550 Hello.txt: Forbidden filename
>
>
> I know I need to find out how to authenticate so that I will be able to
> successfully send my files, but, since the process fails, I think that the
> FTP Publisher plugin should also cause the job to terminate with a FAILURE
> status.
>
> I did check from the point of view of the target machine and verified that
> the file I was attempting to send was not on the target directory.
>
> I'll need to verify that I have been given proper access to the target
> machine. I'll post again after I know more, but, would you agree that the
> plugin should cause a job FAILURE when the ftp "put" fails?
>

If you install the Publish Over FTP Plugin and set the "Verbose output
in console" option, it will print every command sent and every
response received from the FTP server.

Once you have diagnosed and fixed the issue, you could revert to the
FTP Publisher plugin ... or not.

> Thank you.
>
> Regards,
>
> Steve K.
>
> On Thursday, November 29, 2012 12:43:39 PM UTC-5, SA Evans wrote:
>>
>> Steve,
>>
>> Are you sure your ftp session has write permissions on the target
>> directory? Can you put files elsewhere on the target server (i.e. initial
>> directory when you first initiate the ftp session)? Can you list other
>> files in the target directory (either with an ls or dir command)?
>>
>> One other question... I assume you have direct access privs to the target
>> box - is the file there, just with incorrect permissions that prevent it
>> from being seen by the ftp session?
>>
>> When I do a test of trying to put a non-existent file to a remote server I
>> don't even get the 200 PORT Command successful, but rather an immediate
>> File not found error. So, that would seem to indicate to me that the ftp
>> session is finding the source file, it just can't write it.
>>
>> Scott
>>
>> On Thu, Nov 29, 2012 at 10:42 AM, Steve K
>> <Steve.K...@carestream.com<javascript:>
>>>> file:/C:/Jenkins/workspace/z_**Try_FTP/

Steve K

unread,
Dec 4, 2012, 10:06:38 AM12/4/12
to jenkins...@googlegroups.com

How do I set the "Verbose output in console" option for the Publish Over FTP Plugin?

Certainly, the primary objective is to successfully use ftp to copy the files to the desired location. When the ftp fails, however, do you agree that the "Publish Over FTP Plugin" should throw an error?

Thank you.

Steve K.

alok kumar

unread,
Dec 4, 2012, 9:52:01 PM12/4/12
to jenkins...@googlegroups.com
You can enable the check box for "Verbose output in console" option present in the advanced section where you specify the machine where you want to publish the files. You will have couple more options there that you can use.

Thanks,
Alok

Bap

unread,
Dec 6, 2012, 2:17:07 PM12/6/12
to jenkins...@googlegroups.com
Yes, I agree. However, the plugin acts on the response from the server. If the server says ok, then all is well (report the issue to the server admin) if the server returns a failure code then create a bug report in the Jenkins issue tracker (including the verbose console output) and I'll take a look at it.

Note that some people setup servers that allow you to put files on them, but not get or even list them!

Bap.


Reply all
Reply to author
Forward
0 new messages