import h2o
from h2o.automl import H2OAutoML
h2o.init()
と入力すると下記のようなエラーが出てしまいます。
何がおかしいのでしょうか?
Checking whether there is an H2O instance running at http://localhost:54321 ..... not found.
Attempting to start a local H2O server...
H2OConnectionError Traceback (most recent call last)
~/opt/anaconda3/lib/python3.8/site-packages/h2o/h2o.py in init(url, ip, port, name, https, cacert, insecure, username, password, cookies, proxy, start_h2o, nthreads, ice_root, log_dir, log_level, max_log_file_size, enable_assertions, max_mem_size, min_mem_size, strict_version_check, ignore_config, extra_classpath, jvm_custom_args, bind_to_localhost, **kwargs)
284 try:
--> 285 h2oconn = H2OConnection.open(url=url, ip=ip, port=port, name=name, https=https,
286 verify_ssl_certificates=verify_ssl_certificates, cacert=cacert,
~/opt/anaconda3/lib/python3.8/site-packages/h2o/backend/connection.py in open(server, url, ip, port, name, https, auth, verify_ssl_certificates, cacert, proxy, cookies, verbose, _msgs)
383 conn._timeout = 3.0
--> 384 conn._cluster = conn._test_connection(retries, messages=_msgs)
385 # If a server is unable to respond within 1s, it should be considered a bug. However we disable this
~/opt/anaconda3/lib/python3.8/site-packages/h2o/backend/connection.py in _test_connection(self, max_retries, messages)
682 else:
--> 683 raise H2OConnectionError("Could not establish link to the H2O cloud %s after %d retries\n%s"
684 % (self._base_url, max_retries, "\n".join(errors)))
H2OConnectionError: Could not establish link to the H2O cloud http://localhost:54321 after 5 retries
[33:46.31] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f90808674f0>: Failed to establish a new connection: [Errno 61] Connection refused'))
[33:46.52] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9080867ca0>: Failed to establish a new connection: [Errno 61] Connection refused'))
[33:46.73] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9080867400>: Failed to establish a new connection: [Errno 61] Connection refused'))
[33:46.94] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9080883460>: Failed to establish a new connection: [Errno 61] Connection refused'))
[33:47.15] H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries exceeded with url: /3/Cloud (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9080883c10>: Failed to establish a new connection: [Errno 61] Connection refused'))
During handling of the above exception, another exception occurred:
CalledProcessError Traceback (most recent call last)
<ipython-input-65-198420357647> in <module>
1 import h2o
2 from h2o.automl import H2OAutoML
----> 3 h2o.init()
~/opt/anaconda3/lib/python3.8/site-packages/h2o/h2o.py in init(url, ip, port, name, https, cacert, insecure, username, password, cookies, proxy, start_h2o, nthreads, ice_root, log_dir, log_level, max_log_file_size, enable_assertions, max_mem_size, min_mem_size, strict_version_check, ignore_config, extra_classpath, jvm_custom_args, bind_to_localhost, **kwargs)
299 ' instance of H2O with https manually '
300 '(https://docs.h2o.ai/h2o/latest-stable/h2o-docs/welcome.html#new-user-quick-start).')
--> 301 hs = H2OLocalServer.start(nthreads=nthreads, enable_assertions=enable_assertions, max_mem_size=mmax,
302 min_mem_size=mmin, ice_root=ice_root, log_dir=log_dir, log_level=log_level,
303 max_log_file_size=max_log_file_size, port=port, name=name,
~/opt/anaconda3/lib/python3.8/site-packages/h2o/backend/server.py in start(jar_path, nthreads, enable_assertions, max_mem_size, min_mem_size, ice_root, log_dir, log_level, max_log_file_size, port, name, extra_classpath, verbose, jvm_custom_args, bind_to_localhost)
139
140 if verbose: print("Attempting to start a local H2O server...")
--> 141 hs._launch_server(port=port, baseport=baseport, nthreads=int(nthreads), ea=enable_assertions,
142 mmax=max_mem_size, mmin=min_mem_size, jvm_custom_args=jvm_custom_args,
143 bind_to_localhost=bind_to_localhost, log_dir=log_dir, log_level=log_level, max_log_file_size=max_log_file_size)
~/opt/anaconda3/lib/python3.8/site-packages/h2o/backend/server.py in _launch_server(self, port, baseport, mmax, mmin, ea, nthreads, jvm_custom_args, bind_to_localhost, log_dir, log_level, max_log_file_size)
275 # Find Java and check version. (Note that subprocess.check_output returns the output as a bytes object)
276 java = self._find_java()
--> 277 self._check_java(java, self._verbose)
278
279 if self._verbose:
~/opt/anaconda3/lib/python3.8/site-packages/h2o/backend/server.py in _check_java(java, verbose)
375 @staticmethod
376 def _check_java(java, verbose):
--> 377 jver_bytes = subprocess.check_output([java, "-version"], stderr=subprocess.STDOUT)
378 jver = jver_bytes.decode(encoding="utf-8", errors="ignore")
379 if verbose:
~/opt/anaconda3/lib/python3.8/subprocess.py in check_output(timeout, *popenargs, **kwargs)
409 kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
410
--> 411 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
412 **kwargs).stdout
413
~/opt/anaconda3/lib/python3.8/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
510 retcode = process.poll()
511 if check and retcode:
--> 512 raise CalledProcessError(retcode, process.args,
513 output=stdout, stderr=stderr)
514 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['/usr/bin/java', '-version']' returned non-zero exit status 1.
あなたの回答
tips
プレビュー