MoveFiles error

Support/help with CloverETL implementation problems

Posts: 16
Joined: Thu Feb 09, 2017 4:30 pm

MoveFiles error

Postby anyeone » Thu Mar 16, 2017 10:26 pm


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
Screen Shot 2017-03-16 at 4.24.14 PM.png (248.49 KiB) Viewed 848 times

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(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
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.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)
... 3 more
Caused by: Move failed
at org.jetel.component.fileoperation.FileManager.move(
at org.jetel.component.fileoperation.FileManager.move(
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: Copy failed
at org.jetel.component.fileoperation.DefaultOperationHandler.move(
at org.jetel.component.fileoperation.FileManager.move(
... 9 more
Caused by: Copy failed
at org.jetel.component.fileoperation.FileManager.copy(
at org.jetel.component.fileoperation.DefaultOperationHandler.move(
... 10 more
Caused by:
at org.jetel.util.ExceptionUtils.getIOException(
at org.jetel.component.fileoperation.pool.AbstractPoolableConnection.getIOException(
at org.jetel.component.fileoperation.pool.PooledSFTPConnection.getOutputStream(
at org.jetel.component.fileoperation.PooledSFTPOperationHandler$SFTPContent.write(
at org.jetel.component.fileoperation.FileManager$
at org.jetel.component.fileoperation.DefaultOperationHandler.copyFile(
at org.jetel.component.fileoperation.DefaultOperationHandler.copyInternal(
at org.jetel.component.fileoperation.DefaultOperationHandler.copy(
at org.jetel.component.fileoperation.FileManager.copy(
... 11 more
Caused by: 2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(
at com.jcraft.jsch.ChannelSftp.put(
at com.jcraft.jsch.ChannelSftp.put(
at com.jcraft.jsch.ChannelSftp.put(
at org.jetel.component.fileoperation.pool.PooledSFTPConnection.getOutputStream(
... 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
sandbox://SDX/data-out/categories_4_201 ... 00000.json


Posts: 25
Joined: Wed Nov 09, 2016 11:51 pm
Location: 2111 Wilson Blvd., Arlington VA 22201

Re: MoveFiles error

Postby svecp » Mon Mar 20, 2017 7:15 pm


are you using embedded browser to select path on a remote server, or you're copy&pasting address? Error you're getting might relate to file system restrictions. What kind of remote system we're talking about? Linux? Windows?

The thing is, when you're trying to reach a directory let's say "/my/directory/structure/is/very/deep.txt" and you don't have "execute" permission to directory "structure" at Linux OS, you'll get "directory does not exist" instead of expected "permission denied" error. Could not this be your case?

For example, I get following error:

Code: Select all

--------------------------------- Error details ----------------------------------
  Component [ListFiles:LIST_FILES] finished with status ERROR. (Out0: 0 recs)
   Failed to list ftp://clover:***@griffin/opt/VBoxGuestAdditions-5.0.14/bin
    Directory listing failed
     File not found: "ftp://clover:***@griffin/opt/VBoxGuestAdditions-5.0.14/bin"

When "VBoxGuestAdditions-5.0.14" has following permissions:

Code: Select all

drwxr-xr--.  2 root   root      6 Jun 21  2016 VBoxGuestAdditions-5.0.14

If I:

Code: Select all

chmod o+w /opt/VBoxGuestAdditions-5.0.14

my graph finishes successfully. Using vsFTP@CentOS 7.
Pavel Švec | CloverETL | Sales Engineer | 2111 Wilson Blvd | Suite 320 | Arlington, VA 22201

Posts: 16
Joined: Thu Feb 09, 2017 4:30 pm

Re: MoveFiles error

Postby anyeone » Mon Mar 20, 2017 8:45 pm

Hi Pavel,
That wasn't it but your suggestion helped me figure it out.

I added a ListFiles component beforehand to try to view the contents of the directory I was trying to write to. It turns on that when I *manually* sftp to that server and log in as the user in question it drops me in that user's folder automatically. However, when the Clover server sftp's there, you have to additionally add the user folder to the path or it is trying to look under the root.

So the problem was that it was actually trying to drop to serverdomain/4/archive rather than serverdomain/userfolder/4/archive
and once I manually added the username folder to the path, it worked.

So thank you very much :)