Null Pointer Exception in File Reader

Hi,
recently we randomly get NullPointerExceptions when we are running workflows on the knime server. These Exceptions always come from File Reader Nodes, however not always from the same ones, so no particular file seems to be at fault.
Here are the log entries from three examples:

2020-03-08 10:00:59,319 : ERROR : KNIME-Worker-1660 : 67facfa5-6017-4b53-946a-7060f78b0a64 : FileTable : File Reader : 0:38 : I/O Error occurred while trying to open a stream to ‘knime://knime.mountpoint/<some_file.csv>’.
2020-03-08 10:00:59,334 : ERROR : KNIME-Worker-1660 : 67facfa5-6017-4b53-946a-7060f78b0a64 : Node : File Reader : 0:38 : Execute failed: (“NullPointerException”): null
java.lang.NullPointerException
at org.knime.base.node.io.filereader.FileReaderNodeModel$1.runFinal(FileReaderNodeModel.java:194)
at org.knime.base.node.io.filereader.FileReaderNodeModel.execute(FileReaderNodeModel.java:244)
at org.knime.core.node.NodeModel.execute(NodeModel.java:733)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:567)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1192)
at org.knime.core.node.Node.execute(Node.java:979)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
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-03-08 10:01:00,334 : WARN : KNIME-Worker-1660 : 67facfa5-6017-4b53-946a-7060f78b0a64 : Node : File Reader : 0:38 : Can’t access ‘knime://knime.mountpoint/<some_file.csv>’. (Read timed out)

2020-03-09 09:55:58,991 : ERROR : KNIME-Worker-1709 : c8eac2d0-e3b9-4ebd-9f5b-13a43ddb46e6 : FileTable : File Reader : 0:90 : I/O Error occurred while trying to open a stream to ‘knime://knime.mountpoint/<some_other_file.csv>’.
2020-03-09 09:55:58,991 : ERROR : KNIME-Worker-1709 : c8eac2d0-e3b9-4ebd-9f5b-13a43ddb46e6 : Node : File Reader : 0:90 : Execute failed: (“NullPointerException”): null
java.lang.NullPointerException
at org.knime.base.node.io.filereader.FileReaderNodeModel$1.runFinal(FileReaderNodeModel.java:194)
at org.knime.base.node.io.filereader.FileReaderNodeModel.execute(FileReaderNodeModel.java:244)
at org.knime.core.node.NodeModel.execute(NodeModel.java:733)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:567)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1192)
at org.knime.core.node.Node.execute(Node.java:979)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
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-03-09 09:56:00,022 : WARN : KNIME-Worker-1709 : c8eac2d0-e3b9-4ebd-9f5b-13a43ddb46e6 : Node : File Reader : 0:90 : Can’t access ‘knime://knime.mountpoint/<some_other_file.csv>’. (Read timed out)

2020-03-09 10:25:01,710 : ERROR : KNIME-Worker-1764 : 6fb2e3b0-989d-4dcb-81ed-add143433754 : FileTable : File Reader : 4:38 : I/O Error occurred while trying to open a stream to ‘knime://<some_3rd_file.csv>’.
2020-03-09 10:25:01,710 : ERROR : KNIME-Worker-1764 : 6fb2e3b0-989d-4dcb-81ed-add143433754 : Node : File Reader : 4:38 : Execute failed: (“NullPointerException”): null
java.lang.NullPointerException
at org.knime.base.node.io.filereader.FileReaderNodeModel$1.runFinal(FileReaderNodeModel.java:194)
at org.knime.base.node.io.filereader.FileReaderNodeModel.execute(FileReaderNodeModel.java:244)
at org.knime.core.node.NodeModel.execute(NodeModel.java:733)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:567)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1192)
at org.knime.core.node.Node.execute(Node.java:979)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
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-03-09 10:25:02,710 : WARN : KNIME-Worker-1764 : 6fb2e3b0-989d-4dcb-81ed-add143433754 : Node : File Reader : 4:38 : Can’t access ‘knime://knime.mountpoint/knime://<some_3rd_file.csv>’. (Read timed out)

Is this a bug or a known problem?

Thanks,
brni

Hi @brni,

a few questions to understand the issue a bit better.

  • What do you mean with “recently”? Did you update KNIME? And did the workflow with the same files ran through before?
  • Does this not happen when ran locally?
  • Could you by any chance provide as a file or maybe a workflow so that we could reproduce it?

Thank you for reporting this!

Simon

1 Like

Hi,
No, we have not updated the server recently and also the workflow did not change, but the issue exists for a few days now.
The workflow reads data from a bunch of large csv files (>100MB). I suspect, that the files grew larger over time, but I do not know this for sure.
I have not observed this behaviour locally yet. The problem seems to occur only, when the worklow is started on the server. It does not occur everytime and not always on the same file reader.
Unfortunately I cannot provide the workflow or the input files because of the data protection regulations of my company. I am currently trying to minimize the issue to something, I can share.

Hello @brni,
as the workflows are loaded via the knime:// protocol they may be retrieved from the server via HTTP. Here the file size may cause the server to respond too slowly. Could you try increasing the maximum amount of main memory the server is allowed to consume? In your KNIME Server installation directory, you find a folder apache-tomee-plus-x.x.x/bin and in there there should be a file called setenv.sh. In this file, there is a line export CATALINA_OPTS="-Xmx2048M -server" and this tells the KNIME Server to use 2 GB of memory. Could you stop your server for a moment and change this to export CATALINA_OPTS="-Xmx4096M -server"? After starting the server again your problem may be gone.
Kind regards
Alexander

3 Likes

Hi @brni,
Were you able to resolve the issue in the meantime? Please let me know if you still have problems with the server. I am happy to help!
Kind regards
Alexander

1 Like

Hi,
i increased the amount of memory available to the knime server as you suggested. Since the problem did not occur everytime, i decided to wait for a few days before reporting any results here.

However, since the change everything seems to be working consistently as it should.
I have now marked your suggested fix as a sollution.

Thanks again for your help,
brni

4 Likes

Perfect, thanks for reporting back!

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