[英]h20.init() Not working giving h20connectionerror and h20startuperror
Hey I am using anaconda environment, and have successfully installed h20-py library and all.嘿,我正在使用 anaconda 环境,并已成功安装 h20-py 库等。 It's just that when I try to run h2o.init() it gives me the following error
只是当我尝试运行 h2o.init() 时,它给了我以下错误
H2OConnectionError Traceback (most recent call last)
~/opt/anaconda3/envs/py36/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:
~/opt/anaconda3/envs/py36/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
~/opt/anaconda3/envs/py36/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
[06:14.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 0x7fd0f913b390>: Failed to establish a new connection: [Errno 61] Connection refused',))
[06:14.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 0x7fd0f913ba58>: Failed to establish a new connection: [Errno 61] Connection refused',))
[06:14.92] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd1186fd160>: Failed to establish a new connection: [Errno 61] Connection refused',))
[06:15.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 0x7fd1186fd828>: Failed to establish a new connection: [Errno 61] Connection refused',))
[06:15.35] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd1186fdef0>: Failed to establish a new connection: [Errno 61] Connection refused',))
During handling of the above exception, another exception occurred:
H2OStartupError Traceback (most recent call last)
<ipython-input-3-95453bf1556d> in <module>
----> 1 h2o.init()
~/opt/anaconda3/envs/py36/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)
~/opt/anaconda3/envs/py36/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)
110 hs = H2OLocalServer()
111 hs._verbose = bool(verbose)
--> 112 hs._jar_path = hs._find_jar(jar_path)
113 hs._extra_classpath = extra_classpath
114 hs._ice_root = ice_root
~/opt/anaconda3/envs/py36/lib/python3.6/site-packages/h2o/backend/server.py in _find_jar(self, path0)
204 return jp
205 raise H2OStartupError("Cannot start local server: h2o.jar not found. Paths searched:\n" +
--> 206 "".join(" %s\n" % s for s in searched_paths))
207
208 @staticmethod
H2OStartupError: Cannot start local server: h2o.jar not found. Paths searched:
/Users/sharozearcher/opt/anaconda3/envs/py36/lib/python3.6/site-packages/h2o/backend/bin/h2o.jar
/Users/sharozearcher/opt/anaconda3/envs/py36/h2o_jar/h2o.jar
/usr/local/h2o_jar/h2o.jar
/Users/sharozearcher/opt/anaconda3/envs/py36/local/h2o_jar/h2o.jar
/Users/sharozearcher/.local/h2o_jar/h2o.jar
/Users/sharozearcher/opt/anaconda3/envs/py36/h2o_jar/h2o.jar
Any help would be appreciated.任何帮助,将不胜感激。
PS I'm using Jupyter Notebook PS我正在使用Jupyter Notebook
I tried conda install -c h2oai h2o
in new environment and everything works fine for me.我在新环境中尝试了
conda install -c h2oai h2o
,一切对我来说都很好。
It seems that you have installed only client version of the package which does not include h2o.jar.您似乎只安装了 package 的客户端版本,其中不包括 h2o.jar。 Can you provide your commands to reproduce it?
你能提供你的命令来重现它吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.