【问题标题】:Cannot start h2o无法启动 h2o
【发布时间】:2021-05-12 18:39:59
【问题描述】:

正如标题所说。我无法运行h20.init

我已经下载了Java SE Development Kit 8u291 的64 位版本。我还在 R (install.packages("xgboost")) 中下载了 xgboost 库。最后,我更新了我所有的 NVIDIA 驱动程序并下载了最新的 CUDA(虽然,我什至不知道那是做什么的)。我按照in the NVIDIA forums 描述的步骤来避免安装时发生的崩溃(即删除与 Visual Studio 的集成)。 FWIW 我使用的是DELL Inspiron 15 Gaming,它有一个 4GB 的 NVIDIA GTX 1050。

这是我正在使用的完整代码(直接来自h2o download instructions,第一行除外):

library(xgboost)
library(h2o)
localH2O = h2o.init()
demo(h2o.kmeans)

任何帮助将不胜感激。

运行上述代码块时得到的完整信息:

H2O is not running yet, starting it now...

Note:  In case of errors look at the following log files:
    C:\Users\<my username>\AppData\Local\Temp\RtmpcdvCce\file1a106074110b/h2o_<my username>_started_from_r.out
    C:\Users\<my username>\AppData\Local\Temp\RtmpcdvCce\file1a10253139db/h2o_<my username>_started_from_r.err

java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

Starting H2O JVM and connecting: ............................................................Diagnostic HTTP Request:
   HTTP Status Code: -1
HTTP Error Message: Failed to connect to localhost port 54321: Connection refused
Cannot load library from path lib/windows_64/xgboost4j_gpu.dll
Cannot load library from path lib/xgboost4j_gpu.dll
Failed to load library from both native path and jar!
Cannot load library from path lib/windows_64/xgboost4j_omp.dll
Cannot load library from path lib/xgboost4j_omp.dll
Failed to load library from both native path and jar!
Cannot load library from path lib/windows_64/xgboost4j_minimal.dll
Cannot load library from path lib/xgboost4j_minimal.dll
Failed to load library from both native path and jar!
Failed to add native path to the classpath at runtime
java.io.IOException: Failed to get field handle to set library path
    at ai.h2o.xgboost4j.java.NativeLibLoader.addNativeDir(NativeLibLoader.java:229)
    at ai.h2o.xgboost4j.java.NativeLibLoader.initXGBoost(NativeLibLoader.java:43)
    at ai.h2o.xgboost4j.java.NativeLibLoader.getLoader(NativeLibLoader.java:66)
    at hex.tree.xgboost.XGBoostExtension.initXgboost(XGBoostExtension.java:70)
    at hex.tree.xgboost.XGBoostExtension.isEnabled(XGBoostExtension.java:51)
    at water.ExtensionManager.isEnabled(ExtensionManager.java:189)
    at water.ExtensionManager.registerCoreExtensions(ExtensionManager.java:103)
    at water.H2O.main(H2O.java:2203)
    at water.H2OStarter.start(H2OStarter.java:22)
    at water.H2OStarter.start(H2OStarter.java:48)
    at water.H2OApp.main(H2OApp.java:12)
Cannot initialize XGBoost backend! Xgboost (enabled GPUs) needs: 
  - CUDA 8.0
XGboost (minimal version) needs: 
  - GCC 4.7+
For more details, run in debug mode: `java -Dlog4j.configuration=file:///tmp/log4j.properties -jar h2o.jar`


ERROR: Unknown argument (<my username>/AppData/Local/Temp/RtmpcdvCce)


Usage:  java [-Xmx<size>] -jar h2o.jar [options]
        (Note that every option has a default and is optional.)

    -h | -help
          Print this help.

    -version
          Print version info and exit.

    -name <h2oCloudName>
          Cloud name used for discovery of other nodes.
          Nodes with the same cloud name will form an H2O cloud
          (also known as an H2O cluster).

    -flatfile <flatFileName>
          Configuration file explicitly listing H2O cloud node members.

    -ip <ipAddressOfNode>
          IP address of this node.

    -port <port>
          Port number for this node (note: port+1 is also used by default).
          (The default port is 54321.)

    -network <IPv4network1Specification>[,<IPv4network2Specification> ...]
          The IP address discovery code will bind to the first interface
          that matches one of the networks in the comma-separated list.
          Use instead of -ip when a broad range of addresses is legal.
          (Example network specification: '10.1.2.0/24' allows 256 legal
          possibilities.)

    -ice_root <fileSystemPath>
          The directory where H2O spills temporary data to disk.

    -log_dir <fileSystemPath>
          The directory where H2O writes logs to disk.
          (This usually has a good default that you need not change.)

    -log_level <TRACE,DEBUG,INFO,WARN,ERRR,FATAL>
          Write messages at this logging level, or above.  Default is INFO.

    -max_log_file_size
          Maximum size of INFO and DEBUG log files. The file is rolled over after a specified size has been reached.
          (The default is 3MB. Minimum is 1MB and maximum is 99999MB)

    -flow_dir <server side directory or HDFS directory>
          The directory where H2O stores saved flows.
          (The default is 'C:\Users\<my username>\h2oflows'.)

    -nthreads <#threads>
          Maximum number of threads in the low priority batch-work queue.
          (The default is.)

    -client
          Launch H2O node in client mode.

    -notify_local <fileSystemPath>
          Specifies a file to write when the node is up. The file contains one line with the IP and
          port of the embedded web server. e.g. 192.168.1.100:54321

    -context_path <context_path>
          The context path for jetty.

Authentication options:

    -jks <filename>
          Java keystore file

    -jks_pass <password>
          (Default is 'h2oh2o')

    -jks_alias <alias>
          (Optional, use if the keystore has multiple certificates and you want to use a specific one.)

    -hostname_as_jks_alias
          (Optional, use if you want to use the machine hostname as your certificate alias.)

    -hash_login
          Use Jetty HashLoginService

    -ldap_login
          Use Jetty Ldap login module

    -kerberos_login
          Use Jetty Kerberos login module

    -spnego_login
          Use Jetty SPNEGO login service

    -pam_login
          Use Jetty PAM login module

    -login_conf <filename>
          LoginService configuration file

    -spnego_properties <filename>
          SPNEGO login module configuration file

    -form_auth
          Enables Form-based authentication for Flow (default is Basic authentication)

    -session_timeout <minutes>
          Specifies the number of minutes that a session can remain idle before the server invalidates
          the session and requests a new login. Requires '-form_auth'. Default is no timeout

    -internal_security_conf <filename>
          Path (absolute or relative) to a file containing all internal security related configurations

Cloud formation behavior:

    New H2O nodes join together to form a cloud at startup time.
    Once a cloud is given work to perform, it locks out new members
    from joining.

Examples:

    Start an H2O node with 4GB of memory and a default cloud name:
        $ java -Xmx4g -jar h2o.jar

    Start an H2O node with 6GB of memory and a specify the cloud name:
        $ java -Xmx6g -jar h2o.jar -name MyCloud

    Start an H2O cloud with three 2GB nodes and a default cloud name:
        $ java -Xmx2g -jar h2o.jar &
        $ java -Xmx2g -jar h2o.jar &
        $ java -Xmx2g -jar h2o.jar &

【问题讨论】:

  • 为了缩小范围,如果排除 library(xgboost) 行,H2O 是否有效? “端口 54321:连接被拒绝”可能表明您有防火墙阻止访问(或者您可能有一个弹出窗口询问权限?)。其余的听起来像 java 找不到 gpu 库。 (即您在这里交互时可能会遇到两个问题...)
  • P.S.参考docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html,你启动h2o jar没有问题吗?并且可以在您的浏览器中查看 Flow 吗?确保让 jar 在后台运行,因为这是您的 R 脚本将连接到的。
  • @DarrenCook 谢谢!不,即使没有那条线,它也不会运行。不,我没有防火墙。 java-gpu 库问题有什么好的解决办法吗?
  • 另外,不......我永远无法让它工作。我不知道如何启动 jar 文件 - 我只使用 R 并且我没有尝试过其他任何地方。
  • 首先对正常的 H2O 安装进行故障排除。如何启动 jar 文件的说明在您链接到的文档页面中。如果这不起作用,希望错误消息有帮助吗? “我没有防火墙”是指您明确关闭了 Windows 防火墙吗?我认为它总是默认运行?

标签: r h2o


【解决方案1】:

所以...经过大量的探索,我找到了答案。 Windows Defender ughhh 阻止了对 h2o.jar 的访问。解决方案是在 h2o java 文件夹上打开 PowerShell 并使用 java -jar h2o.jar 运行 h2o.jar。然后你会得到安全提示,要求你授权程序(我每次都必须这样做,所以你可能想检查你的设置)。一旦你这样做了h2o.init() 在 R 中运行非常顺利。

【讨论】:

    猜你喜欢
    • 2018-06-20
    • 2019-06-20
    • 2018-03-23
    • 1970-01-01
    • 1970-01-01
    • 2016-07-12
    • 1970-01-01
    • 1970-01-01
    • 2016-06-23
    相关资源
    最近更新 更多