Greetings,
I’m trying to use the MoveFiles component in a job flow (in a Server project) to move a file from the data-out directory to a remote SFTP location to archive it.
I am able to create the SFTP connection and it validates. However, when I run the jobflow, I get an error:
Component [MoveFiles:MOVE_FILES] finished with status ERROR. (In0: 1 recs, Out0: 0 recs)
Failed to move sandbox://SDX/./data-out/categories_4_2 … 00000.json to sftp://{redacted}:***@{redacted}/4/archive/
Move failed
Copy failed
No such file
The file does exist in the data out directory. The 4/archive folder structure does also exist on the SFTP site.
I have tried including a file name as well (i.e. sftp://{redacted}:***@{redacted}/4/archive/test.json) and I get the same error.
If I try to copy to the root directory of the SFTP site I get a different error (permission denied), but anywhere else I try to copy it says no such file.
I have tried including the file both explicitly by selecting it from the URL dialog and by dynamically specifying the filepath (which is how it will work eventually) but both ways it tells me no such file.
Screen Shot 2017-03-16 at 4.24.14 PM.png
The stack trace is:
org.jetel.exception.JetelRuntimeException: Component [MoveFiles:MOVE_FILES] finished with status ERROR. (In0: 1 recs, Out0: 0 recs)
at org.jetel.graph.Node.createNodeException(Node.java:636)
at org.jetel.graph.Node.run(Node.java:603)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jetel.exception.JetelRuntimeException: Failed to move sandbox://SDX/./data-out/categories_4_2 … 00000.json to sftp://{redacted}:***@{redacted}/4/test.json
at com.opensys.cloveretl.component.MoveFiles.fail(Main:187)
at com.opensys.cloveretl.component.AbstractFileOperation.processError(Main:531)
at com.opensys.cloveretl.component.AbstractFileOperation.processResult(Main:563)
at com.opensys.cloveretl.component.AbstractFileOperation.mainExecuteOperation(Main:351)
at com.opensys.cloveretl.component.AbstractFileOperation.execute(Main:381)
at org.jetel.graph.Node.run(Node.java:563)
… 3 more
Caused by: java.io.IOException: Move failed
at org.jetel.component.fileoperation.FileManager.move(FileManager.java:448)
at org.jetel.component.fileoperation.FileManager.move(FileManager.java:374)
at com.opensys.cloveretl.component.MoveFiles.executeOperation(Main:202)
at com.opensys.cloveretl.component.MoveFiles.executeOperation(Main:40)
at com.opensys.cloveretl.component.AbstractFileOperation.mainExecuteOperation(Main:339)
… 5 more
Caused by: java.io.IOException: Copy failed
at org.jetel.component.fileoperation.DefaultOperationHandler.move(DefaultOperationHandler.java:233)
at org.jetel.component.fileoperation.FileManager.move(FileManager.java:441)
… 9 more
Caused by: java.io.IOException: Copy failed
at org.jetel.component.fileoperation.FileManager.copy(FileManager.java:354)
at org.jetel.component.fileoperation.DefaultOperationHandler.move(DefaultOperationHandler.java:231)
… 10 more
Caused by: java.io.IOException
at org.jetel.util.ExceptionUtils.getIOException(ExceptionUtils.java:581)
at org.jetel.component.fileoperation.pool.AbstractPoolableConnection.getIOException(AbstractPoolableConnection.java:46)
at org.jetel.component.fileoperation.pool.PooledSFTPConnection.getOutputStream(PooledSFTPConnection.java:441)
at org.jetel.component.fileoperation.PooledSFTPOperationHandler$SFTPContent.write(PooledSFTPOperationHandler.java:648)
at org.jetel.component.fileoperation.FileManager$WritableContentProvider.channel(FileManager.java:573)
at org.jetel.component.fileoperation.DefaultOperationHandler.copyFile(DefaultOperationHandler.java:74)
at org.jetel.component.fileoperation.DefaultOperationHandler.copyInternal(DefaultOperationHandler.java:148)
at org.jetel.component.fileoperation.DefaultOperationHandler.copy(DefaultOperationHandler.java:189)
at org.jetel.component.fileoperation.FileManager.copy(FileManager.java:347)
… 11 more
Caused by: 2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2846)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:753)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:700)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:697)
at org.jetel.component.fileoperation.pool.PooledSFTPConnection.getOutputStream(PooledSFTPConnection.java:428)
… 17 more
I’m a bit stumped so assistance is greatly appreciated!
The only thing that seems odd to me is that there is a . in the path in the error message that doesn’t appear in the raw path, i.e.
sandbox://SDX/./data-out/categories_4_2 … 00000.json
vs.
sandbox://SDX/data-out/categories_4_201 … 00000.json
Thanks,
Anye