【问题标题】:KNIME batch mode execution hangs/never returns (started from Java process)KNIME 批处理模式执行挂起/永不返回(从 Java 进程开始)
【发布时间】:2016-10-14 14:41:10
【问题描述】:

我正在使用 Java 的 batch mode 执行 KNIME 工作流。

输出似乎表明成功,但进程永远不会返回(我必须使用超时参数来杀死它)。

问题:有人知道为什么这个过程永远不会返回吗?

Executing [C:\Program Files\KNIME\KNIME.exe, -noexit, -nosplash, -nosave, -reset, -application, org.knime.product.KNIME_BATCH_APPLICATION, -workflowFile="C:\...\workflow.knwf", -workflow.variable=template.sdf,C:\...\template.sdf,String, --launcher.suppressErrors]  [main] at AntBuildLogger.messageLogged()
KNIME.exe stdout: CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot                            [Thread-2] at AntBuildLogger.messageLogged()
KNIME.exe stdout: INFO   main BatchExecutor  ===== Executing workflow C:\...\workflow.knwf =====  [Thread-2] at AntBuildLogger.messageLogged()
...
KNIME.exe stdout: INFO   main BatchExecutor  Workflow execution done Finished in 3 secs (3937ms)             [Thread-2] at AntBuildLogger.messageLogged()
KNIME.exe stdout: INFO   main BatchExecutor  ============= Workflow executed sucessfully ===============     [Thread-2] at AntBuildLogger.messageLogged()

我使用的是 Windows 10 和 KNIME 3.2.1。

我正在以编程方式使用 Ant Exec 任务,因此我非常确信所有输入/输出/错误 streams are handled correctly(我也在使用该代码来调用许多其他可执行文件)。

【问题讨论】:

  • 也许没有-noexit 参数?
  • 是的,非常感谢您发现这一点!请转换为答案。

标签: java knime


【解决方案1】:

这是由-noexit 参数引起的(手动启动时在Windows 上很有用),因为它会阻止在完成执行后关闭进程。

【讨论】:

    【解决方案2】:

    Windows 需要-consoleLog -noexit 来保持 DOS 窗口打开以查看控制台输出。测试 Knime 批处理运行后,您可以删除 -consoleLog -noexit 参数,这样它就不会在等待用户退出进程时挂起。

    要查看其他选项,您可以在 DOS 窗口中运行以下命令。 knime.exe -consoleLog -noexit -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多