pythonh2o

H2OServerError: Cluster reports unhealthy status


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 

Solution

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