unable to connect h20 server python3

1,606 views
Skip to first unread message

Pilar Badiola

unread,
Jul 12, 2018, 6:00:26 AM7/12/18
to H2O Open Source Scalable Machine Learning - h2ostream
Hi! Could anybody please help me?

The first time i´m able to connect but the second time i get this error

Any idea??

Thanks a lot 

bash-4.3# python3 scriptPredictions.py
Checking whether there is an H2O instance running at http://127.0.0.1:54321..... not found.
Attempting to start a local H2O server...
  Java Version: openjdk version "1.8.0_121"; OpenJDK Runtime Environment (IcedTea 3.3.0) (Alpine 8.121.13-r0); OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
  Starting server from /usr/lib/python3.5/site-packages/h2o/backend/bin/h2o.jar
  Ice root: /tmp/tmph0ep1rpb
  JVM stdout: /tmp/tmph0ep1rpb/h2o_unknownUser_started_from_python.out
  JVM stderr: /tmp/tmph0ep1rpb/h2o_unknownUser_started_from_python.err
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/h2o/h2o.py", line 252, in init
    "connected.", "not found."))
  File "/usr/lib/python3.5/site-packages/h2o/backend/connection.py", line 318, in open
    conn._cluster = conn._test_connection(retries, messages=_msgs)
  File "/usr/lib/python3.5/site-packages/h2o/backend/connection.py", line 588, in _test_connection
    % (self._base_url, max_retries, "\n".join(errors)))
h2o.exceptions.H2OConnectionError: Could not establish link to the H2O cloud http://127.0.0.1:54321 after 5 retries
[56:36.65] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='127.0.0.1', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f93deb0fdd8>: Failed to establish a new connection: [Errno 111] Connection refused',))
[56:36.85] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='127.0.0.1', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f93deab0550>: Failed to establish a new connection: [Errno 111] Connection refused',))
[56:37.06] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='127.0.0.1', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f93deb0f5f8>: Failed to establish a new connection: [Errno 111] Connection refused',))
[56:37.26] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='127.0.0.1', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f93deab0358>: Failed to establish a new connection: [Errno 111] Connection refused',))
[56:37.46] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='127.0.0.1', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f93deab0c18>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "scriptPredictions.py", line 2, in <module>
    h2o.init(ip="127.0.0.1",port="54321",max_mem_size = "1G")
  File "/usr/lib/python3.5/site-packages/h2o/h2o.py", line 261, in init
    min_mem_size=mmin, ice_root=ice_root, port=port, extra_classpath=extra_classpath)
  File "/usr/lib/python3.5/site-packages/h2o/backend/server.py", line 121, in start
    mmax=max_mem_size, mmin=min_mem_size)
  File "/usr/lib/python3.5/site-packages/h2o/backend/server.py", line 317, in _launch_server
    raise H2OServerError("Server process terminated with error code %d" % proc.returncode)
h2o.exceptions.H2OServerError: Server process terminated with error code -11

kev...@gmail.com

unread,
Jul 12, 2018, 6:11:09 AM7/12/18
to H2O Open Source Scalable Machine Learning - h2ostream
I'm new to H2O so I can't be of much help - but the error seems to be stemming from your argument setting the memory allocation. Perhaps just try

h2o.init(ip="127.0.0.1",port="54321")

and see if it connects.

Darren Cook

unread,
Jul 12, 2018, 6:12:02 AM7/12/18
to h2os...@googlegroups.com
> The first time i´m able to connect but the second time i get this error

It could be that it had gone unstable, if you've filled up the memory
("1G" is fine for experimenting with iris-size data sets, but you might
want more with bigger data or when making a lot of models).

Checking to see you can connect via Flow is always a good idea (and you
can also see free memory there).

Darren

> / h2o.init(ip="127.0.0.1",port="54321",max_mem_size = "1G")/

Pilar Badiola

unread,
Jul 12, 2018, 6:16:01 AM7/12/18
to H2O Open Source Scalable Machine Learning - h2ostream

Thanks to both of you, neither of the two options works for me

Tom Kraljevic

unread,
Jul 12, 2018, 10:25:03 AM7/12/18
to Pilar Badiola, H2O Open Source Scalable Machine Learning - h2ostream

look at the JVM stdout/err tmp files that are created for a clue as to what is going on.

the output you pasted earlier gives the location.

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.

Pilar Badiola

unread,
Jul 13, 2018, 8:18:02 AM7/13/18
to H2O Open Source Scalable Machine Learning - h2ostream

Hi Tom, 

Thank you very much. The stdout file gives me this information: I guees this is not relationed with h2o isnt it? Thank u


bash-4.3# cat h2o_unknownUser_started_from_python.out
Cannot load library from path lib/linux_64/libxgboost4j_gpu.so
Cannot load library from path lib/libxgboost4j_gpu.so
Failed to load library from both native path and jar!
Cannot load library from path lib/linux_64/libxgboost4j_omp.so
Cannot load library from path lib/libxgboost4j_omp.so
Failed to load library from both native path and jar!
Cannot load library from path lib/linux_64/libxgboost4j_minimal.so
Cannot load library from path lib/libxgboost4j_minimal.so
Failed to load library from both native path and jar!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f57365d4085, pid=8466, tid=0x00007f573680bab0
#
# JRE version: OpenJDK Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11)
# Java VM: OpenJDK 64-Bit Server VM (25.171-b11 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.8.0
# Distribution: Custom build (Thu Jun 14 11:41:56 GMT 2018)
# Problematic frame:
# C  [ld-musl-x86_64.so.1+0x50085]  memcpy+0x11
#
# Core dump written. Default location: /opt/nifi/scriptPredicciones/core or core.8466
#
# An error report file with more information is saved as:
# /opt/nifi/scriptPredicciones/hs_err_pid8466.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla 

Tom Kraljevic

unread,
Jul 13, 2018, 8:48:30 AM7/13/18
to Pilar Badiola, H2O Open Source Scalable Machine Learning - h2ostream

you hit an openjdk bug.
update java on your system, and try again.

Sent from my iPhone
--

Pilar Badiola

unread,
Jul 16, 2018, 5:09:44 AM7/16/18
to H2O Open Source Scalable Machine Learning - h2ostream


Hi again Tom, i have one last question. ive just downloaded de openjdk7. I have to chage any configure file in h20 to get the new version of Java?? Thank u very much

Tom Kraljevic

unread,
Jul 16, 2018, 10:23:33 AM7/16/18
to Pilar Badiola, H2O Open Source Scalable Machine Learning - h2ostream

try setting JAVA_HOME env var.

tom

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages