Investigate OpenLMIS-migration-test issues with FTP

Description

Our migration tests are unstable lately. They fail with the following error:

2020-12-02T02:04:37+00:00 0c537419efad [ask-scheduler-2] ERROR org.springframework.integration.handler.LoggingHandler org.springframework.messaging.MessagingException: Problem occurred while synchronizing '/shipments/files/csv/WH02/incoming' to local directory; nested exception is org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is java.lang.IllegalStateException: failed to create FTPClient#012#011at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:355)#012#011at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:265)#012#011at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:66)#012#011at org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource.doReceive(AbstractFetchLimitingMessageSource.java:45)#012#011at org.springframework.integration.endpoint.AbstractMessageSource.receive(AbstractMessageSource.java:167)#012#011at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:250)#012#011at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:359)#012#011at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:328)#012#011at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$null$1(AbstractPollingEndpoint.java:275)#012#011at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:57)#012#011at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)#012#011at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:55)#012#011at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$2(AbstractPollingEndpoint.java:272)#012#011at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)#012#011at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)#012#011at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)#012#011at java.util.concurrent.FutureTask.run(FutureTask.java:266)#012#011at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)#012#011at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)#012#011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)#012#011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)#012#011at java.lang.Thread.run(Thread.java:745)#012Caused by: org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is java.lang.IllegalStateException: failed to create FTPClient#012#011at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:446)#012#011at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:348)#012#011...

Sometimes we also have the following error: org.postgresql.util.PSQLException: ERROR: could not open relation with OID 19242.

As a scope of this ticket, we should investigate what is the root cause and fix it.

Acceptance Criteria:

  • migration tests are stable and pass

Assignee

Unassigned

Reporter

Klaudia Pałkowska