Mac OS X Yosemite RStudio R H2O Impossible to connectio to localhost 54231

332 views
Skip to first unread message

chmil swann

unread,
Oct 9, 2017, 11:59:09 AM10/9/17
to h2os...@googlegroups.com

Hello,


I've been trying for two days to make H2O works on my MacBook pro 13 inches 64bits of 2009.


Environment:

Computer: MacBook pro 13 inches 64bits of 2009

OS: Yosemite

Softwares:

RStudio version: 1.0.153

R version 3.3.1

Java 8


I tried both

H2o: 3.14.0.3 and the 3.15.xxx


I have the very same issue when I try to run h2o.init() it gives me a

"curl: (7) failed to connect to locahost port 54231: Connection refused"


I checked and firewall is off and even when activcated the behavior is the same.


It's maybe stupid but I can't find anything on it and I don't find any solution.


Please note that I installed H2o on my 2 pcs (Windows 10, Rstudio, R etc..) and it works normally.

Just on my Mac it doesn't work.


Please advice


Regards,

Swann

Tom Kraljevic

unread,
Oct 9, 2017, 12:37:55 PM10/9/17
to chmil swann, h2os...@googlegroups.com

Try updating to a recent Java 7 or Java 8 (but not Java 9, that isn’t supported yet).

Tom


-- 
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.

chmil swann

unread,
Oct 9, 2017, 12:54:39 PM10/9/17
to Tom Kraljevic, h2os...@googlegroups.com
Thank you Tom 

it works.

It was in reality an issue with authorizing the apps to run. So the Java -jar h2o.jar was triggering an exception and I had to accept it in the privacy / general section of the system preference and boom, it worked!

Well noted for java 9.

Thank you,
Swann

Darren Cook

unread,
Oct 9, 2017, 12:58:28 PM10/9/17
to h2os...@googlegroups.com
>> I have the very same issue when I try to run h2o.init() it gives me a
>> /"curl: (7) failed to connect to locahost port 54231: Connection refused"/

What is the output before that error message? (It should be saying
something about how it is starting h2o?)

It might be worth starting h2o from the commandline first, before
running h2o.init() from R. See
http://docs.h2o.ai/h2o/latest-stable/h2o-docs/starting-h2o.html#from-the-command-line

That way you could experiment with different port or IP addresses, to
see if that makes any difference.

Darren

carmelo

unread,
Oct 16, 2017, 9:59:24 PM10/16/17
to H2O Open Source Scalable Machine Learning - h2ostream
Chmil,
I have the same issue.

I have verified that Java v8 is installed on my system. Still when I try to init.h2o() looks like the system doesn't recognize the presence of Java and is prompting me with installing: 

here is the complete message I get:

> h2o.init()

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

Note:  In case of errors look at the following log files:
    /var/folders/w1/84s4g7p50b7cfs2r96dfhlsc0000gq/T//Rtmp3tnjWY/h2o_carmelo_started_from_r.out
    /var/folders/w1/84s4g7p50b7cfs2r96dfhlsc0000gq/T//Rtmp3tnjWY/h2o_carmelo_started_from_r.err

No Java runtime present, requesting install.

Starting H2O JVM and connecting: ............................................................ 
[1] "localhost"
[1] 54321
[1] TRUE
[1] -1
[1] "Failed to connect to localhost port 54321: Connection refused"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 54321: Connection refused
[1] 7
Error in h2o.init() : H2O failed to start, stopping execution.
In addition: Warning message:
running command ''/usr/bin/java' -version 2>&1' had status 1 


How did you manage to change the settings for authorizing the app? 
Could you guide me through please?

thanks
carmelo

Erin LeDell

unread,
Oct 17, 2017, 2:04:50 PM10/17/17
to carmelo, H2O Open Source Scalable Machine Learning - h2ostream
-- 
Erin LeDell Ph.D.
Statistician & Machine Learning Scientist | H2O.ai

carmelo

unread,
Oct 17, 2017, 6:10:43 PM10/17/17
to H2O Open Source Scalable Machine Learning - h2ostream
thanks.
I had the wrong version of Java indeed ...

thanks
Carmelo

chaita...@gmail.com

unread,
Jan 19, 2018, 8:46:21 PM1/19/18
to H2O Open Source Scalable Machine Learning - h2ostream
Hi Erin,

I have tried the workaround in the link shared by you. I still get the same error. I am using java version 8.

Thanks
Message has been deleted

nike...@gmail.com

unread,
Jul 5, 2018, 12:53:59 PM7/5/18
to H2O Open Source Scalable Machine Learning - h2ostream
Hello guys, I am having the same issue as well. Even I have the java 8 installed in my machine. not sure why...

Erin LeDell

unread,
Jul 5, 2018, 4:34:54 PM7/5/18
to nike...@gmail.com, H2O Open Source Scalable Machine Learning - h2ostream

Please fully document your issue and attach logs if you can.

Reminder

Notice to h2ostream users: 
For every post please provide the following at the top of your post:


1) What version of H2O are you using.
2) Specify the type of machine your using (i.e. OS X 10.11.4, Windows 10, etc).
3) Specify what language you are working in and what version (i.e. Python 2.7, Spark 1.6.1, etc)
4) The code you were executing when you received an error message (please provide a reproducible example if possible).

5) Copy and paste in your error message.
6) Type of data you are using (if applicable).

On 7/5/18 9:53 AM, nike...@gmail.com wrote:
Hello guys, I am having the same issue as well.  Even I have the java 8 installed in my machine.  not sure why...


-- 
Erin LeDell, Ph.D.
Chief Machine Learning Scientist | H2O.ai

simon.r...@gmail.com

unread,
Jul 27, 2018, 10:27:54 AM7/27/18
to H2O Open Source Scalable Machine Learning - h2ostream

I had the same problem but it required a different solution. Thought this might be useful
The Version of Java on my machine was up to date (V8).
But I eventually noticed that while trying to initiate h20, R reported that it was loading an earlier version of Java (7). So I didn't have the latest version after all.
I went to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and downloaded the Java Development SE Kit 8.
Problem solved.

Reply all
Reply to author
Forward
0 new messages