Error with H2O in R - unable to connect to localhost

I cannot get h2o to work in my R. It shows the following error. Do not understand what this means. This used to give me an error, because I did not have a version on the 64-bit version of Java. I booted a 64-bit rebooted computer - and started the process again, and now it gives me this error.

Any suggestions?

library(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': %*%, %in%, &&, ||, apply, as.factor, as.numeric, colnames, colnames<-, ifelse, is.character, is.factor, is.numeric, log, log10, log1p, log2, round, signif, trunc > h2o.init(nthreads = -1) H2O is not running yet, starting it now... Note: In case of errors look at the following log files: C:\Users\ADM_MA~1\AppData\Local\Temp\RtmpygK1EJ/h2o_Adm_Mayur_started_from_r.out C:\Users\ADM_MA~1\AppData\Local\Temp\RtmpygK1EJ/h2o_Adm_Mayur_started_from_r.err java version "9" Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode) Starting H2O JVM and connecting: ............................................................ [1] "localhost" [1] 54321 [1] TRUE [1] -1 [1] "Failed to connect to localhost port 54321: Connection refused" [1] 127 Error in h2o.init(nthreads = -1) : H2O failed to start, stopping execution. In addition: Warning message: running command 'curl 'http://localhost:54321'' had status 127 

Screenshot for h2o error in R

+5
source share
2 answers

Based on the error message and troubleshooting that we performed in the comments, it seems that you are using a version of Java (Java 1.9) that is too new for your version of H2O.

It seems that you have 2 options:

  • Make sure your version of H2O is updated. If not, update it.
  • Download a compatible version of Java, i.e. Java 1.8 (you can just use it for this 1 task, and not for everything if you want)

Please note that the main page of the H2O v3 documentation says:

Java 7 or later. Note: Java 9 is not yet released and is currently not supported.

But at the same time, they usually have several development branches Beta and Alpha, so you can find one of those that works with Java 9.

+6
source

So, if someone else is facing the same problem.

My recommendation (after spending more than 10 hours trying to figure it out (worth mentioning)), check your version of java.

If it is above 8, then either he removes it.

I deleted it because I did not want to deal with setting up the JAVA Home function in R and reducing the work.

Make sure you install Java 7 or 8, but the 64-bit version. h2o does not work if you have 32 bits.

Then voila! Just go ahead and type install.package('h2o') into your rstudio.

I wanted to be especially careful in my last attempt at this so unloaded and uninstalled library, because I installed it before and then installed it again, then downloaded using library(h2o) and then h20.init() worked fine.

+2
source

Source: https://habr.com/ru/post/1272080/


All Articles