title: Error with H2O in R - can't connect to local host
body: <p>I can't get the h2o to work in my R. It shows the following error. Have no clue what it means. Previously it gave me an error because I didn't have Java 64 bit version. I downloaded the 64bit - restarted my pc - and started the process again and now it gives me this error.</p>
  
  <p>Any suggestions? </p>
  
  <pre><code>library(h2o)
  
  ----------------------------------------------------------------------
  
  Your next step is to start H2O:
      &gt; h2o.init()
  
  For H2O package documentation, ask for help:
      &gt; ??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%, &amp;&amp;, ||, apply, as.factor, as.numeric, colnames, colnames&lt;-, ifelse,
      is.character, is.factor, is.numeric, log, log10, log1p, log2, round, signif, trunc
  
  &gt; 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 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Qu7AN.jpg" rel="noreferrer">Screenshot for h2o error in R</a></p>