Unable to initialize h2o instance

366 views
Skip to first unread message

Andrew Agrimson

unread,
Aug 21, 2015, 11:11:05 PM8/21/15
to H2O Open Source Scalable Machine Learning - h2ostream

Hello,

I'm trying to get started with h2o on my Windows 7 laptop with R. I'm using the R download code provided on the website verbatim. Everything seems to install properly, but when I run the last line to initialize ( localH2O = h2o.init() ) nothing happens and the R session just "hangs" indefinitely. 

Does anybody have any suggestions to remedy this issue?

Install R code from website I'm running:

# The following two commands remove any previously installed H2O packages for R.
if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }

# Next, we download packages that H2O depends on.
if (! ("methods" %in% rownames(installed.packages()))) { install.packages("methods") }
if (! ("statmod" %in% rownames(installed.packages()))) { install.packages("statmod") }
if (! ("stats" %in% rownames(installed.packages()))) { install.packages("stats") }
if (! ("graphics" %in% rownames(installed.packages()))) { install.packages("graphics") }
if (! ("RCurl" %in% rownames(installed.packages()))) { install.packages("RCurl") }
if (! ("rjson" %in% rownames(installed.packages()))) { install.packages("rjson") }
if (! ("tools" %in% rownames(installed.packages()))) { install.packages("tools") }
if (! ("utils" %in% rownames(installed.packages()))) { install.packages("utils") }

# Now we download, install and initialize the H2O package for R.
install.packages("h2o", type="source", repos=(c("http://h2o-release.s3.amazonaws.com/h2o/rel-simons/7/R")))

library(h2o)

localH2O = h2o.init()

Thanks,
Andy


Tom Kraljevic

unread,
Aug 21, 2015, 11:22:15 PM8/21/15
to Andrew Agrimson, H2O Open Source Scalable Machine Learning - h2ostream

What does it say in the files that are printed in the “In case of errors” output?

Alternatively, you can start h2o yourself by hand from a command shell.
java -jar h2o.jar

Then h2o.init() will connect to the already running h2o instead of trying to start it.

Tom


> h2o.init()

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

Note:  In case of errors look at the following log files:
    /var/folders/tt/g5d7cr8d3fg84jmb5jr9dlrc0000gn/T//RtmpSBwX7I/h2o_tomk_started_from_r.out
    /var/folders/tt/g5d7cr8d3fg84jmb5jr9dlrc0000gn/T//RtmpSBwX7I/h2o_tomk_started_from_r.err


--
You received this message because you are subscribed to the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Agrimson

unread,
Aug 23, 2015, 8:46:28 AM8/23/15
to H2O Open Source Scalable Machine Learning - h2ostream

Thanks for the suggestion, unfortunately those files aren't being created so it appears that it doesn't even get to the stage of an error.

Your other suggestion of starting it in the command shell with java -jar h2o.jar also did not work. It's difficult to interpret all of the output but I think the issue may be with the path.

At the very end is this message:

"Exception in thread "main" java.lang.RuntimeException: Invalid flow_dir: ...... Illegal Character at index 13:....."

Index 13 is a space which is a problem apparently. I suppose I will try to change the location of the R installation.

Andy

Andrew Agrimson

unread,
Aug 31, 2015, 9:20:15 AM8/31/15
to H2O Open Source Scalable Machine Learning - h2ostream
Hello,

I was able to track down the error file when attempting initialize h2o with h2o.init() and it says this:


Exception in thread "main" java.lang.RuntimeException: Invalid flow_dir: C:/Users/Andy Agrimson/h2oflows, Illegal character in path at index 13: C:/Users/Andy Agrimson/h2oflows
at water.H2O.main(H2O.java:1630)
at water.H2OStarter.start(H2OStarter.java:18)
at water.H2OApp.main(H2OApp.java:5)


The folder "C:/Users/Andy Agrimson/h2oflows" doesn't exist anywhere that I can see so I'm not sure what to do about this. 

Does anybody have any suggestions?

Thanks,
Andy


On Friday, August 21, 2015 at 10:11:05 PM UTC-5, Andrew Agrimson wrote:

Andrew Agrimson

unread,
Aug 31, 2015, 3:28:02 PM8/31/15
to H2O Open Source Scalable Machine Learning - h2ostream

Hello,

After digging through previous posts I found one that addresses the exact same issue :  https://groups.google.com/forum/#!topic/h2ostream/m-Usn9R1Tkg.

It appears the the -flow_dir option allows you to change the default flows directory from the command line. 

I have two questions that I was hoping someone could answer:

1) is it possible to change this from the R interface? I've looked through the functions and I don't see anything related, but I may have missed it.

2) How exactly do I change this from the the command prompt? When I try " java -flow_dir <anypath>" I get an error stating "unrecognized option: -flow_dir"

I very, very rarely use the command prompt so I'm sure I'm doing something obviously wrong, can someone point me in the right direction?

Thanks,
Andy 




On Friday, August 21, 2015 at 10:11:05 PM UTC-5, Andrew Agrimson wrote:

Tom Kraljevic

unread,
Aug 31, 2015, 5:28:27 PM8/31/15
to Andrew Agrimson, H2O Open Source Scalable Machine Learning - h2ostream

> 2) How exactly do I change this from the the command prompt? When I try " java -flow_dir <anypath>" I get an error stating "unrecognized option: -flow_dir”


java -jar h2o.jar -flow_dir /your/flow/dir


Tom

Andrew Agrimson

unread,
Aug 31, 2015, 7:05:21 PM8/31/15
to H2O Open Source Scalable Machine Learning - h2ostream
Thanks, that worked!

I take it that there's no way to do that from R?


On Friday, August 21, 2015 at 10:11:05 PM UTC-5, Andrew Agrimson wrote:

Tom Kraljevic

unread,
Aug 31, 2015, 7:22:13 PM8/31/15
to Andrew Agrimson, H2O Open Source Scalable Machine Learning - h2ostream

Hi Andrew,

Unfortunately, there isn’t any way to do this right now directly from R.
But I filed a JIRA to record the original issue for you.


Thanks,
Tom


Reply all
Reply to author
Forward
0 new messages