1

I have used Spring Integration FTP to copy files from an FTP server to local and processing it. It is working fine with local using Spring Boot and Spring Integration, but I have deployed the application in OpenShift, but it is not looking for the FTP files.

For example:

In local FileReadingMessageSource is getting invoked
[task-scheduler-5] o.s.i.file.FileReadingMessageSource : Created message: [GenericMessage [payload=file-temp\abcd.xml, headers={id=30e5289a-aba6-19db-1d81-3036fca251b0, timestamp=1464675579294}]]

But it is not invoked in OpenShift. Is there any special configuration required for it to work?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user3428736
  • 864
  • 2
  • 13
  • 33
  • Nothing special should be needed; maybe a firewall issue? I suggest you turn on DEBUG logging. – Gary Russell May 31 '16 at 15:22
  • @GaryRussell The configuration of firewall is same as local configuration and logger is already turned on. After the spring boot application started it should start copying the files but it is not copying the files. – user3428736 Jun 01 '16 at 11:11
  • "not copying the files" is simply insufficient information. If you don't see that message then no files were found. If you have DEBUG logging enabled and you don't see any polling activity (e.g. `Received no Message...`) then it means the poller wasn't started or the thread is stuck somewhere - most likely trying to connect. You need to use your debugging skills - take a thread dump with jstack, visualvm etc and find out what the poller thread is doing. – Gary Russell Jun 01 '16 at 12:44
  • @Bean(name = PollerMetadata.DEFAULT_POLLER) public PollerMetadata defaultPoller() { PollerMetadata pollerMetadata = new PollerMetadata(); pollerMetadata.setTrigger(new PeriodicTrigger(100)); return pollerMetadata; } @ServiceActivator(inputChannel = "inputChannel") public void transferredFilesFromFTP(File payload) { process(payload); } @GaryRussell - Thanks Gary, I have used the above code and the problem is in deployed application the child thread is not getting processed after the parent is processed [task-scheduler] aftr debug, thread is not invoked. – user3428736 Jun 02 '16 at 06:12
  • Don't put code in comments; as you can see it's completely unreadable. Delete these comments and edit the question (formatting the code) instead. If you want people to help you have to give them something reasonable to work with. If it works in one environment but not another, it's likely an environment issue and not a Spring Integration issue; you need to debug it further using logs. Compare the debug logs from one environment to the other. If after doing that you suspect the framework is at fault, provide evidence of such. – Gary Russell Jun 02 '16 at 12:34
  • I understand it is a environment issue, but I need to know whether openshift will support FTPClient. On comparing logs, in local the child thread is running after task-scheduler started but the thread is not running in openshift. I am not able to do remote debugging from the Openshift application :( . – user3428736 Jun 02 '16 at 13:13

1 Answers1

0

As per the Linux team, OpenShift is not supporting FTP Client and it is not possible to run FTP using Spring Integration in OpenShift.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user3428736
  • 864
  • 2
  • 13
  • 33
  • I understand this is old, but is there any additional info on why this won’t work, if there is a workaround and what the alternative is if you need to access a file via ftp? – LetsBeFrank Sep 26 '18 at 13:40