Urgent - h2o.init fails pythonw.exe

137 views
Skip to first unread message

Pauw, M, Mej [pauwmarina@sun.ac.za]

unread,
May 13, 2020, 5:53:33 AM5/13/20
to h2os...@googlegroups.com

Hello!

 

I have a super urgent question. I have asked a number of people for help by now. Both experienced h2o users (in R) and experienced python scriptwriters. I am really at the end of my rope.

 

When using pyinstaller with python.exe everything works perfectly, however if I add the “-w” command and publish to pythonw.exe it states the machine is actively refusing the connection. This is the full error:

 

Traceback (most recent call last):

  File "h2o\h2o.py", line 288, in init

  File "h2o\backend\connection.py", line 384, in open

  File "h2o\backend\connection.py", line 684, in _test_connection

h2o.exceptions.H2OConnectionError: Could not establish link to the H2O cloud http://localhost:54321 after 5 retries

[52:11.98] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0F679190>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

[52:16.26] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0D380510>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

[52:20.49] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0DA15C90>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

[52:24.76] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0F7721F0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

[52:29.00] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0F772670>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

  File "Threads.py", line 19, in run

  File "RandomForest.py", line 194, in <lambda>

  File "RandomForest.py", line 336, in RFFromTable

  File "RandomForest.py", line 233, in RunRandomForest

  File "h2o\h2o.py", line 301, in init

  File "h2o\backend\server.py", line 143, in start

  File "h2o\backend\server.py", line 277, in _launch_server

  File "h2o\backend\server.py", line 377, in _check_java

  File "subprocess.py", line 395, in check_output

  File "subprocess.py", line 472, in run

  File "subprocess.py", line 728, in __init__

  File "subprocess.py", line 1025, in _get_handles

OSError: [WinError 6] The handle is invalid

 

I get this error message by setting the stdout to a txt file.

 

I have checked the jar path, the java path and checked that the port is not in use. I have also tried running as administrator.

 

According to pythonw.exe the only difference should be that it does not open a commandline and the output is not printed out to commandline, but to the stdout.

 

I had similar errors wth python.exe, but that was resolved by hardcoding the jar path and running:

h2o.init(strict_version_check=False)

 

I really don’t know what to do anymore as my collaborators are adamant I have to continue to use your package, please, please, please help.

 

Kind regards,

 

 

Sent from Mail for Windows 10

 


The integrity and confidentiality of this email are governed by these terms. Disclaimer
Die integriteit en vertroulikheid van hierdie e-pos word deur die volgende bepalings bereël. Vrywaringsklousule

Tom Kraljevic

unread,
May 13, 2020, 10:33:20 AM5/13/20
to Pauw, M, Mej [pauwmarina@sun.ac.za], h2os...@googlegroups.com

hi,

(note i have never seen anyone try to do this before with the pythonw.  so not sure what to expect.)

what does the output of the java h2o-3 process say?
here you are only showing the output of the python.

also, setting this is bad.  don't do this:
  strict_version_check=False
(what that does is say "ignore client/server version mismatches, and hope the subtle or not-so-subtle errors don't prevent things from working".)

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/h2ostream/CTXP275MB0134F524FB9B2D2C7A6B202380BF0%40CTXP275MB0134.ZAFP275.PROD.OUTLOOK.COM.

Reply all
Reply to author
Forward
0 new messages