Bug in command line execution: Relative path not accepted / Mountpoint error

Hello to the team,

there is, in my opionion, a bug in KNIME when executing via command line.

The bug has already been described here

Execute workflow with command line. Execute failed: Cannot determine ID of local mountpoint - KNIME Analytics Platform - KNIME Community Forum

and here

Error in Batch-Modus: Execute failed: Cannot determine ID of local mountpoint - KNIME Analytics Platform - KNIME Community Forum

and here

Question about Wait Node - KNIME Analytics Platform - KNIME Community Forum

When I execute a CSV Reader node that is configured to read relative to the current workflow, everything runs smoothly in the GUI. When I execute the same workflow via the command line, I get the following error message:

ERROR	 KNIME-Worker-1-CSV Reader 3:1145 Node	 Execute failed: Cannot determine ID of local mountpoint
java.lang.IllegalStateException: Cannot determine ID of local mountpoint
	at org.knime.filehandling.core.fs.knime.local.relativeto.fs.LocalRelativeToWorkflowFSConnection.lambda$0(LocalRelativeToWorkflowFSConnection.java:98)
	at java.base/java.util.Optional.orElseThrow(Unknown Source)
	at org.knime.filehandling.core.fs.knime.local.relativeto.fs.LocalRelativeToWorkflowFSConnection.<init>(LocalRelativeToWorkflowFSConnection.java:98)
	at org.knime.filehandling.core.fs.knime.relativeto.RelativeToWorkflowFSDescriptorProvider.getActualFSConnection(RelativeToWorkflowFSDescriptorProvider.java:109)
	at org.knime.filehandling.core.connections.DefaultFSConnectionFactory.createRelativeToConnection(DefaultFSConnectionFactory.java:156)
	at org.knime.filehandling.core.connections.DefaultFSConnectionFactory.createRelativeToConnection(DefaultFSConnectionFactory.java:142)
	at org.knime.filehandling.core.defaultnodesettings.FileSystemHelper.retrieveFSConnection(FileSystemHelper.java:123)
	at org.knime.filehandling.core.defaultnodesettings.filechooser.AbstractFileChooserPathAccessor.getConnection(AbstractFileChooserPathAccessor.java:159)
	at org.knime.filehandling.core.defaultnodesettings.filechooser.AbstractFileChooserPathAccessor.initializeFileSystem(AbstractFileChooserPathAccessor.java:166)
	at org.knime.filehandling.core.defaultnodesettings.filechooser.AbstractFileChooserPathAccessor.getOutputPath(AbstractFileChooserPathAccessor.java:183)
	at org.knime.filehandling.core.defaultnodesettings.filechooser.AbstractFileChooserPathAccessor.getRootPath(AbstractFileChooserPathAccessor.java:316)
	at org.knime.filehandling.core.defaultnodesettings.filechooser.AbstractFileChooserPathAccessor.getFSPaths(AbstractFileChooserPathAccessor.java:225)
	at org.knime.filehandling.core.node.table.reader.paths.PathSettings$1.getItems(PathSettings.java:105)
	at org.knime.filehandling.core.node.table.reader.TableReaderNodeModel.getPaths(TableReaderNodeModel.java:195)
	at org.knime.filehandling.core.node.table.reader.TableReaderNodeModel.execute(TableReaderNodeModel.java:158)
	at org.knime.core.node.NodeModel.executeModel(NodeModel.java:588)
	at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1286)
	at org.knime.core.node.Node.execute(Node.java:1049)
	at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:594)
	at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:98)
	at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:198)
	at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
	at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:367)
	at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:221)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
	at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

Can somebody clarify if I am doing something wrong or if this is indeed a bug? I am using KNIME 5.3.2, and the error happens when running KNIME on an Ubuntu server.

When I use the Mountpoint Connector as described in the posts above, it works if I choose LOCAL mountpoint, but it does NOT work when I use Current Mountpoint —> Set working directory to the current workflow.

What I am trying to achieve is reading a file in the folder above the workflow folder, which I cannot access via root, as there are deve, test and prod folders it could be in (meaning the workflow itself does not know which instance it belongs to, but gets that info from a folder above it in the file drive structure). Using LOCAL would not work, as in the moment of execution, I cannot specific an absolute path due to the system in that moment not knowing whether to go down the deve, test or prod folder line.

Happy for any input you can provide!

Best regards, Jan

@schuppius I think my answer back then still holds. Batch mode does not work well with relative or derived paths. You might have to submit a fixed path as a workflow variable.

A post was split to a new topic: KNIME Download Problem

Good morning mlauber, thank you for your reply!

I had hoped there would be some way to use relative paths, as fixed paths are not an option in this case. We’ll have to find a way to improvise, then.

Best regards,

Jan