Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP producer: Error writig file #620

Closed
MehrCurry opened this issue Apr 17, 2019 · 4 comments
Closed

FTP producer: Error writig file #620

MehrCurry opened this issue Apr 17, 2019 · 4 comments

Comments

@MehrCurry
Copy link
Contributor

I have a simple route to write a file to a ftp server:

from("timer:kotlin?period=60s")
  .setBody().constant("FTP Test")
  .to("ftp://ftp.dlptest.com?username=dlpuser@dlptest.com&password=xxx&fileName=foo.bar&transferLoggingLevel=DEBUG&transferLoggingIntervalSeconds=1&transferLoggingVerbose=false")
  .to("log:info")

It a public test server. When deploying i got:

[2]
[2] Message History
[2] ---------------------------------------------------------------------------------------------------------------------------------------
[2] RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
[2] [route1            ] [route1            ] [timer://kotlin?period=60s                                                     ] [       860]
[2] [route1            ] [setBody1          ] [setBody[constant{FTP Test}]                                                   ] [         5]
[2] [route1            ] [to1               ] [ftp://ftp.dlptest.com?username=dlpuser@dlptest.com&password=xxxxxx&fileName=fo] [       850]
[2]
[2] Stacktrace
[2] ---------------------------------------------------------------------------------------------------------------------------------------
[2] org.apache.camel.component.file.GenericFileOperationFailedException: Error writing file [foo.bar]
[2] 	at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:307) ~[org.apache.camel.camel-core-2.23.1.jar:2.23.1]
[2] 	at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:169) ~[org.apache.camel.camel-core-2.23.1.jar:2.23.1]
[2] 	at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:57) ~[org.apache.camel.camel-ftp-2.23.1.jar:2.23.1]
[2] 	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) ~[org.apache.camel.camel-core-2.23.1.jar:2.23.1]

I think the ftp component tries to write the data to a file before uploading and i missed to configure some temporary workspace. How could it be done? Am i missing some hints in the documentation?

@nicolaferraro
Copy link
Member

Hi @MehrCurry , usually those kind of issues happen when using active mode, so it should be not related to Camel K.

Can you try adding &passiveMode=true at the end of the URI?

@MehrCurry
Copy link
Contributor Author

Problem solved! Thank you.

@Rizzid761
Copy link

Iam facing this issue only difference is intead of ftp using ftps

@squakez
Copy link
Contributor

squakez commented Jul 1, 2024

Iam facing this issue only difference is intead of ftp using ftps

Hello. This is an old issue. I suggest you to report the problem you're facing in a new issue adding all details and possibly a reproducer. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants