apache / camel-k

Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers
https://camel.apache.org/camel-k
Apache License 2.0
868 stars 348 forks source link

Camel ftp issue in writing file #5682

Closed Rizzid761 closed 3 weeks ago

Rizzid761 commented 4 months ago

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

squakez commented 4 months ago

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 commented 4 months ago

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/camel?username=my@user.com&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.

Rizzid761 commented 4 months ago

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

squakez commented 4 months ago

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.

Rizzid761 commented 4 months ago

Below is the sample code

Rizzid761 commented 4 months ago

but in .net application with same credentials its working fine