我正在通过半年前创建的Amazon Ubuntu EC2 AMI使用H2O。它运作良好:需要时,我启动一个实例,在rstudio中启动H2O,转到流接口,做我的事情,然后再次关闭
但是当我尝试将H2O更新到最新版本时,我无法访问流程。一切似乎都可以在rstudio中使用,但不能正常运行。我怀疑Java,即使我要求最新的稳定版本,也要重新启动rstudio和/或H2O构建,这是最新的构建编号。可能有
我遵循此处的说明:
http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html#install-in-r
这是rstudio控制台
h2o.init()
H2O is not running yet, starting it now...
Note: In case of errors look at the following log files:
/tmp/RtmpKNp0jt/h2o_rstudio_started_from_r.out
/tmp/RtmpKNp0jt/h2o_rstudio_started_from_r.err
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
Starting H2O JVM and connecting: .......... Connection successful!
R is connected to the H2O cluster:
H2O cluster uptime: 22 seconds 380 milliseconds
H2O cluster timezone: Etc/UTC
H2O data parsing timezone: UTC
H2O cluster version: 3.21.0.4364
H2O cluster version age: 3 months and 13 days !!!
H2O cluster name: H2O_started_from_R_rstudio_urm169
H2O cluster total nodes: 1
H2O cluster total memory: 0.86 GB
H2O cluster total cores: 2
H2O cluster allowed cores: 2
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.4.2 (2017-09-28)
Warning message:
In h2o.clusterInfo() :
Your H2O cluster version is too old (3 months and 13 days)!
Please download and install the latest version from http://h2o.ai/download/
if(“ package:h2o”%in%search()){detach(“ package:h2o”,unload = TRUE)}
[1] "A shutdown has been triggered. "
if(“ h2o”%in%行名(installed.packages())){remove.packages(“ h2o”)}
Removing package from ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
pkgs <-c(“ RCurl”,“ jsonlite”) 用于(以pkg为单位的pkg){ + if(!(pkg%in%rownames(installed.packages()))){ install.packages(pkg)} +}
install.packages(“ h2o”,type =“ source”,repos =(c(“ http://h2o- release.s3.amazonaws.com/h2o/latest_stable_R“)))
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'http://h2o-release.s3.amazonaws.com/h2o/latest_stable_R
/src/contrib/h2o_3.23.0.4471.tar.gz'
Content type 'application/x-tar' length 120706169 bytes (115.1 MB)
==================================================
downloaded 115.1 MB
* installing *source* package ‘h2o’ ...
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (h2o)
The downloaded source packages are in
‘/tmp/RtmpKNp0jt/downloaded_packages’
图书馆(h2o)
Error: package or namespace load failed for ‘h2o’ in get(method, envir =
home):
lazy-load database '/home/rstudio/R/x86_64-pc-linux-gnu-
library/3.4/h2o/R/h2o.rdb' is corrupt
In addition: Warning message:
In get(method, envir = home) : internal error -3 in R_decompress1
由于错误消息,我通过rstudio中的菜单重新启动R
Restarting R session...
图书馆(h2o)
----------------------------------------------------------------------
Your next step is to start H2O:
> h2o.init()
For H2O package documentation, ask for help:
> ??h2o
After starting H2O, you can use the Web UI at http://localhost:54321
For more information visit http://docs.h2o.ai
----------------------------------------------------------------------
Attaching package: ‘h2o’
The following objects are masked from ‘package:stats’:
cor, sd, var
The following objects are masked from ‘package:base’:
||, &&, %*%, apply, as.factor, as.numeric, colnames, colnames<-, ifelse,
%in%,
is.character, is.factor, is.numeric, log, log10, log1p, log2, round, signif,
trunc
h2o.init()
H2O is not running yet, starting it now...
Note: In case of errors look at the following log files:
/tmp/RtmpMdVz9z/h2o_rstudio_started_from_r.out
/tmp/RtmpMdVz9z/h2o_rstudio_started_from_r.err
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
Starting H2O JVM and connecting: . Connection successful!
R is connected to the H2O cluster:
H2O cluster uptime: 1 seconds 744 milliseconds
H2O cluster timezone: Etc/UTC
H2O data parsing timezone: UTC
H2O cluster version: 3.23.0.4471
H2O cluster version age: 9 hours and 21 minutes
H2O cluster name: H2O_started_from_R_rstudio_rrc849
H2O cluster total nodes: 1
H2O cluster total memory: 0.86 GB
H2O cluster total cores: 2
H2O cluster allowed cores: 2
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.4.2 (2017-09-28)
从这里开始,H2O可在rstudio中工作,但流程不会开始。
有什么建议吗?
答案 0 :(得分:3)
我建议更新到最新版本3.20.2.1。然后初始化集群,使其不只绑定到本地主机:init(bind_to_localhost=False)
。当您从R或Python初始化H2O时,默认情况下该实例仅绑定到localhost,这意味着您可以从RStudio访问它,因为它在服务器上运行,而不能通过Flow访问,因为这样您就可以从远程浏览器访问它。>
另一种选择是独立于命令行启动H2O。
请注意,如果您不只将H2O绑定到本地主机,那么任何可以访问端口和网络接口的人都可以访问它,这可能带来很大的安全漏洞(暴露数据,模型等)。 / p>