microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.51k stars 823 forks source link

Connection Refused Error with H2O on WSL after Windows Update #12170

Open lvfmc85 opened 1 month ago

lvfmc85 commented 1 month ago

Windows Version

Microsoft Windows [versão 10.0.22631.4317]

WSL Version

2.3.24.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 24.04

Other Software

Java Version: Java 11.0.24

Python Version: Tested with Python 3.7, 3.9, 3.10, 3.11, and 3.12

Anaconda Version: Anaconda3-2024.06-1-Linux-x86_64

H2O Versions: 3.42.0.2 up to 3.46.0.5

Repro Steps

Start H2O using h2o.init() in Python on WSL.

Attempt to form a cloud with node at 10.255.255.254:54321.

Observe the "Connection refused" error.

Expected Behavior

H2O should start successfully on WSL, forming a cloud and connecting to the node without any connection errors, as it does on a native Ubuntu environment.

Actual Behavior

What happened instead?

When starting H2O on WSL using h2o.init(), it attempts to form a cloud of size 2, including a node at 10.255.255.254:54321, but encounters a "Connection refused" error. This issue does not occur on a dedicated PC with Ubuntu OS.

Diagnostic Logs

h2o .err: " 2024-10-15 14:22:11.685:INFO::main: Logging initialized @1633ms to org.eclipse.jetty.util.log.StdErrLog 10-15 14:22:15.839 127.0.0.1:54321 1415 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?] 10-15 14:22:20.846 127.0.0.1:54321 1415 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?] " h2o .out: " 14:22:11.558 [main] WARN hex.tree.xgboost.util.NativeLibrary - Cannot load library from path lib/linux_64/libxgboost4j_gpu.so 14:22:11.560 [main] WARN hex.tree.xgboost.util.NativeLibrary - Failed to load library from both native path and jar! 14:22:11.560 [main] INFO hex.tree.xgboost.util.NativeLibraryLoaderChain - Cannot load library: xgboost4j_gpu (lib/linux_64/libxgboost4j_gpu.so) 14:22:11.587 [main] INFO hex.tree.xgboost.util.NativeLibrary - Loaded library from lib/linux_64/libxgboost4j_minimal.so (/tmp/libxgboost4j_minimal5291883429882183235.so) 10-15 14:22:11.844 127.0.0.1:54321 1415 main INFO water.default: ----- H2O started ----- 10-15 14:22:11.844 127.0.0.1:54321 1415 main INFO water.default: Build git branch: rel-3.46.0 10-15 14:22:11.845 127.0.0.1:54321 1415 main INFO water.default: Build git hash: 62c1c2579b6eb97e8813659a5e7b919af8ae0c5f 10-15 14:22:11.845 127.0.0.1:54321 1415 main INFO water.default: Build git describe: jenkins-3.46.0.4-21-g62c1c2579b6 10-15 14:22:11.845 127.0.0.1:54321 1415 main INFO water.default: Build project version: 3.46.0.5 10-15 14:22:11.846 127.0.0.1:54321 1415 main INFO water.default: Build age: 1 month and 16 days 10-15 14:22:11.846 127.0.0.1:54321 1415 main INFO water.default: Built by: 'jenkins' 10-15 14:22:11.846 127.0.0.1:54321 1415 main INFO water.default: Built on: '2024-08-29 11:51:54' 10-15 14:22:11.846 127.0.0.1:54321 1415 main INFO water.default: Found H2O Core extensions: [XGBoost, KrbStandalone, Infogram] 10-15 14:22:11.847 127.0.0.1:54321 1415 main INFO water.default: Processed H2O arguments: [-ip, 127.0.0.1, -web_ip, 127.0.0.1, -baseport, 54321, -ice_root, /tmp/tmpxioy6s4r, -name, H2O_from_python_lvfmc_tt3594, -log_level, INFO, -allow_unsupported_java] 10-15 14:22:11.847 127.0.0.1:54321 1415 main INFO water.default: Java availableProcessors: 8 10-15 14:22:11.847 127.0.0.1:54321 1415 main INFO water.default: Java heap totalMemory: 664.0 MB 10-15 14:22:11.847 127.0.0.1:54321 1415 main INFO water.default: Java heap maxMemory: 10.29 GB 10-15 14:22:11.848 127.0.0.1:54321 1415 main INFO water.default: Java version: Java 11.0.24 (from Ubuntu) 10-15 14:22:11.848 127.0.0.1:54321 1415 main INFO water.default: JVM launch parameters: [-ea] 10-15 14:22:11.848 127.0.0.1:54321 1415 main INFO water.default: JVM process id: 1415@LAPTOP-TNVR599T 10-15 14:22:11.848 127.0.0.1:54321 1415 main INFO water.default: OS version: Linux 5.15.153.1-microsoft-standard-WSL2 (amd64) 10-15 14:22:11.849 127.0.0.1:54321 1415 main INFO water.default: Machine physical memory: 41.14 GB 10-15 14:22:11.849 127.0.0.1:54321 1415 main INFO water.default: Machine locale: en 10-15 14:22:11.849 127.0.0.1:54321 1415 main INFO water.default: X-h2o-cluster-id: 1729012930227 10-15 14:22:11.849 127.0.0.1:54321 1415 main INFO water.default: User name: 'lvfmc' 10-15 14:22:11.850 127.0.0.1:54321 1415 main INFO water.default: IPv6 stack selected: false 10-15 14:22:11.850 127.0.0.1:54321 1415 main INFO water.default: Possible IP Address: eth0 (eth0), fe80:0:0:0:215:5dff:fe56:4e8e%eth0 10-15 14:22:11.850 127.0.0.1:54321 1415 main INFO water.default: Possible IP Address: eth0 (eth0), 172.18.24.159 10-15 14:22:11.850 127.0.0.1:54321 1415 main INFO water.default: Possible IP Address: lo (lo), 0:0:0:0:0:0:0:1%lo 10-15 14:22:11.850 127.0.0.1:54321 1415 main INFO water.default: Possible IP Address: lo (lo), 10.255.255.254 10-15 14:22:11.851 127.0.0.1:54321 1415 main INFO water.default: Possible IP Address: lo (lo), 127.0.0.1 10-15 14:22:11.851 127.0.0.1:54321 1415 main INFO water.default: Selected H2O.CLOUD_MULTICAST_IF: name:lo (lo) doesn't support multicast 10-15 14:22:11.858 127.0.0.1:54321 1415 main INFO water.default: H2O node running in unencrypted mode. 10-15 14:22:11.859 127.0.0.1:54321 1415 main INFO water.default: Internal communication uses port: 54322 10-15 14:22:11.859 127.0.0.1:54321 1415 main INFO water.default: Listening for HTTP and REST traffic on http://127.0.0.1:54321/ 10-15 14:22:11.860 127.0.0.1:54321 1415 main INFO water.default: H2O cloud name: 'H2O_from_python_lvfmc_tt3594' on /127.0.0.1:54321, discovery address /227.248.222.114:58360 10-15 14:22:11.860 127.0.0.1:54321 1415 main INFO water.default: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555): 10-15 14:22:11.861 127.0.0.1:54321 1415 main INFO water.default: 1. Open a terminal and run 'ssh -L 55555:localhost:54321 lvfmc@127.0.0.1' 10-15 14:22:11.861 127.0.0.1:54321 1415 main INFO water.default: 2. Point your browser to http://localhost:55555 10-15 14:22:12.611 127.0.0.1:54321 1415 main INFO water.default: Kerberos not configured 10-15 14:22:12.611 127.0.0.1:54321 1415 main INFO water.default: Log dir: '/tmp/tmpxioy6s4r/h2ologs' 10-15 14:22:12.611 127.0.0.1:54321 1415 main INFO water.default: Cur dir: '/home/lvfmc' 10-15 14:22:12.619 127.0.0.1:54321 1415 main INFO water.default: Subsystem for distributed import from HTTP/HTTPS successfully initialized 10-15 14:22:12.619 127.0.0.1:54321 1415 main INFO water.default: HDFS subsystem successfully initialized 10-15 14:22:12.622 127.0.0.1:54321 1415 main INFO water.default: S3 subsystem successfully initialized 10-15 14:22:12.630 127.0.0.1:54321 1415 main INFO water.default: GCS subsystem successfully initialized 10-15 14:22:12.631 127.0.0.1:54321 1415 main INFO water.default: Drive subsystem not available 10-15 14:22:12.631 127.0.0.1:54321 1415 main INFO water.default: Flow dir: '/home/lvfmc/h2oflows' 10-15 14:22:12.638 127.0.0.1:54321 1415 main INFO water.default: Cloud of size 1 formed [/127.0.0.1:54321] 10-15 14:22:12.648 127.0.0.1:54321 1415 main INFO water.default: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV] 10-15 14:22:12.649 127.0.0.1:54321 1415 main INFO water.default: XGBoost extension initialized 10-15 14:22:12.650 127.0.0.1:54321 1415 main INFO water.default: KrbStandalone extension initialized 10-15 14:22:12.650 127.0.0.1:54321 1415 main INFO water.default: Infogram extension initialized 10-15 14:22:12.650 127.0.0.1:54321 1415 main INFO water.default: Registered 3 core extensions in: 1281ms 10-15 14:22:12.651 127.0.0.1:54321 1415 main INFO water.default: Registered H2O core extensions: [XGBoost, KrbStandalone, Infogram] 10-15 14:22:12.654 127.0.0.1:54321 1415 main INFO hex.tree.xgboost.XGBoostExtension: Found XGBoost backend with library: xgboost4j_minimal 10-15 14:22:12.654 127.0.0.1:54321 1415 main WARN hex.tree.xgboost.XGBoostExtension: Your system supports only minimal version of XGBoost (no GPUs, no multithreading)! 10-15 14:22:12.854 127.0.0.1:54321 1415 main INFO water.default: Registered: 288 REST APIs in: 203ms 10-15 14:22:12.854 127.0.0.1:54321 1415 main INFO water.default: Registered REST API extensions: [Mojo 2 pipeline extensions, XGBoost, Amazon S3, Algos, Infogram, AutoML, Core V3, TargetEncoder, Core V4] 10-15 14:22:12.943 127.0.0.1:54321 1415 main INFO water.default: Registered: 332 schemas in 88ms 10-15 14:22:12.944 127.0.0.1:54321 1415 main INFO water.default: H2O started in 2710ms 10-15 14:22:12.944 127.0.0.1:54321 1415 main INFO water.default: 10-15 14:22:12.944 127.0.0.1:54321 1415 main INFO water.default: Open H2O Flow in your web browser: http://127.0.0.1:54321 10-15 14:22:12.944 127.0.0.1:54321 1415 main INFO water.default: 10-15 14:22:13.100 127.0.0.1:54321 1415 6918683-21 INFO water.default: GET /3/Metadata/schemas/CloudV3, parms: {} 10-15 14:22:13.106 127.0.0.1:54321 1415 6918683-21 INFO water.default: Locking cloud to new members, because water.api.schemas3.MetadataV3 10-15 14:22:15.739 127.0.0.1:54321 1415 FJ-126-15 INFO water.default: Cloud of size 2 formed [/127.0.0.1:54321, /10.255.255.254:54321] 10-15 14:22:15.782 127.0.0.1:54321 1415 6918683-17 INFO water.default: GET /3/Metadata/schemas/H2OErrorV3, parms: {} 10-15 14:22:15.787 127.0.0.1:54321 1415 6918683-18 INFO water.default: GET /3/Metadata/schemas/H2OModelBuilderErrorV3, parms: {} 10-15 14:22:15.811 127.0.0.1:54321 1415 6918683-20 INFO water.default: POST /4/sessions, parms: {} 10-15 14:22:15.821 127.0.0.1:54321 1415 6918683-21 INFO water.default: POST /99/Rapids, parms: {ast=(setTimeZone "UTC"), session_id=_sid_af81} 10-15 14:22:15.839 127.0.0.1:54321 1415 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?] 10-15 14:22:20.846 127.0.0.1:54321 1415 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?]

"

github-actions[bot] commented 1 month ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
elsaco commented 1 month ago

@lvfmc85 how are you launching the h2o module?

In an venv running:

import h2o
h2o.init()

is starting a cluster bound to 127.0.0.1 and not other IPs. Won't start if the IP address is not localhost:

>>> h2o.init(ip="172.26.102.111", port=54323)
h2o.exceptions.H2OConnectionError: Can only start H2O launcher if IP address is localhost.

Start using defaults:

>>> 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: openjdk version "21.0.4" 2024-07-16; OpenJDK Runtime Environment (build 21.0.4+7-Ubuntu-1ubuntu224.04); OpenJDK 64-Bit Server VM (build 21.0.4+7-Ubuntu-1ubuntu224.04, mixed mode, sharing)
  Starting server from /home/elsaco/myH2O/lib/python3.12/site-packages/h2o/backend/bin/h2o.jar
  Ice root: /tmp/tmp9ne88fne
  JVM stdout: /tmp/tmp9ne88fne/h2o_elsaco_started_from_python.out
  JVM stderr: /tmp/tmp9ne88fne/h2o_elsaco_started_from_python.err
  Server is running at http://127.0.0.1:54321
Connecting to H2O server at http://127.0.0.1:54321 ... successful.
--------------------------  -----------------------------
H2O_cluster_uptime:         01 secs
H2O_cluster_timezone:       America/Los_Angeles
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:        3.46.0.5
H2O_cluster_version_age:    1 month and 16 days
H2O_cluster_name:           H2O_from_python_elsaco_5i0jdz
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    1.433 Gb
H2O_cluster_total_cores:    6
H2O_cluster_allowed_cores:  6
H2O_cluster_status:         locked, healthy
H2O_connection_url:         http://127.0.0.1:54321
H2O_connection_proxy:       {"http": null, "https": null}
H2O_internal_security:      False
Python_version:             3.12.3 final
--------------------------  -----------------------------

Cluster status:

>>> h2o.cluster().show_status()
--------------------------  -----------------------------
H2O_cluster_uptime:         2 mins 40 secs
H2O_cluster_timezone:       America/Los_Angeles
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:        3.46.0.5
H2O_cluster_version_age:    1 month and 16 days
H2O_cluster_name:           H2O_from_python_elsaco_5i0jdz
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    1.426 Gb
H2O_cluster_total_cores:    6
H2O_cluster_allowed_cores:  6
H2O_cluster_status:         locked, healthy
H2O_connection_url:         http://127.0.0.1:54321
H2O_connection_proxy:       {"http": null, "https": null}
H2O_internal_security:      False
Python_version:             3.12.3 final
--------------------------  -----------------------------

Some random test:

>>> res = h2o.api("GET /3/NetworkTest")
>>> res["table"].show()
Network Test: Launched from /127.0.0.1:54321
destination                    1_bytes             1024_bytes          1048576_bytes
-----------------------------  ------------------  ------------------  -------------------
all - collective bcast/reduce  244 usec, 8.0 KB/S  81 usec, 24.1 MB/S  79 usec, 24.52 GB/S
self /127.0.0.1:54321          354 usec, 5.5 KB/S  34 usec, 56.0 MB/S  42 usec, 46.12 GB/S

Logs:

h2o_elsaco_started_from_python.out ``` elsaco@texas:~$ cat /tmp/tmp9ne88fne/h2o_elsaco_started_from_python.out 14:37:48.775 [main] INFO hex.tree.xgboost.util.NativeLibrary - Loaded library from lib/linux_64/libxgboost4j_gpu.so (/tmp/libxgboost4j_gpu5556758778119962595.so) 10-15 14:37:48.980 127.0.0.1:54321 2750 main WARN water.default: H2O is running on a version of Java (21.0.4) that was not certified at the time of the H2O release. For production use please use a certified Java version (versions 8-17 are officially supported). 10-15 14:37:48.981 127.0.0.1:54321 2750 main INFO water.default: ----- H2O started ----- 10-15 14:37:48.981 127.0.0.1:54321 2750 main INFO water.default: Build git branch: rel-3.46.0 10-15 14:37:48.981 127.0.0.1:54321 2750 main INFO water.default: Build git hash: 62c1c2579b6eb97e8813659a5e7b919af8ae0c5f 10-15 14:37:48.982 127.0.0.1:54321 2750 main INFO water.default: Build git describe: jenkins-3.46.0.4-21-g62c1c2579b6 10-15 14:37:48.982 127.0.0.1:54321 2750 main INFO water.default: Build project version: 3.46.0.5 10-15 14:37:48.982 127.0.0.1:54321 2750 main INFO water.default: Build age: 1 month and 16 days 10-15 14:37:48.983 127.0.0.1:54321 2750 main INFO water.default: Built by: 'jenkins' 10-15 14:37:48.983 127.0.0.1:54321 2750 main INFO water.default: Built on: '2024-08-29 11:51:54' 10-15 14:37:48.983 127.0.0.1:54321 2750 main INFO water.default: Found H2O Core extensions: [XGBoost, KrbStandalone, Infogram] 10-15 14:37:48.983 127.0.0.1:54321 2750 main INFO water.default: Processed H2O arguments: [-ip, 127.0.0.1, -web_ip, 127.0.0.1, -baseport, 54321, -ice_root, /tmp/tmp9ne88fne, -name, H2O_from_python_elsaco_5i0jdz, -log_level, INFO, -allow_unsupported_java] 10-15 14:37:48.984 127.0.0.1:54321 2750 main INFO water.default: Java availableProcessors: 6 10-15 14:37:48.984 127.0.0.1:54321 2750 main INFO water.default: Java heap totalMemory: 96.0 MB 10-15 14:37:48.984 127.0.0.1:54321 2750 main INFO water.default: Java heap maxMemory: 1.45 GB 10-15 14:37:48.985 127.0.0.1:54321 2750 main INFO water.default: Java version: Java 21.0.4 (from Ubuntu) 10-15 14:37:48.985 127.0.0.1:54321 2750 main INFO water.default: JVM launch parameters: [-ea] 10-15 14:37:48.985 127.0.0.1:54321 2750 main INFO water.default: JVM process id: 2750@texas 10-15 14:37:48.986 127.0.0.1:54321 2750 main INFO water.default: OS version: Linux 5.15.153.1-microsoft-standard-WSL2 (amd64) 10-15 14:37:48.986 127.0.0.1:54321 2750 main INFO water.default: Machine physical memory: 5.79 GB 10-15 14:37:48.987 127.0.0.1:54321 2750 main INFO water.default: Machine locale: en 10-15 14:37:48.987 127.0.0.1:54321 2750 main INFO water.default: X-h2o-cluster-id: 1729028267338 10-15 14:37:48.987 127.0.0.1:54321 2750 main INFO water.default: User name: 'elsaco' 10-15 14:37:48.987 127.0.0.1:54321 2750 main INFO water.default: IPv6 stack selected: false 10-15 14:37:48.988 127.0.0.1:54321 2750 main INFO water.default: Network interface is down: name:docker0 (docker0) 10-15 14:37:48.988 127.0.0.1:54321 2750 main INFO water.default: Possible IP Address: eth0 (eth0), fe80:0:0:0:215:5dff:fe52:8650%eth0 10-15 14:37:48.988 127.0.0.1:54321 2750 main INFO water.default: Possible IP Address: eth0 (eth0), 172.26.102.111 10-15 14:37:48.988 127.0.0.1:54321 2750 main INFO water.default: Possible IP Address: lo (lo), 0:0:0:0:0:0:0:1%lo 10-15 14:37:48.989 127.0.0.1:54321 2750 main INFO water.default: Possible IP Address: lo (lo), 127.0.0.1 10-15 14:37:48.989 127.0.0.1:54321 2750 main INFO water.default: Selected H2O.CLOUD_MULTICAST_IF: name:lo (lo) doesn't support multicast 10-15 14:37:48.993 127.0.0.1:54321 2750 main INFO water.default: H2O node running in unencrypted mode. 10-15 14:37:48.994 127.0.0.1:54321 2750 main INFO water.default: Internal communication uses port: 54322 10-15 14:37:48.994 127.0.0.1:54321 2750 main INFO water.default: Listening for HTTP and REST traffic on http://127.0.0.1:54321/ 10-15 14:37:48.995 127.0.0.1:54321 2750 main INFO water.default: H2O cloud name: 'H2O_from_python_elsaco_5i0jdz' on /127.0.0.1:54321, discovery address /237.111.34.250:60783 10-15 14:37:48.995 127.0.0.1:54321 2750 main INFO water.default: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555): 10-15 14:37:48.996 127.0.0.1:54321 2750 main INFO water.default: 1. Open a terminal and run 'ssh -L 55555:localhost:54321 elsaco@127.0.0.1' 10-15 14:37:48.996 127.0.0.1:54321 2750 main INFO water.default: 2. Point your browser to http://localhost:55555 10-15 14:37:49.425 127.0.0.1:54321 2750 main INFO water.default: Kerberos not configured 10-15 14:37:49.425 127.0.0.1:54321 2750 main INFO water.default: Log dir: '/tmp/tmp9ne88fne/h2ologs' 10-15 14:37:49.426 127.0.0.1:54321 2750 main INFO water.default: Cur dir: '/home/elsaco' 10-15 14:37:49.435 127.0.0.1:54321 2750 main INFO water.default: Subsystem for distributed import from HTTP/HTTPS successfully initialized 10-15 14:37:49.435 127.0.0.1:54321 2750 main INFO water.default: HDFS subsystem successfully initialized 10-15 14:37:49.444 127.0.0.1:54321 2750 main INFO water.default: S3 subsystem successfully initialized 10-15 14:37:49.457 127.0.0.1:54321 2750 main INFO water.default: GCS subsystem successfully initialized 10-15 14:37:49.457 127.0.0.1:54321 2750 main INFO water.default: Drive subsystem not available 10-15 14:37:49.457 127.0.0.1:54321 2750 main INFO water.default: Flow dir: '/home/elsaco/h2oflows' 10-15 14:37:49.465 127.0.0.1:54321 2750 main INFO water.default: Cloud of size 1 formed [/127.0.0.1:54321] 10-15 14:37:49.470 127.0.0.1:54321 2750 main INFO water.default: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV] 10-15 14:37:49.471 127.0.0.1:54321 2750 main INFO water.default: XGBoost extension initialized 10-15 14:37:49.472 127.0.0.1:54321 2750 main INFO water.default: KrbStandalone extension initialized 10-15 14:37:49.472 127.0.0.1:54321 2750 main INFO water.default: Infogram extension initialized 10-15 14:37:49.472 127.0.0.1:54321 2750 main INFO water.default: Registered 3 core extensions in: 1279ms 10-15 14:37:49.472 127.0.0.1:54321 2750 main INFO water.default: Registered H2O core extensions: [XGBoost, KrbStandalone, Infogram] 10-15 14:37:49.475 127.0.0.1:54321 2750 main INFO hex.tree.xgboost.XGBoostExtension: Found XGBoost backend with library: xgboost4j_gpu 10-15 14:37:49.475 127.0.0.1:54321 2750 main INFO hex.tree.xgboost.XGBoostExtension: XGBoost supported backends: [WITH_GPU, WITH_OMP] 10-15 14:37:49.651 127.0.0.1:54321 2750 main INFO water.default: Registered: 288 REST APIs in: 179ms 10-15 14:37:49.651 127.0.0.1:54321 2750 main INFO water.default: Registered REST API extensions: [Mojo 2 pipeline extensions, XGBoost, Amazon S3, Algos, Infogram, AutoML, Core V3, TargetEncoder, Core V4] 10-15 14:37:49.784 127.0.0.1:54321 2750 main INFO water.default: Registered: 332 schemas in 132ms 10-15 14:37:49.784 127.0.0.1:54321 2750 main INFO water.default: H2O started in 2321ms 10-15 14:37:49.784 127.0.0.1:54321 2750 main INFO water.default: 10-15 14:37:49.784 127.0.0.1:54321 2750 main INFO water.default: Open H2O Flow in your web browser: http://127.0.0.1:54321 10-15 14:37:49.785 127.0.0.1:54321 2750 main INFO water.default: 10-15 14:37:49.836 127.0.0.1:54321 2750 4422581-30 INFO water.default: GET /3/Metadata/schemas/CloudV3, parms: {} 10-15 14:37:49.842 127.0.0.1:54321 2750 4422581-30 INFO water.default: Locking cloud to new members, because water.api.schemas3.MetadataV3 10-15 14:37:49.886 127.0.0.1:54321 2750 4422581-26 INFO water.default: GET /3/Metadata/schemas/H2OErrorV3, parms: {} 10-15 14:37:49.891 127.0.0.1:54321 2750 4422581-24 INFO water.default: GET /3/Metadata/schemas/H2OModelBuilderErrorV3, parms: {} 10-15 14:37:49.916 127.0.0.1:54321 2750 4422581-25 INFO water.default: POST /4/sessions, parms: {} 10-15 14:37:49.925 127.0.0.1:54321 2750 4422581-28 INFO water.default: POST /99/Rapids, parms: {ast=(setTimeZone "UTC"), session_id=_sid_9554} 10-15 14:43:02.211 127.0.0.1:54321 2750 4422581-29 INFO water.default: POST /99/Rapids, parms: {ast=(tmp= py_1_sid_9554 (ls )), session_id=_sid_9554} 10-15 14:43:02.250 127.0.0.1:54321 2750 4422581-25 INFO water.default: POST /99/Rapids, parms: {ast=(rm py_1_sid_9554), session_id=_sid_9554} 10-15 14:44:51.100 127.0.0.1:54321 2750 4422581-28 INFO water.default: GET /3/NetworkTest, parms: {} 10-15 14:44:51.133 127.0.0.1:54321 2750 4422581-28 INFO water.default: Network Test (Launched from /127.0.0.1:54321): 10-15 14:44:51.133 127.0.0.1:54321 2750 4422581-28 INFO water.default: Destination 1 bytes 1024 bytes 1048576 bytes 10-15 14:44:51.133 127.0.0.1:54321 2750 4422581-28 INFO water.default: all - collective bcast/reduce 244 usec, 8.0 KB/S 81 usec, 24.1 MB/S 79 usec, 24.52 GB/S 10-15 14:44:51.134 127.0.0.1:54321 2750 4422581-28 INFO water.default: self /127.0.0.1:54321 354 usec, 5.5 KB/S 34 usec, 56.0 MB/S 42 usec, 46.12 GB/S ```
elsaco commented 1 month ago

On Windows side, after running ssh -L 55555:localhost:54321 elsaco@127.0.0.1 inside WSL:

Image

lvfmc85 commented 1 month ago

@lvfmc85 how are you launching the h2o module?

In an venv running:

import h2o
h2o.init()

is starting a cluster bound to 127.0.0.1 and not other IPs. Won't start if the IP address is not localhost:

>>> h2o.init(ip="172.26.102.111", port=54323)
h2o.exceptions.H2OConnectionError: Can only start H2O launcher if IP address is localhost.

Start using defaults:

>>> 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: openjdk version "21.0.4" 2024-07-16; OpenJDK Runtime Environment (build 21.0.4+7-Ubuntu-1ubuntu224.04); OpenJDK 64-Bit Server VM (build 21.0.4+7-Ubuntu-1ubuntu224.04, mixed mode, sharing)
  Starting server from /home/elsaco/myH2O/lib/python3.12/site-packages/h2o/backend/bin/h2o.jar
  Ice root: /tmp/tmp9ne88fne
  JVM stdout: /tmp/tmp9ne88fne/h2o_elsaco_started_from_python.out
  JVM stderr: /tmp/tmp9ne88fne/h2o_elsaco_started_from_python.err
  Server is running at http://127.0.0.1:54321
Connecting to H2O server at http://127.0.0.1:54321 ... successful.
--------------------------  -----------------------------
H2O_cluster_uptime:         01 secs
H2O_cluster_timezone:       America/Los_Angeles
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:        3.46.0.5
H2O_cluster_version_age:    1 month and 16 days
H2O_cluster_name:           H2O_from_python_elsaco_5i0jdz
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    1.433 Gb
H2O_cluster_total_cores:    6
H2O_cluster_allowed_cores:  6
H2O_cluster_status:         locked, healthy
H2O_connection_url:         http://127.0.0.1:54321
H2O_connection_proxy:       {"http": null, "https": null}
H2O_internal_security:      False
Python_version:             3.12.3 final
--------------------------  -----------------------------

Cluster status:

>>> h2o.cluster().show_status()
--------------------------  -----------------------------
H2O_cluster_uptime:         2 mins 40 secs
H2O_cluster_timezone:       America/Los_Angeles
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:        3.46.0.5
H2O_cluster_version_age:    1 month and 16 days
H2O_cluster_name:           H2O_from_python_elsaco_5i0jdz
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    1.426 Gb
H2O_cluster_total_cores:    6
H2O_cluster_allowed_cores:  6
H2O_cluster_status:         locked, healthy
H2O_connection_url:         http://127.0.0.1:54321
H2O_connection_proxy:       {"http": null, "https": null}
H2O_internal_security:      False
Python_version:             3.12.3 final
--------------------------  -----------------------------

Some random test:

>>> res = h2o.api("GET /3/NetworkTest")
>>> res["table"].show()
Network Test: Launched from /127.0.0.1:54321
destination                    1_bytes             1024_bytes          1048576_bytes
-----------------------------  ------------------  ------------------  -------------------
all - collective bcast/reduce  244 usec, 8.0 KB/S  81 usec, 24.1 MB/S  79 usec, 24.52 GB/S
self /127.0.0.1:54321          354 usec, 5.5 KB/S  34 usec, 56.0 MB/S  42 usec, 46.12 GB/S

Logs:

h2o_elsaco_started_from_python.out

elsaco@texas:~$ cat /tmp/tmp9ne88fne/h2o_elsaco_started_from_python.out
14:37:48.775 [main] INFO  hex.tree.xgboost.util.NativeLibrary - Loaded library from lib/linux_64/libxgboost4j_gpu.so (/tmp/libxgboost4j_gpu5556758778119962595.so)
10-15 14:37:48.980 127.0.0.1:54321       2750         main  WARN water.default: H2O is running on a version of Java (21.0.4) that was not certified at the time of the H2O release. For production use please use a certified Java version (versions 8-17 are officially supported).
10-15 14:37:48.981 127.0.0.1:54321       2750         main  INFO water.default: ----- H2O started  -----
10-15 14:37:48.981 127.0.0.1:54321       2750         main  INFO water.default: Build git branch: rel-3.46.0
10-15 14:37:48.981 127.0.0.1:54321       2750         main  INFO water.default: Build git hash: 62c1c2579b6eb97e8813659a5e7b919af8ae0c5f
10-15 14:37:48.982 127.0.0.1:54321       2750         main  INFO water.default: Build git describe: jenkins-3.46.0.4-21-g62c1c2579b6
10-15 14:37:48.982 127.0.0.1:54321       2750         main  INFO water.default: Build project version: 3.46.0.5
10-15 14:37:48.982 127.0.0.1:54321       2750         main  INFO water.default: Build age: 1 month and 16 days
10-15 14:37:48.983 127.0.0.1:54321       2750         main  INFO water.default: Built by: 'jenkins'
10-15 14:37:48.983 127.0.0.1:54321       2750         main  INFO water.default: Built on: '2024-08-29 11:51:54'
10-15 14:37:48.983 127.0.0.1:54321       2750         main  INFO water.default: Found H2O Core extensions: [XGBoost, KrbStandalone, Infogram]
10-15 14:37:48.983 127.0.0.1:54321       2750         main  INFO water.default: Processed H2O arguments: [-ip, 127.0.0.1, -web_ip, 127.0.0.1, -baseport, 54321, -ice_root, /tmp/tmp9ne88fne, -name, H2O_from_python_elsaco_5i0jdz, -log_level, INFO, -allow_unsupported_java]
10-15 14:37:48.984 127.0.0.1:54321       2750         main  INFO water.default: Java availableProcessors: 6
10-15 14:37:48.984 127.0.0.1:54321       2750         main  INFO water.default: Java heap totalMemory: 96.0 MB
10-15 14:37:48.984 127.0.0.1:54321       2750         main  INFO water.default: Java heap maxMemory: 1.45 GB
10-15 14:37:48.985 127.0.0.1:54321       2750         main  INFO water.default: Java version: Java 21.0.4 (from Ubuntu)
10-15 14:37:48.985 127.0.0.1:54321       2750         main  INFO water.default: JVM launch parameters: [-ea]
10-15 14:37:48.985 127.0.0.1:54321       2750         main  INFO water.default: JVM process id: 2750@texas
10-15 14:37:48.986 127.0.0.1:54321       2750         main  INFO water.default: OS version: Linux 5.15.153.1-microsoft-standard-WSL2 (amd64)
10-15 14:37:48.986 127.0.0.1:54321       2750         main  INFO water.default: Machine physical memory: 5.79 GB
10-15 14:37:48.987 127.0.0.1:54321       2750         main  INFO water.default: Machine locale: en
10-15 14:37:48.987 127.0.0.1:54321       2750         main  INFO water.default: X-h2o-cluster-id: 1729028267338
10-15 14:37:48.987 127.0.0.1:54321       2750         main  INFO water.default: User name: 'elsaco'
10-15 14:37:48.987 127.0.0.1:54321       2750         main  INFO water.default: IPv6 stack selected: false
10-15 14:37:48.988 127.0.0.1:54321       2750         main  INFO water.default: Network interface is down: name:docker0 (docker0)
10-15 14:37:48.988 127.0.0.1:54321       2750         main  INFO water.default: Possible IP Address: eth0 (eth0), fe80:0:0:0:215:5dff:fe52:8650%eth0
10-15 14:37:48.988 127.0.0.1:54321       2750         main  INFO water.default: Possible IP Address: eth0 (eth0), 172.26.102.111
10-15 14:37:48.988 127.0.0.1:54321       2750         main  INFO water.default: Possible IP Address: lo (lo), 0:0:0:0:0:0:0:1%lo
10-15 14:37:48.989 127.0.0.1:54321       2750         main  INFO water.default: Possible IP Address: lo (lo), 127.0.0.1
10-15 14:37:48.989 127.0.0.1:54321       2750         main  INFO water.default: Selected H2O.CLOUD_MULTICAST_IF: name:lo (lo) doesn't support multicast
10-15 14:37:48.993 127.0.0.1:54321       2750         main  INFO water.default: H2O node running in unencrypted mode.
10-15 14:37:48.994 127.0.0.1:54321       2750         main  INFO water.default: Internal communication uses port: 54322
10-15 14:37:48.994 127.0.0.1:54321       2750         main  INFO water.default: Listening for HTTP and REST traffic on http://127.0.0.1:54321/
10-15 14:37:48.995 127.0.0.1:54321       2750         main  INFO water.default: H2O cloud name: 'H2O_from_python_elsaco_5i0jdz' on /127.0.0.1:54321, discovery address /237.111.34.250:60783
10-15 14:37:48.995 127.0.0.1:54321       2750         main  INFO water.default: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555):
10-15 14:37:48.996 127.0.0.1:54321       2750         main  INFO water.default:   1. Open a terminal and run 'ssh -L 55555:localhost:54321 elsaco@127.0.0.1'
10-15 14:37:48.996 127.0.0.1:54321       2750         main  INFO water.default:   2. Point your browser to http://localhost:55555
10-15 14:37:49.425 127.0.0.1:54321       2750         main  INFO water.default: Kerberos not configured
10-15 14:37:49.425 127.0.0.1:54321       2750         main  INFO water.default: Log dir: '/tmp/tmp9ne88fne/h2ologs'
10-15 14:37:49.426 127.0.0.1:54321       2750         main  INFO water.default: Cur dir: '/home/elsaco'
10-15 14:37:49.435 127.0.0.1:54321       2750         main  INFO water.default: Subsystem for distributed import from HTTP/HTTPS successfully initialized
10-15 14:37:49.435 127.0.0.1:54321       2750         main  INFO water.default: HDFS subsystem successfully initialized
10-15 14:37:49.444 127.0.0.1:54321       2750         main  INFO water.default: S3 subsystem successfully initialized
10-15 14:37:49.457 127.0.0.1:54321       2750         main  INFO water.default: GCS subsystem successfully initialized
10-15 14:37:49.457 127.0.0.1:54321       2750         main  INFO water.default: Drive subsystem not available
10-15 14:37:49.457 127.0.0.1:54321       2750         main  INFO water.default: Flow dir: '/home/elsaco/h2oflows'
10-15 14:37:49.465 127.0.0.1:54321       2750         main  INFO water.default: Cloud of size 1 formed [/127.0.0.1:54321]
10-15 14:37:49.470 127.0.0.1:54321       2750         main  INFO water.default: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV]
10-15 14:37:49.471 127.0.0.1:54321       2750         main  INFO water.default: XGBoost extension initialized
10-15 14:37:49.472 127.0.0.1:54321       2750         main  INFO water.default: KrbStandalone extension initialized
10-15 14:37:49.472 127.0.0.1:54321       2750         main  INFO water.default: Infogram extension initialized
10-15 14:37:49.472 127.0.0.1:54321       2750         main  INFO water.default: Registered 3 core extensions in: 1279ms
10-15 14:37:49.472 127.0.0.1:54321       2750         main  INFO water.default: Registered H2O core extensions: [XGBoost, KrbStandalone, Infogram]
10-15 14:37:49.475 127.0.0.1:54321       2750         main  INFO hex.tree.xgboost.XGBoostExtension: Found XGBoost backend with library: xgboost4j_gpu
10-15 14:37:49.475 127.0.0.1:54321       2750         main  INFO hex.tree.xgboost.XGBoostExtension: XGBoost supported backends: [WITH_GPU, WITH_OMP]
10-15 14:37:49.651 127.0.0.1:54321       2750         main  INFO water.default: Registered: 288 REST APIs in: 179ms
10-15 14:37:49.651 127.0.0.1:54321       2750         main  INFO water.default: Registered REST API extensions: [Mojo 2 pipeline extensions, XGBoost, Amazon S3, Algos, Infogram, AutoML, Core V3, TargetEncoder, Core V4]
10-15 14:37:49.784 127.0.0.1:54321       2750         main  INFO water.default: Registered: 332 schemas in 132ms
10-15 14:37:49.784 127.0.0.1:54321       2750         main  INFO water.default: H2O started in 2321ms
10-15 14:37:49.784 127.0.0.1:54321       2750         main  INFO water.default:
10-15 14:37:49.784 127.0.0.1:54321       2750         main  INFO water.default: Open H2O Flow in your web browser: http://127.0.0.1:54321
10-15 14:37:49.785 127.0.0.1:54321       2750         main  INFO water.default:
10-15 14:37:49.836 127.0.0.1:54321       2750   4422581-30  INFO water.default: GET /3/Metadata/schemas/CloudV3, parms: {}
10-15 14:37:49.842 127.0.0.1:54321       2750   4422581-30  INFO water.default: Locking cloud to new members, because water.api.schemas3.MetadataV3
10-15 14:37:49.886 127.0.0.1:54321       2750   4422581-26  INFO water.default: GET /3/Metadata/schemas/H2OErrorV3, parms: {}
10-15 14:37:49.891 127.0.0.1:54321       2750   4422581-24  INFO water.default: GET /3/Metadata/schemas/H2OModelBuilderErrorV3, parms: {}
10-15 14:37:49.916 127.0.0.1:54321       2750   4422581-25  INFO water.default: POST /4/sessions, parms: {}
10-15 14:37:49.925 127.0.0.1:54321       2750   4422581-28  INFO water.default: POST /99/Rapids, parms: {ast=(setTimeZone "UTC"), session_id=_sid_9554}
10-15 14:43:02.211 127.0.0.1:54321       2750   4422581-29  INFO water.default: POST /99/Rapids, parms: {ast=(tmp= py_1_sid_9554 (ls )), session_id=_sid_9554}
10-15 14:43:02.250 127.0.0.1:54321       2750   4422581-25  INFO water.default: POST /99/Rapids, parms: {ast=(rm py_1_sid_9554), session_id=_sid_9554}
10-15 14:44:51.100 127.0.0.1:54321       2750   4422581-28  INFO water.default: GET /3/NetworkTest, parms: {}
10-15 14:44:51.133 127.0.0.1:54321       2750   4422581-28  INFO water.default: Network Test (Launched from /127.0.0.1:54321):
10-15 14:44:51.133 127.0.0.1:54321       2750   4422581-28  INFO water.default:                   Destination             1 bytes           1024 bytes         1048576 bytes
10-15 14:44:51.133 127.0.0.1:54321       2750   4422581-28  INFO water.default: all - collective bcast/reduce  244 usec, 8.0 KB/S   81 usec, 24.1 MB/S   79 usec, 24.52 GB/S
10-15 14:44:51.134 127.0.0.1:54321       2750   4422581-28  INFO water.default:         self /127.0.0.1:54321  354 usec, 5.5 KB/S   34 usec, 56.0 MB/S   42 usec, 46.12 GB/S

Thank you elsaco. I'm starting h2o with nor arguments "h2o.init()", I already tried forcing the ip to 127.0.0.1 with no results. The image below shows what happens, It stays like this until I cancel (ctrl+c), although it says Image successful, the server won't star, I cannot send any commands or continue my code and the status never pops up.

I tried to connect from windows side like you suggested and this is the result: Image

When I type ctrl+c, this is what I got on python:

Connecting to H2O server at http://127.0.0.1:54321 ... successful. ^CTraceback (most recent call last): File "", line 1, in File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/h2o/h2o.py", line 295, in init h2oconn.cluster.timezone = "UTC" ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/h2o/backend/cluster.py", line 201, in timezone h2o.rapids('(setTimeZone "%s")' % tz) File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/h2o/h2o.py", line 1347, in rapids return ExprNode.rapids(expr) ^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/h2o/expr.py", line 258, in rapids return h2o.api("POST /99/Rapids", data={"ast": expr, "session_id": h2o.connection().session_id}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/h2o/h2o.py", line 123, in api return h2oconn.request(endpoint, data=data, json=json, filename=filename, save_to=save_to) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/h2o/backend/connection.py", line 494, in request resp = requests.request(method=method, url=url, data=rd, json=json, params=params, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/requests/adapters.py", line 589, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/site-packages/urllib3/connection.py", line 464, in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/http/client.py", line 1428, in getresponse response.begin() File "/home/lvfmc/anaconda3/lib/python3.12/http/client.py", line 331, in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/http/client.py", line 292, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lvfmc/anaconda3/lib/python3.12/socket.py", line 708, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^

Here is the h2o_lvfmc_started_from_python.out content: 13:21:36.989 [main] WARN hex.tree.xgboost.util.NativeLibrary - Cannot load library from path lib/linux_64/libxgboost4j_gpu.so 13:21:36.992 [main] WARN hex.tree.xgboost.util.NativeLibrary - Failed to load library from both native path and jar! 13:21:36.992 [main] INFO hex.tree.xgboost.util.NativeLibraryLoaderChain - Cannot load library: xgboost4j_gpu (lib/linux_64/libxgboost4j_gpu.so) 13:21:37.020 [main] INFO hex.tree.xgboost.util.NativeLibrary - Loaded library from lib/linux_64/libxgboost4j_minimal.so (/tmp/libxgboost4j_minimal3813588543585134148.so) 10-16 13:21:37.278 127.0.0.1:54321 829 main INFO water.default: ----- H2O started ----- 10-16 13:21:37.279 127.0.0.1:54321 829 main INFO water.default: Build git branch: rel-3.46.0 10-16 13:21:37.279 127.0.0.1:54321 829 main INFO water.default: Build git hash: 62c1c2579b6eb97e8813659a5e7b919af8ae0c5f 10-16 13:21:37.279 127.0.0.1:54321 829 main INFO water.default: Build git describe: jenkins-3.46.0.4-21-g62c1c2579b6 10-16 13:21:37.279 127.0.0.1:54321 829 main INFO water.default: Build project version: 3.46.0.5 10-16 13:21:37.280 127.0.0.1:54321 829 main INFO water.default: Build age: 1 month and 17 days 10-16 13:21:37.280 127.0.0.1:54321 829 main INFO water.default: Built by: 'jenkins' 10-16 13:21:37.280 127.0.0.1:54321 829 main INFO water.default: Built on: '2024-08-29 11:51:54' 10-16 13:21:37.280 127.0.0.1:54321 829 main INFO water.default: Found H2O Core extensions: [XGBoost, KrbStandalone, Infogram] 10-16 13:21:37.281 127.0.0.1:54321 829 main INFO water.default: Processed H2O arguments: [-ip, 127.0.0.1, -web_ip, 127.0.0.1, -baseport, 54321, -ice_root, /tmp/tmp6oi1d9rw, -name, H2O_from_python_lvfmc_dy0946, -log_level, INFO, -allow_unsupported_java] 10-16 13:21:37.281 127.0.0.1:54321 829 main INFO water.default: Java availableProcessors: 8 10-16 13:21:37.281 127.0.0.1:54321 829 main INFO water.default: Java heap totalMemory: 664.0 MB 10-16 13:21:37.282 127.0.0.1:54321 829 main INFO water.default: Java heap maxMemory: 10.29 GB 10-16 13:21:37.282 127.0.0.1:54321 829 main INFO water.default: Java version: Java 11.0.24 (from Ubuntu) 10-16 13:21:37.282 127.0.0.1:54321 829 main INFO water.default: JVM launch parameters: [-ea] 10-16 13:21:37.282 127.0.0.1:54321 829 main INFO water.default: JVM process id: 829@LAPTOP-TNVR599T 10-16 13:21:37.282 127.0.0.1:54321 829 main INFO water.default: OS version: Linux 5.15.153.1-microsoft-standard-WSL2 (amd64) 10-16 13:21:37.283 127.0.0.1:54321 829 main INFO water.default: Machine physical memory: 41.14 GB 10-16 13:21:37.283 127.0.0.1:54321 829 main INFO water.default: Machine locale: en 10-16 13:21:37.283 127.0.0.1:54321 829 main INFO water.default: X-h2o-cluster-id: 1729095695628 10-16 13:21:37.283 127.0.0.1:54321 829 main INFO water.default: User name: 'lvfmc' 10-16 13:21:37.284 127.0.0.1:54321 829 main INFO water.default: IPv6 stack selected: false 10-16 13:21:37.284 127.0.0.1:54321 829 main INFO water.default: Possible IP Address: eth0 (eth0), fe80:0:0:0:215:5dff:fe62:eb94%eth0 10-16 13:21:37.284 127.0.0.1:54321 829 main INFO water.default: Possible IP Address: eth0 (eth0), 172.18.24.159 10-16 13:21:37.284 127.0.0.1:54321 829 main INFO water.default: Possible IP Address: lo (lo), 0:0:0:0:0:0:0:1%lo 10-16 13:21:37.285 127.0.0.1:54321 829 main INFO water.default: Possible IP Address: lo (lo), 10.255.255.254 10-16 13:21:37.285 127.0.0.1:54321 829 main INFO water.default: Possible IP Address: lo (lo), 127.0.0.1 10-16 13:21:37.285 127.0.0.1:54321 829 main INFO water.default: Selected H2O.CLOUD_MULTICAST_IF: name:lo (lo) doesn't support multicast 10-16 13:21:37.291 127.0.0.1:54321 829 main INFO water.default: H2O node running in unencrypted mode. 10-16 13:21:37.292 127.0.0.1:54321 829 main INFO water.default: Internal communication uses port: 54322 10-16 13:21:37.293 127.0.0.1:54321 829 main INFO water.default: Listening for HTTP and REST traffic on http://127.0.0.1:54321/ 10-16 13:21:37.294 127.0.0.1:54321 829 main INFO water.default: H2O cloud name: 'H2O_from_python_lvfmc_dy0946' on /127.0.0.1:54321, discovery address /230.240.123.85:59120 10-16 13:21:37.294 127.0.0.1:54321 829 main INFO water.default: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555): 10-16 13:21:37.294 127.0.0.1:54321 829 main INFO water.default: 1. Open a terminal and run 'ssh -L 55555:localhost:54321 lvfmc@127.0.0.1' 10-16 13:21:37.294 127.0.0.1:54321 829 main INFO water.default: 2. Point your browser to http://localhost:55555 10-16 13:21:38.040 127.0.0.1:54321 829 main INFO water.default: Kerberos not configured 10-16 13:21:38.040 127.0.0.1:54321 829 main INFO water.default: Log dir: '/tmp/tmp6oi1d9rw/h2ologs' 10-16 13:21:38.040 127.0.0.1:54321 829 main INFO water.default: Cur dir: '/home/lvfmc' 10-16 13:21:38.047 127.0.0.1:54321 829 main INFO water.default: Subsystem for distributed import from HTTP/HTTPS successfully initialized 10-16 13:21:38.047 127.0.0.1:54321 829 main INFO water.default: HDFS subsystem successfully initialized 10-16 13:21:38.049 127.0.0.1:54321 829 main INFO water.default: S3 subsystem successfully initialized 10-16 13:21:38.058 127.0.0.1:54321 829 main INFO water.default: GCS subsystem successfully initialized 10-16 13:21:38.058 127.0.0.1:54321 829 main INFO water.default: Drive subsystem not available 10-16 13:21:38.058 127.0.0.1:54321 829 main INFO water.default: Flow dir: '/home/lvfmc/h2oflows' 10-16 13:21:38.065 127.0.0.1:54321 829 main INFO water.default: Cloud of size 1 formed [/127.0.0.1:54321] 10-16 13:21:38.074 127.0.0.1:54321 829 main INFO water.default: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV] 10-16 13:21:38.076 127.0.0.1:54321 829 main INFO water.default: XGBoost extension initialized 10-16 13:21:38.076 127.0.0.1:54321 829 main INFO water.default: KrbStandalone extension initialized 10-16 13:21:38.076 127.0.0.1:54321 829 main INFO water.default: Infogram extension initialized 10-16 13:21:38.077 127.0.0.1:54321 829 main INFO water.default: Registered 3 core extensions in: 1309ms 10-16 13:21:38.077 127.0.0.1:54321 829 main INFO water.default: Registered H2O core extensions: [XGBoost, KrbStandalone, Infogram] 10-16 13:21:38.080 127.0.0.1:54321 829 main INFO hex.tree.xgboost.XGBoostExtension: Found XGBoost backend with library: xgboost4j_minimal 10-16 13:21:38.081 127.0.0.1:54321 829 main WARN hex.tree.xgboost.XGBoostExtension: Your system supports only minimal version of XGBoost (no GPUs, no multithreading)! 10-16 13:21:38.268 127.0.0.1:54321 829 main INFO water.default: Registered: 288 REST APIs in: 191ms 10-16 13:21:38.268 127.0.0.1:54321 829 main INFO water.default: Registered REST API extensions: [Mojo 2 pipeline extensions, XGBoost, Amazon S3, Algos, Infogram, AutoML, Core V3, TargetEncoder, Core V4] 10-16 13:21:38.358 127.0.0.1:54321 829 main INFO water.default: Registered: 332 schemas in 89ms 10-16 13:21:38.358 127.0.0.1:54321 829 main INFO water.default: H2O started in 2722ms 10-16 13:21:38.358 127.0.0.1:54321 829 main INFO water.default: 10-16 13:21:38.359 127.0.0.1:54321 829 main INFO water.default: Open H2O Flow in your web browser: http://127.0.0.1:54321 10-16 13:21:38.359 127.0.0.1:54321 829 main INFO water.default: 10-16 13:21:38.487 127.0.0.1:54321 829 6918683-21 INFO water.default: GET /3/Metadata/schemas/CloudV3, parms: {} 10-16 13:21:38.492 127.0.0.1:54321 829 6918683-21 INFO water.default: Locking cloud to new members, because water.api.schemas3.MetadataV3 10-16 13:21:41.152 127.0.0.1:54321 829 FJ-126-15 INFO water.default: Cloud of size 2 formed [/127.0.0.1:54321, /10.255.255.254:54321] 10-16 13:21:41.200 127.0.0.1:54321 829 6918683-15 INFO water.default: GET /3/Metadata/schemas/H2OErrorV3, parms: {} 10-16 13:21:41.205 127.0.0.1:54321 829 6918683-19 INFO water.default: GET /3/Metadata/schemas/H2OModelBuilderErrorV3, parms: {} 10-16 13:21:41.230 127.0.0.1:54321 829 6918683-18 INFO water.default: POST /4/sessions, parms: {} 10-16 13:21:41.241 127.0.0.1:54321 829 6918683-21 INFO water.default: POST /99/Rapids, parms: {ast=(setTimeZone "UTC"), session_id=_sid_b2eb} 10-16 13:21:41.258 127.0.0.1:54321 829 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?] 10-16 13:21:46.262 127.0.0.1:54321 829 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?] 10-16 13:21:51.264 127.0.0.1:54321 829 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?] 10-16 13:21:56.266 127.0.0.1:54321 829 .254:54321 ERROR water.default: Got IO error when sending a batch of bytes: java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) ~[?:?] at sun.nio.ch.Net.connect(Net.java:483) ~[?:?] at sun.nio.ch.Net.connect(Net.java:472) ~[?:?] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692) ~[?:?] at water.H2ONode.openChan(H2ONode.java:496) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.openChan(H2ONode.java:634) ~[h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.sendBuffer(H2ONode.java:608) [h2o.jar:?] at water.H2ONode$SmallMessagesSendThread.run(H2ONode.java:592) [h2o.jar:?]

I did a fresh windows 11 pro this morning. Updated windows. the drivers, installed wsl wsl.exe --install, updated the system (sudo apt update && sudo apt upgrade), installed the last anaconda version, installed jdk 17, installed the last h2o version and I got the same problem. My windows 11 is pro PT-BR. Any idea? Thank you so much!

lvfmc85 commented 1 month ago

Hello everyone,

After further investigation, I've identified the root cause of the issue with running H2O in WSL. The problem arises specifically after updating from WSL version 2.1.5 to 2.2.1.

What I Found:

The H2O execution works perfectly in WSL version 2.1.5.

The issue appears immediately after updating to WSL version 2.2.1.

Changes in version 2.2.1, such as enabling DNS tunneling by default and other kernel updates, might be contributing factors.

Solution:

For now, the solution is to revert to WSL version 2.1.5, where H2O runs without any problems. Here are the steps I took to resolve the issue:

Uninstall WSL

Removed the current WSL version using PowerShell. wsl --uninstall

Obs.: Although I haven't done it, I think it would be a good safety measure to make a backup of the Linux distro before uninstalling WSL.

Install WSL Version 2.1.5: Downloaded and installed the WSL 2.1.5 https://github.com/microsoft/WSL/releases/tag/2.1.5

This workaround allows me to use H2O effectively until a permanent fix is provided in future updates of WSL.

I hope this helps anyone facing similar issues. If the WSL team needs more information or further testing, please let me know.

zcobol commented 1 month ago

@lvfmc85 disable DNS tunneling by adding dnsTunneling=false to your wslconfig.

Also, try running as sudo. It looks like permission issue.

(h2o) zcobol@eleven:~$ sudo ./h2o/bin/python
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import h2o
>>> 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: openjdk version "21.0.4" 2024-07-16; OpenJDK Runtime Environment (build 21.0.4+7-Ubuntu-1ubuntu222.04); OpenJDK 64-Bit Server VM (build 21.0.4+7-Ubuntu-1ubuntu222.04, mixed mode, sharing)
  Starting server from /home/zcobol/h2o/lib/python3.10/site-packages/h2o/backend/bin/h2o.jar
  Ice root: /tmp/tmpjtl6ji5t
  JVM stdout: /tmp/tmpjtl6ji5t/h2o_root_started_from_python.out
  JVM stderr: /tmp/tmpjtl6ji5t/h2o_root_started_from_python.err
  Server is running at http://127.0.0.1:54321
Connecting to H2O server at http://127.0.0.1:54321 ... successful.
--------------------------  -----------------------------
H2O_cluster_uptime:         01 secs
H2O_cluster_timezone:       America/Los_Angeles
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:        3.46.0.5
H2O_cluster_version_age:    1 month and 17 days
H2O_cluster_name:           H2O_from_python_root_qr0pif
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    1.924 Gb
H2O_cluster_total_cores:    6
H2O_cluster_allowed_cores:  6
H2O_cluster_status:         locked, healthy
H2O_connection_url:         http://127.0.0.1:54321
H2O_connection_proxy:       {"http": null, "https": null}
H2O_internal_security:      False
Python_version:             3.10.12 final
--------------------------  -----------------------------
>>>

WSL info:

WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22631.4317
lvfmc85 commented 1 month ago

@lvfmc85 disable DNS tunneling by adding dnsTunneling=false to your wslconfig.

Also, try running as sudo. It looks like permission issue.

(h2o) zcobol@eleven:~$ sudo ./h2o/bin/python
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import h2o
>>> 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: openjdk version "21.0.4" 2024-07-16; OpenJDK Runtime Environment (build 21.0.4+7-Ubuntu-1ubuntu222.04); OpenJDK 64-Bit Server VM (build 21.0.4+7-Ubuntu-1ubuntu222.04, mixed mode, sharing)
  Starting server from /home/zcobol/h2o/lib/python3.10/site-packages/h2o/backend/bin/h2o.jar
  Ice root: /tmp/tmpjtl6ji5t
  JVM stdout: /tmp/tmpjtl6ji5t/h2o_root_started_from_python.out
  JVM stderr: /tmp/tmpjtl6ji5t/h2o_root_started_from_python.err
  Server is running at http://127.0.0.1:54321
Connecting to H2O server at http://127.0.0.1:54321 ... successful.
--------------------------  -----------------------------
H2O_cluster_uptime:         01 secs
H2O_cluster_timezone:       America/Los_Angeles
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:        3.46.0.5
H2O_cluster_version_age:    1 month and 17 days
H2O_cluster_name:           H2O_from_python_root_qr0pif
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    1.924 Gb
H2O_cluster_total_cores:    6
H2O_cluster_allowed_cores:  6
H2O_cluster_status:         locked, healthy
H2O_connection_url:         http://127.0.0.1:54321
H2O_connection_proxy:       {"http": null, "https": null}
H2O_internal_security:      False
Python_version:             3.10.12 final
--------------------------  -----------------------------
>>>

WSL info:

WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22631.4317

Thank you so much, @zcobol. I updated WSL to the latest version (2.3.24.0) and added dnsTunneling=false to my .wslconfig. h2o worked perfectly, no need to use sudo. That's great! Do you know of any downsides to disabling DNS tunneling? I mean, is it okay to leave it disabled, or should I expect any limitations because of this? Anyway, your solution worked great. Thank you so much!"