Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

H2OServerError: Cluster reports unhealthy status

Tags:

python

h2o

I was training a machine learning model using h2o, but the process crashed while parsing data. I restarted the python kernel, but now when I try to call h2o.connect() again the script raises the following error:

  File "<ipython-input-7-3b2ccf9d3f4c>", line 1, in <module>
    h2o.connect()

  File "/Users/victormayrink/anaconda/lib/python3.5/site-packages/h2o/h2o.py", line 74, in connect
    cluster_id=cluster_id, cookies=cookies, verbose=verbose)

  File "/Users/victormayrink/anaconda/lib/python3.5/site-packages/h2o/backend/connection.py", line 175, in open
    conn._cluster = conn._test_connection(retries, messages=_msgs)

  File "/Users/victormayrink/anaconda/lib/python3.5/site-packages/h2o/backend/connection.py", line 437, in _test_connection
    raise H2OServerError("Cluster reports unhealthy status")

H2OServerError: Cluster reports unhealthy status 
like image 210
Victor Mayrink Avatar asked Sep 18 '25 01:09

Victor Mayrink


2 Answers

I just had the same problem. You can open the url http://localhost:54321 and then shutdown the cluster. Then you can try to reconnect to h2o. The reason of the problem is probably because each time you close the python kernel, h2o is still running in its kernel. You can use this:

h2o.cluster().shutdown(prompt=True) 

to shutdown h2o when you finish work.

like image 51
Tiffany Xu Avatar answered Sep 20 '25 16:09

Tiffany Xu


Just restart the h20 server and it will solve the issue.

Initiate the server using this:

h2o.init()

Stop it:

h2o.cluster().shutdown(prompt=True) 

Start it again:

h2o.init()

It will work.

like image 22
Malik Hamza Avatar answered Sep 20 '25 16:09

Malik Hamza