1

I've successfully run h2o from R on a linux machine and wanted to install it in Windows too. h2o will not initialise for me. The full output is pasted below but the key seems to be the line

[1] "Failed to connect to 127.0.0.1 port 54321: Connection refused"
curl: (1) Protocol "'http" not supported or disabled in libcurl

Judging from this and this experience it might be something to do with single quotes v double quotes somewhere; but this seems unlikely because then no-one would be able to get h2o / R / Windows combination working and I gather that some people are. On the other hand, this question seems to suggest the problem will be that my curl installation may not have ssl enabled. So I downloaded curl from scratch from this wizard as recommended on the h2o page, selecting the 64 bit version, generic, and selected the version with both SSL and SSH enabled; downloaded it and added the folder it ended up in to my Windows PATH. But no difference.

I've just noticed my Java runtime environment is old and will update that as well. But on the face of it it's not obvious that that could be the problem.

Any suggestions welcomed.

> library(h2o)

> h2o.init()

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

Note:  In case of errors look at the following log files:
    C:\Users\PETERE~1\AppData\Local\Temp\Rtmpa6G3WA/h2o_Peter_Ellis_started_from_r.out
    C:\Users\PETERE~1\AppData\Local\Temp\Rtmpa6G3WA/h2o_Peter_Ellis_started_from_r.err

java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

............................................................
ERROR: Unknown argument (Ellis_cns773)


Usage:  java [-Xmx<size>] -jar h2o.jar [options]
        (Note that every option has a default and is optional.)

    -h | -help
          Print this help.

    -version
          Print version info and exit.

    -name <h2oCloudName>
          Cloud name used for discovery of other nodes.
          Nodes with the same cloud name will form an H2O cloud
          (also known as an H2O cluster).

    -flatfile <flatFileName>
          Configuration file explicitly listing H2O cloud node members.

    -ip <ipAddressOfNode>
          IP address of this node.

    -port <port>
          Port number for this node (note: port+1 is also used).
          (The default port is 0.)

    -network <IPv4network1Specification>[,<IPv4network2Specification> ...]
          The IP address discovery code will bind to the first interface
          that matches one of the networks in the comma-separated list.
          Use instead of -ip when a broad range of addresses is legal.
          (Example network specification: '10.1.2.0/24' allows 256 legal
          possibilities.)

    -ice_root <fileSystemPath>
          The directory where H2O spills temporary data to disk.

    -log_dir <fileSystemPath>
          The directory where H2O writes logs to disk.
          (This usually has a good default that you need not change.)

    -log_level <TRACE,DEBUG,INFO,WARN,ERRR,FATAL>
          Write messages at this logging level, or above.  Default is INFO.

    -flow_dir <server side directory or HDFS directory>
          The directory where H2O stores saved flows.
          (The default is 'C:\Users\Peter Ellis\h2oflows'.)

    -nthreads <#threads>
          Maximum number of threads in the low priority batch-work queue.
          (The default is 99.)

    -client
          Launch H2O node in client mode.

Cloud formation behavior:

    New H2O nodes join together to form a cloud at startup time.
    Once a cloud is given work to perform, it locks out new members
    from joining.

Examples:

    Start an H2O node with 4GB of memory and a default cloud name:
        $ java -Xmx4g -jar h2o.jar

    Start an H2O node with 6GB of memory and a specify the cloud name:
        $ java -Xmx6g -jar h2o.jar -name MyCloud

    Start an H2O cloud with three 2GB nodes and a default cloud name:
        $ java -Xmx2g -jar h2o.jar &
        $ java -Xmx2g -jar h2o.jar &
        $ java -Xmx2g -jar h2o.jar &

[1] "127.0.0.1"
[1] 54321
[1] TRUE
[1] -1
[1] "Failed to connect to 127.0.0.1 port 54321: Connection refused"
curl: (1) Protocol "'http" not supported or disabled in libcurl
[1] 1
Error in h2o.init() : H2O failed to start, stopping execution.
In addition: Warning message:
running command 'curl 'http://localhost:54321'' had status 1 

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_New Zealand.1252  LC_CTYPE=English_New Zealand.1252    LC_MONETARY=English_New Zealand.1252
[4] LC_NUMERIC=C                         LC_TIME=English_New Zealand.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] h2o_3.6.0.8    statmod_1.4.22

loaded via a namespace (and not attached):
[1] tools_3.2.3     RCurl_1.95-4.7  jsonlite_0.9.19 bitops_1.0-6 
Community
  • 1
  • 1
Peter Ellis
  • 5,694
  • 30
  • 46
  • I hope to have a better answer for you soon, but in the meantime if you want to try to get around the issue, you can try starting the H2O cluster from the command line using `java -jar h2o.jar` and then using `h2o.init()` to just connect (rather than start & connect) to the H2O cluster. Not sure if that will resolve the issue or not, but might be worth a try. – Erin LeDell Jan 06 '16 at 04:15
  • Also, if this is not the version of Curl you downloaded, try this one: http://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi – Erin LeDell Jan 06 '16 at 04:19
  • Hi @Erin thanks - starting from the command line did the trick. I had to navigate to the folder with the h2o.jar file in it first. It came up with a security warning then ran fine, including connecting from R. – Peter Ellis Jan 06 '16 at 05:13
  • 1
    Peter, I have filed a bug report so that this will be fixed (which will allow you to start from R). https://0xdata.atlassian.net/browse/PUBDEV-2526 – Erin LeDell Jan 06 '16 at 19:44

1 Answers1

2

We pushed a fix to master for this issue: https://0xdata.atlassian.net/browse/PUBDEV-2526 If you want to try it out now you can build from master as follows:

git clone https://github.com/h2oai/h2o-3
cd h2o-3
./gradlew build -x test
R CMD INSTALL ./h2o-r/R/src/contrib/h2o_3.7.0.99999.tar.gz 

Or download the next nightly release tomorrow.

Erin LeDell
  • 8,704
  • 1
  • 19
  • 35
  • great, that will teach me for having a space in my user name! Just because Windows allows it doesn't make it a good idea. I wonder how many other applications this might cause problems with too. – Peter Ellis Jan 07 '16 at 05:12