【问题标题】:Can't start H2O in R: Error in h2o.init() H2O failed to start, stopping execution无法在 R 中启动 H2O:h2o.init() 中的错误 H2O 无法启动,停止执行
【发布时间】:2019-06-20 04:14:15
【问题描述】:

我正在尝试在带有 R 3.5.0 的 RHEL 6.7 服务器上使用 H2O。 这就是我在使用library(h2o) 加载包后发出h2o.init() 命令时发生的情况:

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

Note:  In case of errors look at the following log files:
    /tmp/Rtmp0k66FQ/h2o_enrico_started_from_r.out
    /tmp/Rtmp0k66FQ/h2o_enrico_started_from_r.err

java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Starting H2O JVM and connecting: ............................................................Cannot load library from path lib/linux_64/libxgboost4j_gpu.so
Cannot load library from path lib/libxgboost4j_gpu.so
Failed to load library from both native path and jar!
Cannot load library from path lib/linux_64/libxgboost4j_omp.so
Cannot load library from path lib/libxgboost4j_omp.so
Failed to load library from both native path and jar!
01-26 17:06:39.858 127.0.0.1:54321       83682  main      INFO: Found XGBoost backend with library: xgboost4j_minimal
01-26 17:06:39.958 127.0.0.1:54321       83682  main      INFO: Your system supports only minimal version of XGBoost (no GPUs, no multithreading)!
01-26 17:06:39.959 127.0.0.1:54321       83682  main      INFO: ----- H2O started  -----
01-26 17:06:39.959 127.0.0.1:54321       83682  main      INFO: Build git branch: rel-xu
01-26 17:06:39.959 127.0.0.1:54321       83682  main      INFO: Build git hash: 3ad2470fdea521c2d6fb3aa31d8c766042bdb992
01-26 17:06:39.959 127.0.0.1:54321       83682  main      INFO: Build git describe: jenkins-master-4525-7-g3ad2470
01-26 17:06:39.959 127.0.0.1:54321       83682  main      INFO: Build project version: 3.22.1.1
01-26 17:06:39.960 127.0.0.1:54321       83682  main      INFO: Build age: 29 days
01-26 17:06:39.960 127.0.0.1:54321       83682  main      INFO: Built by: 'jenkins'
01-26 17:06:39.960 127.0.0.1:54321       83682  main      INFO: Built on: '2018-12-28 14:04:50'
01-26 17:06:39.969 127.0.0.1:54321       83682  main      INFO: Watchdog Build git branch: (unknown)
01-26 17:06:39.969 127.0.0.1:54321       83682  main      INFO: Watchdog Build git hash: (unknown)
01-26 17:06:39.973 127.0.0.1:54321       83682  main      INFO: Watchdog Build git describe: (unknown)
01-26 17:06:39.973 127.0.0.1:54321       83682  main      INFO: Watchdog Build project version: (unknown)
01-26 17:06:39.973 127.0.0.1:54321       83682  main      INFO: Watchdog Built by: (unknown)
01-26 17:06:39.973 127.0.0.1:54321       83682  main      INFO: Watchdog Built on: (unknown)
01-26 17:06:39.973 127.0.0.1:54321       83682  main      INFO: XGBoost Build git branch: (unknown)
01-26 17:06:39.973 127.0.0.1:54321       83682  main      INFO: XGBoost Build git hash: (unknown)
01-26 17:06:39.974 127.0.0.1:54321       83682  main      INFO: XGBoost Build git describe: (unknown)
01-26 17:06:39.974 127.0.0.1:54321       83682  main      INFO: XGBoost Build project version: (unknown)
01-26 17:06:39.974 127.0.0.1:54321       83682  main      INFO: XGBoost Built by: (unknown)
01-26 17:06:39.975 127.0.0.1:54321       83682  main      INFO: XGBoost Built on: (unknown)
01-26 17:06:39.975 127.0.0.1:54321       83682  main      INFO: KrbStandalone Build git branch: (unknown)
01-26 17:06:39.976 127.0.0.1:54321       83682  main      INFO: KrbStandalone Build git hash: (unknown)
01-26 17:06:39.976 127.0.0.1:54321       83682  main      INFO: KrbStandalone Build git describe: (unknown)
01-26 17:06:39.976 127.0.0.1:54321       83682  main      INFO: KrbStandalone Build project version: (unknown)
01-26 17:06:39.976 127.0.0.1:54321       83682  main      INFO: KrbStandalone Built by: (unknown)
01-26 17:06:39.976 127.0.0.1:54321       83682  main      INFO: KrbStandalone Built on: (unknown)
01-26 17:06:39.976 127.0.0.1:54321       83682  main      INFO: Processed H2O arguments: [-name, H2O_started_from_R_enrico_kcp980, -ip, localhost, -web_ip, localhost, -port, 54321, -ice_r
oot, /tmp/Rtmp0k66FQ]
01-26 17:06:39.977 127.0.0.1:54321       83682  main      INFO: Java availableProcessors: 32
01-26 17:06:39.977 127.0.0.1:54321       83682  main      INFO: Java heap totalMemory: 1.92 GB
01-26 17:06:39.977 127.0.0.1:54321       83682  main      INFO: Java heap maxMemory: 26.67 GB
01-26 17:06:39.977 127.0.0.1:54321       83682  main      INFO: Java version: Java 1.8.0_20 (from Oracle Corporation)
01-26 17:06:39.981 127.0.0.1:54321       83682  main      INFO: JVM launch parameters: [-ea]
01-26 17:06:39.981 127.0.0.1:54321       83682  main      INFO: OS version: Linux 2.6.32-554.el6.x86_64 (amd64)
01-26 17:06:39.981 127.0.0.1:54321       83682  main      INFO: Machine physical memory: 757.37 GB
01-26 17:06:39.981 127.0.0.1:54321       83682  main      INFO: X-h2o-cluster-id: 1548518797511
01-26 17:06:39.982 127.0.0.1:54321       83682  main      INFO: User name: 'enrico'
01-26 17:06:39.982 127.0.0.1:54321       83682  main      INFO: IPv6 stack selected: false
01-26 17:06:39.982 127.0.0.1:54321       83682  main      INFO: Possible IP Address: ib0 (ib0), fe80:0:0:0:e61d:2d03:e1:4371%ib0
01-26 17:06:39.982 127.0.0.1:54321       83682  main      INFO: Possible IP Address: ib0 (ib0), 10.168.22.9
01-26 17:06:39.983 127.0.0.1:54321       83682  main      INFO: Possible IP Address: eth4 (eth4), fe80:0:0:0:a236:9fff:fe13:9594%eth4
01-26 17:06:39.983 127.0.0.1:54321       83682  main      INFO: Possible IP Address: eth4 (eth4), 10.168.16.15
01-26 17:06:39.984 127.0.0.1:54321       83682  main      INFO: Possible IP Address: eth0 (eth0), fe80:0:0:0:be30:5bff:fef6:9c14%eth0
01-26 17:06:39.984 127.0.0.1:54321       83682  main      INFO: Possible IP Address: eth0 (eth0), 10.168.8.9
01-26 17:06:39.984 127.0.0.1:54321       83682  main      INFO: Possible IP Address: lo (lo), 0:0:0:0:0:0:0:1%lo
01-26 17:06:39.984 127.0.0.1:54321       83682  main      INFO: Possible IP Address: lo (lo), 127.0.0.1
01-26 17:06:39.984 127.0.0.1:54321       83682  main      INFO: Selected H2O.CLOUD_MULTICAST_IF: name:lo (lo) doesn't support multicast
01-26 17:06:40.027 127.0.0.1:54321       83682  main      INFO: H2O node running in unencrypted mode.
01-26 17:06:40.038 127.0.0.1:54321       83682  main      INFO: Internal communication uses port: 54322
01-26 17:06:40.038 127.0.0.1:54321       83682  main      INFO: Listening for HTTP and REST traffic on http://127.0.0.1:54321/
01-26 17:06:40.040 127.0.0.1:54321       83682  main      INFO: H2O cloud name: 'H2O_started_from_R_enrico_kcp980' on localhost/127.0.0.1:54321, static configuration based on -flatfile null
01-26 17:06:40.041 127.0.0.1:54321       83682  main      INFO: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555):
01-26 17:06:40.041 127.0.0.1:54321       83682  main      INFO:   1. Open a terminal and run 'ssh -L 55555:localhost:54321 enrico@127.0.0.1'
01-26 17:06:40.041 127.0.0.1:54321       83682  main      INFO:   2. Point your browser to http://localhost:55555
01-26 17:06:41.838 127.0.0.1:54321       83682  main      INFO: Log dir: '/tmp/Rtmp0k66FQ/h2ologs'
01-26 17:06:41.838 127.0.0.1:54321       83682  main      INFO: Cur dir: '/home/enrico'
01-26 17:06:41.869 127.0.0.1:54321       83682  main      INFO: Subsystem for distributed import from HTTP/HTTPS successfully initialized
01-26 17:06:41.881 127.0.0.1:54321       83682  main      INFO: HDFS subsystem successfully initialized
01-26 17:06:41.887 127.0.0.1:54321       83682  main      INFO: S3 subsystem successfully initialized
01-26 17:06:41.946 127.0.0.1:54321       83682  main      INFO: GCS subsystem successfully initialized
01-26 17:06:41.947 127.0.0.1:54321       83682  main      INFO: Flow dir: '/home/enrico/h2oflows'
01-26 17:06:42.026 127.0.0.1:54321       83682  main      INFO: Cloud of size 1 formed [localhost/127.0.0.1:54321]
01-26 17:06:42.053 127.0.0.1:54321       83682  main      INFO: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV]
01-26 17:06:42.123 127.0.0.1:54321       83682  main      INFO: Watchdog extension initialized
01-26 17:06:42.123 127.0.0.1:54321       83682  main      INFO: XGBoost extension initialized
01-26 17:06:42.126 127.0.0.1:54321       83682  main      INFO: KrbStandalone extension initialized
01-26 17:06:42.126 127.0.0.1:54321       83682  main      INFO: Registered 3 core extensions in: 1099ms
01-26 17:06:42.126 127.0.0.1:54321       83682  main      INFO: Registered H2O core extensions: [Watchdog, XGBoost, KrbStandalone]
01-26 17:06:43.971 127.0.0.1:54321       83682  main      INFO: Registered: 169 REST APIs in: 1844ms
01-26 17:06:43.987 127.0.0.1:54321       83682  main      INFO: Registered REST API extensions: [XGBoost, Algos, AutoML, Core V3, Core V4]
01-26 17:06:46.023 127.0.0.1:54321       83682  main      INFO: Registered: 242 schemas in 2035ms
01-26 17:06:46.024 127.0.0.1:54321       83682  main      INFO: H2O started in 8483ms
01-26 17:06:46.024 127.0.0.1:54321       83682  main      INFO:
01-26 17:06:46.024 127.0.0.1:54321       83682  main      INFO: Open H2O Flow in your web browser: http://127.0.0.1:54321
01-26 17:06:46.024 127.0.0.1:54321       83682  main      INFO:
[1] "localhost"
[1] 54321
[1] FALSE
[1] 504
[1] ""
Error in h2o.init() : H2O failed to start, stopping execution.

标准输出日志文件显示与最后一个INFO 语句相同的信息(即:没有错误)并且错误日志文件完全为空。

任何帮助使其工作的帮助将不胜感激!我过去曾使用过 H2O,而且我是忠实粉丝。

谢谢!

【问题讨论】:

  • 我之前没有用过h2o,但是看起来可能是xgboost的安装有问题。 install page 包含专门针对 R 安装 GPU 支持的部分。由于您的错误以 Cannot load library from path lib/libxgboost4j_gpu.so 开头,也许这是首先要检查的内容?
  • @BrendanA.,不,xgboost 警告与 H2O 错误无关。 H2O 寻找 xgboost 库以使用 GPU 和多线程处理,如果它没有像这里那样找到它,它会使用最小的后备解决方案,请参见此处:docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/…

标签: r h2o


【解决方案1】:

原来是一个代理问题。 取消设置http_proxy环境变量允许R正确连接到H2O,即。:

library(h2o)
Sys.unsetenv("http_proxy")
h2o.init()

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

Note:  In case of errors look at the following log files:
    /tmp/RtmpqEIs7x/h2o_ferreen2_started_from_r.out
    /tmp/RtmpqEIs7x/h2o_ferreen2_started_from_r.err

java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Starting H2O JVM and connecting: . Connection successful!

R is connected to the H2O cluster: 
    H2O cluster uptime:         2 seconds 257 milliseconds 
    H2O cluster timezone:       Europe/Zurich 
    H2O data parsing timezone:  UTC 
    H2O cluster version:        3.22.1.1 
    H2O cluster version age:    1 month  
    H2O cluster name:           H2O_started_from_R_enrico_azr433 
    H2O cluster total nodes:    1 
    H2O cluster total memory:   26.67 GB 
    H2O cluster total cores:    32 
    H2O cluster allowed cores:  32 
    H2O cluster healthy:        TRUE 
    H2O Connection ip:          localhost 
    H2O Connection port:        54321 
    H2O Connection proxy:       NA 
    H2O Internal Security:      FALSE 
    H2O API Extensions:         XGBoost, Algos, AutoML, Core V3, Core V4 
    R Version:                  R version 3.5.0 (2018-04-23) 

【讨论】:

    【解决方案2】:

    实际上 H2O 确实从这里开始。提示在您的网络浏览器中打开 Flow 的消息是标志。

    但是 R 客户端无法到达 H2O 并决定放弃。

    底部的消息有一个 504。

    那是 HTTP 状态 504。这可能是 RHEL 防火墙阻止了端口 54321。您需要在防火墙中打开端口 54321。

    【讨论】:

    • 这听起来很合理,谢谢。我没有意识到 504 是一个 HTTP 错误代码。我会要求服务器管理员打开端口,看看是否可以修复它。会回来报告的。
    • 事实证明 iptables 没有运行,并且端口 54321 没有被阻塞。我可以使用 java -jar h2o.jar 启动 H2O 而没有错误,但我仍然收到网关超时错误(即:504),R 和浏览器都不会连接到它。还有其他想法吗?
    • 尝试禁用 SELinux。检查是否有代理设置,如果有,请为 localhost 关闭它们。这 100% 与您的环境配置有关。
    • 确实,这是一个代理问题,尽管它甚至可能是 H2O 中的一个错误。在另一个答案中发布了解决方案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-07
    • 2014-05-14
    • 2021-10-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多