我无法从内部运行h2o。只需按照此页面上的R说明进行安装:http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/2/index.html。然后,
library(h2o)
h2o.init(nthreads = -1, max_mem_size = '2g', ip = "127.0.0.1")
h2o服务器无法启动:
H2O is not running yet, starting it now...
Note: In case of errors look at the following log files:
/var/folders/7y/p9rdbryd5zg5nvtjgdzyshx40000gt/T//RtmpvbbPTR/h2o_arman_started_from_r.out
/var/folders/7y/p9rdbryd5zg5nvtjgdzyshx40000gt/T//RtmpvbbPTR/h2o_arman_started_from_r.err
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
Starting H2O JVM and connecting: ............................................................Cannot load library from path lib/osx_64/libxgboost4j_gpu.dylib
Cannot load library from path lib/libxgboost4j_gpu.dylib
Failed to load library from both native path and jar!
Cannot load library from path lib/osx_64/libxgboost4j_omp.dylib
Cannot load library from path lib/libxgboost4j_omp.dylib
Failed to load library from both native path and jar!
Found XGBoost backend with library: xgboost4j_minimal
Your system supports only minimal version of XGBoost (no GPUs, no multithreading)!
----- H2O started -----
Build git branch: master
Build git hash: a0f976c49acfa9750b7887b1cda6408d298913f4
Build git describe: jenkins-master-4214
Build project version: 3.19.0.4215 (latest version: 3.18.0.2)
Build age: 16 hours and 15 minutes
Built by: 'jenkins'
Built on: '2018-02-26 07:35:56'
Watchdog Build git branch: (unknown)
Watchdog Build git hash: (unknown)
Watchdog Build git describe: (unknown)
Watchdog Build project version: (unknown)
Watchdog Built by: (unknown)
Watchdog Built on: (unknown)
XGBoost Build git branch: (unknown)
XGBoost Build git hash: (unknown)
XGBoost Build git describe: (unknown)
XGBoost Build project version: (unknown)
XGBoost Built by: (unknown)
XGBoost Built on: (unknown)
KrbStandalone Build git branch: (unknown)
KrbStandalone Build git hash: (unknown)
KrbStandalone Build git describe: (unknown)
KrbStandalone Build project version: (unknown)
KrbStandalone Built by: (unknown)
KrbStandalone Built on: (unknown)
Processed H2O arguments: [-name, H2O_started_from_R_arman_nbd116, -ip, 127.0.0.1, -port, 2341, -ice_root, /var/folders/7y/p9rdbryd5zg5nvtjgdzyshx40000gt/T//RtmpvbbPTR]
Java availableProcessors: 8
Java heap totalMemory: 245.5 MB
Java heap maxMemory: 1.78 GB
Java version: Java 1.8.0_111 (from Oracle Corporation)
JVM launch parameters: [-Xmx2g, -ea]
OS version: Mac OS X 10.13.1 (x86_64)
Machine physical memory: 16.00 GB
X-h2o-cluster-id: 1519649491546
User name: 'arman'
IPv6 stack selected: false
Network address/interface is not reachable in 150ms: /fe80:0:0:0:75d0:fa45:58ee:6f07%utun0/name:utun0 (utun0)
Network address/interface is not reachable in 150ms: /fe80:0:0:0:5448:2bff:fec7:2829%awdl0/name:awdl0 (awdl0)
Network address/interface is not reachable in 150ms: /fe80:0:0:0:1846:22ba:65a6:e16b%en0/name:en0 (en0)
Network address/interface is not reachable in 150ms: /192.168.0.9/name:en0 (en0)
Network address/interface is not reachable in 150ms: /fe80:0:0:0:0:0:0:1%lo0/name:lo0 (lo0)
Network address/interface is not reachable in 150ms: /0:0:0:0:0:0:0:1/name:lo0 (lo0)
Network address/interface is not reachable in 150ms: /127.0.0.1/name:lo0 (lo0)
IP address not found on this machine
[1] "127.0.0.1"
[1] 2341
[1] TRUE
[1] -1
[1] "Failed to connect to 127.0.0.1 port 2341: Connection refused"
[1] 0
Error in h2o.init(nthreads = -1, max_mem_size = "2g", ip = "127.0.0.1", :
H2O failed to start, stopping execution.
另一方面,我可以从终端
运行服务器java -jar /Users/arman/Library/R/3.4/library/h2o/java/h2o.jar
# Retrieved the location of jar file in R using h2o:::.h2o.downloadJar()
以上命令有效。我可以继续从终端运行,但是h2o.init提供了许多便利选项以及代码一致性。
为什么h2o无法从R初始化的任何想法?另外,从Python尝试并遇到了同样的问题。
操作系统:Mac OS X ver 10.13.1
java 版本“1.8.0_111” Java(TM)SE运行时环境(版本1.8.0_111-b14) Java HotSpot(TM)64位服务器VM(版本25.111-b14,混合模式)
h2o 版本:3.19.0.4215
R 版本:3.4.3
答案 0 :(得分:0)
您的示例中非常奇怪的是您没有在h2o.init()
中提及端口,但它已尝试从端口2341开始。
或者:
H2O_R_CMD_CHECK_DOC_EXAMPLES_PORT
。请尝试使用默认端口(54321)。
通常,当H2O不能在某个端口上启动时,这是因为某些东西已经在那里运行,或者是因为防火墙问题。鉴于它可以从命令行运行,我的猜测是R应用程序需要被授予访问所选端口上的localhost的权限。 (在Windows上,第一次尝试使用它时会弹出一个对话框; Mac是否会做类似的事情?)
答案 1 :(得分:0)
我意识到这是一篇老文章,但是在Arch Linux上也遇到了类似的问题。问题是我的主机文件(/etc/hosts
)不正确。我已经编写了它,以便通过以太网连接使用静态IP地址。但是在具有DHCP和非静态IP的wifi上,R中的h2o.init()显然试图获取并使用静态(错误的)IP地址。将/etc/hosts
更改为使用“ localhost”而不是固定IP地址即可解决此问题。