Delete files node not working on my server.

Hi Knime community,

I have a simple workflow to list all the files and then delete the files from them.
When I execute the workflow locally( knime mac version ) it is successful but on my server(knime windowns version) it is not able to delete the files.

My workflow
image

Here is the error from kime.log file.

2020-11-13 11:34:15,413 : ERROR : KNIME-Worker-17-Delete Files 0:3 : : Node : Delete Files : 0:3 : Execute failed: File file://amznfsxkffhogvx.corp.ppbplc.com/share/Sportsbook/Executed_Workflow_Check/SB-00-File_Clean_Up could not be deleted
java.lang.Exception: File file://amznfsxkffhogvx.corp.ppbplc.com/share/Sportsbook/Executed_Workflow_Check/SB-00-File_Clean_Up could not be deleted
at org.knime.base.filehandling.deletefiles.DeleteFilesNodeModel.execute(DeleteFilesNodeModel.java:149)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:571)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1236)
at org.knime.core.node.Node.execute(Node.java:1016)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:557)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

Can you please help me to understand what could be the issue ?

Thank you
Srinivas

Hello @ShinagdeS,

does List Files looks same folder both from Mac and from Windows? When you say Server you mean KNIME Server or you mean server as another (stronger) machine where you run KNIME Analytics Platform?

Br,
Ivan

Hi @ipazin

Yes the list files node looks for the same folder from Mac as well as from windows.

I mean server as another (stronger) machine where KNIME Analytics Platform is installed ?

Also I am bit confused because list files node is executed successfully, that means I can read the files without any issue but I cannot delete the files. Do you think this might be because, I might not have delete permission ? But again I can delete from my local machine.

Hello @ShinagdeS,

I see. As you said this is probably related to permissions although log file doesn’t specifically indicates it. Maybe if you increase log verbosity there will be more info. (File --> Preferences --> KNIME)

Br,
Ivan

Hi @ipazin. I was able to get more information about the error.

> java.lang.Exception: File file://amznfsxkffhogvx.corp.ppbplc.com/share/Sportsbook/Executed_Workflow_Check/SB-00-File_Clean_Up could not be deleted
> 	at org.knime.base.filehandling.deletefiles.DeleteFilesNodeModel.execute(DeleteFilesNodeModel.java:149)
> 	at org.knime.core.node.NodeModel.executeModel(NodeModel.java:571)
> 	at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1236)
> 	at org.knime.core.node.Node.execute(Node.java:1016)
> 	at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:557)
> 	at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
> 	at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
> 	at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
> 	at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
> 	at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
> 	at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : WorkflowManager : Delete Files : 4:3 : Delete Files 4:3 doBeforePostExecution
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : NodeContainer : Delete Files : 4:3 : Delete Files 4:3 has new state: POSTEXECUTE
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : WorkflowManager : Delete Files : 4:3 : Delete Files 4:3 doAfterExecute - failure
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : Node : Delete Files : 4:3 : reset
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : Node : Delete Files : 4:3 : clean output ports.
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : WorkflowDataRepository : Delete Files : 4:3 : Removing handler 6500b867-da51-4232-b3f2-2d6f67d18b15 (Delete Files 4:3: <no directory>) - 2 remaining
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : NodeContainer : Delete Files : 4:3 : Delete Files 4:3 has new state: IDLE
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : Node : Delete Files : 4:3 : Configure succeeded. (Delete Files)
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : NodeContainer : Delete Files : 4:3 : Delete Files 4:3 has new state: CONFIGURED
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : Node : Table Creator : 4:1908:1906 : Configure succeeded. (Table Creator)
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : Node : Table Row to Variable (deprecated) : 4:1908:1908 : Configure succeeded. (Table Row to Variable (deprecated))
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : Node : Table Creator : 4:1908:1909 : Configure succeeded. (Table Creator)
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : Node : CSV Writer : 4:1908:1907 : Configure succeeded. (CSV Writer)
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-Worker-618-Delete Files 4:3 :  : NodeContainer : Delete Files : 4:3 : SB-00-FileCleanUp_test 4 has new state: CONFIGURED
> 2020-11-16 06:44:41,157 : DEBUG : KNIME-WFM-Parent-Notifier :  : NodeContainer :  :  : ROOT  has new state: IDLEz

Hi @ipazin
I did some changes in mapping path in List Files node.
Instead of using the shared drive full name I changes to use its alias.
I really don’t know what difference it made internally but It worked as expected.

Thank you so much for all the help you provided.

1 Like

The delete files node is currently reworked. There is a huge improvement coming with 4.3. to it.

2 Likes

@Iris Awesome! that is good to know.

2 Likes

Hello @ShinagdeS,

glad to hear you found a way :+1:

Br,
Ivan

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.