java - H2OServerError : Server process terminated with error code 1 in Python on Mac while running h2o. 初始化()

标签 java python macos h2o

我已经使用 pip install 安装了 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: java version "10.0.1" 2018-04-17; Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10); Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
  Starting server from /anaconda3/lib/python3.6/site-packages/h2o/backend/bin/h2o.jar
  Ice root: /var/folders/cm/rqcrr3rx145f85_k4z_1vkfm0000gn/T/tmpafw3fd0y
  JVM stdout: /var/folders/cm/rqcrr3rx145f85_k4z_1vkfm0000gn/T/tmpafw3fd0y/h2o_nikhil_started_from_python.out
  JVM stderr: /var/folders/cm/rqcrr3rx145f85_k4z_1vkfm0000gn/T/tmpafw3fd0y/h2o_nikhil_started_from_python.err
---------------------------------------------------------------------------
H2OConnectionError                        Traceback (most recent call last)
/anaconda3/lib/python3.6/site-packages/h2o/h2o.py in init(url, ip, port, https, insecure, username, password, cookies, proxy, start_h2o, nthreads, ice_root, enable_assertions, max_mem_size, min_mem_size, strict_version_check, ignore_config, extra_classpath, **kwargs)
    251                                      _msgs=("Checking whether there is an H2O instance running at {url}",
--> 252                                             "connected.", "not found."))
    253     except H2OConnectionError:

/anaconda3/lib/python3.6/site-packages/h2o/backend/connection.py in open(server, url, ip, port, https, auth, verify_ssl_certificates, proxy, cookies, verbose, _msgs)
    317             conn._timeout = 3.0
--> 318             conn._cluster = conn._test_connection(retries, messages=_msgs)
    319             # If a server is unable to respond within 1s, it should be considered a bug. However we disable this

/anaconda3/lib/python3.6/site-packages/h2o/backend/connection.py in _test_connection(self, max_retries, messages)
    587             raise H2OConnectionError("Could not establish link to the H2O cloud %s after %d retries\n%s"
--> 588                                      % (self._base_url, max_retries, "\n".join(errors)))
    589 

H2OConnectionError: Could not establish link to the H2O cloud http://localhost:54321 after 5 retries
[28:07.29] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x111d2b080>: Failed to establish a new connection: [Errno 61] Connection refused',))
[28:07.50] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x111d1c978>: Failed to establish a new connection: [Errno 61] Connection refused',))
[28:07.71] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x111d2ba58>: Failed to establish a new connection: [Errno 61] Connection refused',))
[28:07.93] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x111d4b160>: Failed to establish a new connection: [Errno 61] Connection refused',))
[28:08.14] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x111d4b828>: Failed to establish a new connection: [Errno 61] Connection refused',))

在处理上述异常的过程中,又发生了一个异常:

H2OServerError                            Traceback (most recent call last)
<ipython-input-10-95453bf1556d> in <module>()
----> 1 h2o.init()

/anaconda3/lib/python3.6/site-packages/h2o/h2o.py in init(url, ip, port, https, insecure, username, password, cookies, proxy, start_h2o, nthreads, ice_root, enable_assertions, max_mem_size, min_mem_size, strict_version_check, ignore_config, extra_classpath, **kwargs)
    259             raise H2OConnectionError('Can only start H2O launcher if IP address is localhost.')
    260         hs = H2OLocalServer.start(nthreads=nthreads, enable_assertions=enable_assertions, max_mem_size=mmax,
--> 261                                   min_mem_size=mmin, ice_root=ice_root, port=port, extra_classpath=extra_classpath)
    262         h2oconn = H2OConnection.open(server=hs, https=https, verify_ssl_certificates=not insecure,
    263                                      auth=auth, proxy=proxy,cookies=cookies, verbose=True)

/anaconda3/lib/python3.6/site-packages/h2o/backend/server.py in start(jar_path, nthreads, enable_assertions, max_mem_size, min_mem_size, ice_root, port, extra_classpath, verbose)
    119         if verbose: print("Attempting to start a local H2O server...")
    120         hs._launch_server(port=port, baseport=baseport, nthreads=int(nthreads), ea=enable_assertions,
--> 121                           mmax=max_mem_size, mmin=min_mem_size)
    122         if verbose: print("  Server is running at %s://%s:%d" % (hs.scheme, hs.ip, hs.port))
    123         atexit.register(lambda: hs.shutdown())

/anaconda3/lib/python3.6/site-packages/h2o/backend/server.py in _launch_server(self, port, baseport, mmax, mmin, ea, nthreads)
    306         while True:
    307             if proc.poll() is not None:
--> 308                 raise H2OServerError("Server process terminated with error code %d" % proc.returncode)
    309             ret = self._get_server_info_from_logs()
    310             if ret:

H2OServerError: Server process terminated with error code 1

最佳答案

目前不支持 Java 版本 10。 尝试安装 Java 版本 8。

关于java - H2OServerError : Server process terminated with error code 1 in Python on Mac while running h2o. 初始化(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51948440/

相关文章:

java - 禁用 fragment 返回堆栈动画 - Android

java - toArray() 与 toArray(new Object[0])

java - 显示标签 pdf 导出未下载

python - Gunicorn 在被 supervisord 调用时抛出 OSError 打开文件

macos - Lion (10.7) 不支持 Convert(1)。动态库错误

macos - 与 GL_STENCIL_BITS 等效的桌面 OpenGL 是什么?

java - 用javascript语言编译JasperReport时出现异常

python - 如何使用pymysql清除SScursor的缓冲区?

Flask 中的 Python 多处理

objective-c - 是否可以知道鼠标附近显示的是什么文本?