camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Camel ftp issue in writing file

Open Rizzid761 opened this issue 1 year ago • 6 comments

What happened?

Iam facing issue in camel ftp it is able to connect but while writing file .it is throwing error writing failed , connection closed . With same cred .net application is able to write

Please note : tried with passsivemode true.

Steps to reproduce

No response

Relevant log output

No response

Camel K version

2.32

Rizzid761 avatar Jul 02 '24 07:07 Rizzid761

Thanks for reporting. Can you please provide a sample of the failing application? also it would be good to have some log to troubleshoot.

squakez avatar Jul 02 '24 07:07 squakez

Assuming you're trying to execute something like in the issue #620 - I've tried the following:

import org.apache.camel.builder.RouteBuilder;

public class Test extends RouteBuilder {
    @Override
    public void configure() throws Exception {
        from("timer:poll?period=10s")
        .setBody().constant("FTP Test")
        .to("ftps://admin@localhost:2222/public/[email protected]&password=admin&fileName=foo.bar&transferLoggingLevel=DEBUG&transferLoggingIntervalSeconds=1&transferLoggingVerbose=false&passiveMode=true")
        .to("log:info");
    }
}

This one seems to work correctly. Could you please try it (changing the credentials and the ftp server host) and provide here the error you get? Thanks.

squakez avatar Jul 02 '24 08:07 squakez

Thank you , Yes but Im trying with camel xml dsi.i could see the file in directory but its 0 kb In logs details like Connected to server About to store file Ftp returned false Writing file failed

Rizzid761 avatar Jul 02 '24 09:07 Rizzid761

Okey. I bet it's some permission issue then. Make sure the user has the right privileges to write files on such a folder. As you are correctly connecting to the server, it does not seem related directly to Camel K.

squakez avatar Jul 02 '24 09:07 squakez

Below is the sample code

Rizzid761 avatar Jul 02 '24 09:07 Rizzid761

but in .net application with same credentials its working fine

Rizzid761 avatar Jul 02 '24 09:07 Rizzid761