corrupted lazy-load database

3,289 views
Skip to first unread message

drkf...@gmail.com

unread,
Mar 3, 2018, 1:55:27 AM3/3/18
to H2O Open Source Scalable Machine Learning - h2ostream
Hi guys,

I met message below:

> flights_train <- h2o.uploadFile(path = path1,
+ destination_frame = "flights_train",
+ parse = TRUE, header = TRUE,
+ sep = ",")
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = urlSuffix, :
Unexpected CURL error: Failed to connect to localhost port 54321: Connection refused

I searched online and thought it might be the version issue,

https://stackoverflow.com/questions/45510759/issue-installing-h2o-on-r

> install.packages("h2o”):
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/h2o_3.16.0.2.tgz

> install.packages("h2o", type="source",
+ repos="http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/2/R")
trying URL 'http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/2/R/src/contrib/h2o_3.18.0.2.tar.gz'

so I remove and reinstall it but now have:

> # Initialise the H2O cluster:
> library(h2o)
Error: package or namespace load failed for ‘h2o’ in get(Info[i, 1], envir = env):
lazy-load database '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/h2o/R/h2o.rdb' is corrupt

I also tried to install sparkling water during this week, not sure if it also causes the corruption.

1) What version of H2O are you using: h2o_3.18.0.2.
2) Specify the type of machine your using: i.e. OS X 10.13.3
3) Specify what language you are working in and what version: R version 3.4.3; R studio Version 1.1.414

Tom Kraljevic

unread,
Mar 3, 2018, 9:13:47 AM3/3/18
to drkf...@gmail.com, H2O Open Source Scalable Machine Learning - h2ostream

hi,

the lazy load database issue usually means you just need to restart rstudio.

tom

Sent from my iPhone
> --
> 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.

KFC

unread,
Mar 3, 2018, 12:51:42 PM3/3/18
to Tom Kraljevic, H2O Open Source Scalable Machine Learning - h2ostream
thanks, but it didn't work.

陳冠甫KFC

Sent from my iPhone

drkf...@gmail.com

unread,
Mar 4, 2018, 1:48:37 AM3/4/18
to H2O Open Source Scalable Machine Learning - h2ostream
After reinstall the h2o package, I sill have the original error message:

Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = urlSuffix, :
Unexpected CURL error: Failed to connect to localhost port 54321: Connection refused

But I found out I did not correctly use the “absolute” path. After adjust that, it worked!

Darren Cook

unread,
Mar 4, 2018, 3:57:08 AM3/4/18
to h2os...@googlegroups.com
> After reinstall the h2o package, I sill have the original error message:
>
> Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = urlSuffix, :
> Unexpected CURL error: Failed to connect to localhost port 54321: Connection refused
>
> But I found out I did not correctly use the “absolute” path. After adjust that, it worked!

In case anyone else has the same problems, can you expand on what you
did to fix it? I.e. how did you reinstall h2o, and where did you need to
use an absolute path? (Have you been starting h2o from h2o.init()
within an R session, or have you been starting it directly from the
commandline.)

BTW, the steps I still use for upgrading h2o are here:
http://darrendev.blogspot.co.uk/2016/08/h2o-upgrade-detailed-steps_9.html

(Notice I explicitly uninstall the previous package, before installing a
new version, though I'm not sure if that is essential.)

Darren

Kuan-Fu Chen

unread,
Mar 5, 2018, 1:11:03 AM3/5/18
to h2ostream H2O Open Source Scalable Machine Learning -
Hi Darren, 

# 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.
pkgs <- c("RCurl","jsonlite")
for (pkg in pkgs) {
 if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) }
}

# Now we download, install and initialize the h2o package for R.

install.packages("h2o", type="source",
                repos="http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/2/R”)

# finally the absolute path needs to be specified. 
path1 <- "~/Documents/Dropbox/ML_R_Feb18/data/flights_train.csv" 


flights_train <- h2o.uploadFile(path = path1,
                               destination_frame = "flights_train",

                               parse = TRUE, header = TRUE,
                               sep = ",")

--
You received this message because you are subscribed to a topic in the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2ostream/unOB5N1QeDU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2ostream+...@googlegroups.com.

Darren Cook

unread,
Mar 5, 2018, 2:45:34 AM3/5/18
to h2os...@googlegroups.com
For anyone who was following those instructions, remember there also
needs to be the `library(h2o)` and `h2o.init()` commands, after
installing, and before trying to load data.

And in case you are doing this all from an existing session, it is worth
starting with `h2o.shutdown()` (before you uninstall the previous
packages). (But, I prefer to make sure all my H2O-using R sessions are
shut down, then start a dedicated R session for the uninstall/install
steps.)

> # finally the absolute path needs to be specified.
> path1 <- "~/Documents/Dropbox/ML_R_Feb18/data/flights_train.csv"
>
> flights_train <- h2o.uploadFile(path = path1,
> destination_frame = "flights_train",
> parse = TRUE, header = TRUE,
> sep = ",")

(The last three are the defaults, by the way.)

The relative path is the directory your R session is in when you do the
h2o.init() command. If you've started H2O in another R session, or from
the commandline, then it is safest/required to use absolute paths.

Darren


--
Darren Cook, Software Researcher/Developer
My New Book: Practical Machine Learning with H2O:
http://shop.oreilly.com/product/0636920053170.do

ammubh...@gmail.com

unread,
May 16, 2019, 9:46:02 AM5/16/19
to H2O Open Source Scalable Machine Learning - h2ostream
Thanks restarting Rstudio worked for me !
Reply all
Reply to author
Forward
0 new messages