I am getting an error when after running h2o.init()

6,008 views
Skip to first unread message

sha...@gmail.com

unread,
Sep 22, 2017, 2:42:03 PM9/22/17
to H2O Open Source Scalable Machine Learning - h2ostream
I've been trying to get h2o to run on my Mac. I've installed the latest version of R, Java and h2o. However, when I run the h2o.init(). I get the following error.

I don't appear to have a firewall running either.

Has anyone else gotten this error, and what can be done to fix it?

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

Note: In case of errors look at the following log files:
/var/folders/sf/30dh3y5j19s1m3xk9f0tsqt00000gn/T//RtmpXzNWSP/h2o_sh424_started_from_r.out
/var/folders/sf/30dh3y5j19s1m3xk9f0tsqt00000gn/T//RtmpXzNWSP/h2o_sh424_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"
% 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(nthreads = -1, max_mem_size = "8G") :
H2O failed to start, stopping execution.

j...@0xdata.com

unread,
Sep 26, 2017, 9:03:54 AM9/26/17
to H2O Open Source Scalable Machine Learning - h2ostream
Hi,

Please try to use Java 7 or 8.

Java 9 is not currently supported.

For more info, see https://h2o-release.s3.amazonaws.com/h2o/rel-weierstrass/3/docs-website/h2o-docs/welcome.html#requirements

Cheers,
Joe

Darren Cook

unread,
Sep 26, 2017, 10:24:10 AM9/26/17
to h2os...@googlegroups.com
> Please try to use Java 7 or 8.
>
> Java 9 is not currently supported.

Is there a JIRA for this support? If so, it really needs to be nudged up
to "critical" now, given that Java 9 is the current release (since Sep
21st):

http://www.oracle.com/technetwork/java/javase/downloads/index.html

(That is the page linked to from the release notes, saying "get java
from here"... people won't "scroll down to get Java 8" unless the
release notes start telling them that explicitly.)

There's also been at least one StackOverflow question on this.

Darren

aeib...@gmail.com

unread,
Sep 30, 2017, 3:36:54 PM9/30/17
to H2O Open Source Scalable Machine Learning - h2ostream
thanks Joe

Erin LeDell

unread,
Oct 2, 2017, 12:37:03 AM10/2/17
to H2O Open Source Scalable Machine Learning - h2ostream
Also relevant if you're an RStudio user: https://stackoverflow.com/questions/46490290/h2o-failed-to-connect-when-called-from-r-java-version-missmatch/46492688#46492688

On Saturday, September 30, 2017 at 12:36:54 PM UTC-7, aeib...@gmail.com wrote:
thanks Joe

Message has been deleted

sumeet....@gmail.com

unread,
Jan 6, 2018, 7:35:51 PM1/6/18
to H2O Open Source Scalable Machine Learning - h2ostream

I have uninstalled java 9 and installed java 8 (verified in system preferences).
I uninstalled and reinstalled h2o, it still thinks it has java 9 :

>>> h2o.init()
Checking whether there is an H2O instance running at http://localhost:54321..... not found.
Attempting to start a local H2O server...
Java Version: java version "9.0.1"; Java(TM) SE Runtime Environment (build 9.0.1+11); Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
Starting server from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h2o/backend/bin/h2o.jar
Ice root: /var/folders/09/b_3c01rj097cwkp1bxxfjj1m0000gn/T/tmprilPGR
JVM stdout: /var/folders/09/b_3c01rj097cwkp1bxxfjj1m0000gn/T/tmprilPGR/h2o_SumeetSandhu_started_from_python.out
JVM stderr: /var/folders/09/b_3c01rj097cwkp1bxxfjj1m0000gn/T/tmprilPGR/h2o_SumeetSandhu_started_from_python.err

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
h2o.init()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h2o/h2o.py", line 262, in init
min_mem_size=mmin, ice_root=ice_root, port=port, extra_classpath=extra_classpath)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h2o/backend/server.py", line 121, in start
mmax=max_mem_size, mmin=min_mem_size)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/h2o/backend/server.py", line 317, in _launch_server
raise H2OServerError("Server process terminated with error code %d" % proc.returncode)
H2OServerError: Server process terminated with error code 1

Darren Cook

unread,
Jan 7, 2018, 5:28:40 AM1/7/18
to h2os...@googlegroups.com
>> Java 9 is not currently supported.

I wonder what is so hard about supporting it?
https://0xdata.atlassian.net/browse/PUBDEV-4956

Reading between the lines, is it just that no-one has run the test suite
against Java 9?!

> I have uninstalled java 9 and installed java 8 (verified in system preferences).

Judging by the message you see, I suspect you have not uninstalled java
9, and have them side-by-side?

What is JAVA_HOME set to? If it mentions java 9, try changing it to the
java 8 equivalent.

Darren


> Attempting to start a local H2O server...
> Java Version: java version "9.0.1"; Java(TM) SE Runtime Environment (build 9.0.1+11); Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)> ...

Sumeet Sandhu

unread,
Jan 7, 2018, 2:16:04 PM1/7/18
to H2O Open Source Scalable Machine Learning - h2ostream
after way too much time and effort, we figured out the mess of java problems :

Java 9 has backward compatibility issues - whatever java 9 runtime was auto-updated on my MAC OS Sierra recently didn't work and h2o couldn't find java at all. I installed java 9 JDK - which h2o found but doesn't support yet.

There are no official java.com instructions for uninstalling java 9. I tried by removing:
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 
/Library/PreferencePanes/JavaControlPanel.prefPane 
~/Library/Application\ Support/Java
/Library/Java/JavaVirtualMachines/jdk-9.0.1_osx-x64_*

This breaks things somehow and doesn't let you install java 8 SE properly - h2o can't find any java.

The trick was to install java 8 SDK instead of another runtime - that finally worked.

can Oracle not afford to release functional java updates !?

Sumeet Sandhu

unread,
Jan 9, 2018, 11:52:08 AM1/9/18
to H2O Open Source Scalable Machine Learning - h2ostream
contents of the file h2o_SumeetSandhu_started_from_python.err :

Unrecognized VM option 'PrintGCTimeStamps'

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.



--
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/AEfObGlFsn4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2ostream+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Kraljevic

unread,
Jan 9, 2018, 11:53:26 AM1/9/18
to Sumeet Sandhu, H2O Open Source Scalable Machine Learning - h2ostream

I’ve never seen that before.
What’s the output of your 'java -version’?
You must have an unusual version of Java.

Tom
Reply all
Reply to author
Forward
Message has been deleted
0 new messages