1

我在只有 2 个节点的计算机集群中安装了 HDP 2.6。每个节点都有

  • 处理器 2 核
  • 内存 8 GB
  • 硬盘 40 GB

在此处输入图像描述

我也安装了 Apache Hadoop 2.7.3。因此,我可以使用 YARN 运行 H2O 3.11.4.8。但是,当我尝试使用带有 R 的 500 MB 数据集构建深度学习模型时发生错误。这是错误

Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = urlSuffix,  : 
  Unexpected CURL error: Failed connect to 172.16.0.14:54321; Connection refused
Calls: h2o.deeplearning ... tryCatchOne -> doTryCatch -> .h2o.doSafeGET -> .h2o.doSafeREST
In addition: Warning message:
In .verify_dataxy(training_frame, x, y, autoencoder) :
  removing response variable from the explanatory variables
Execution halted
Error in .h2o.__checkConnectionHealth() : 
  H2O connection has been severed. Cannot connect to instance at http://172.16.0.14:54321/
Failed connect to 172.16.0.14:54321; Connection refused
Calls: <Anonymous> -> .h2o.__remoteSend -> .h2o.__checkConnectionHealth

在使用 R 之前,我也使用 Python。但是,我再次收到类似的错误。该错误表明我的请求包有问题,因为该包无法与 H2O 建立新连接。这是我使用 Python API 时的错误。

H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321): Max retries     exceeded with url: /3/Jobs/$0301ac10000e32d4ffffffff$_91d77c50e0aff3019565b9b6dddc4c69 (Caused by     NewConnectionError('<urllib3.connection.HTTPConnection object at 0xc21fa10>: Failed to establish a new     connection: [Errno 111] Connection refused',))
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/h2o/utils/debugging.py", line 95, in _except_hook
_handle_soft_error(exc_type, exc_value, exc_tb)
File "/usr/lib/python2.7/site-packages/h2o/utils/debugging.py", line 225, in _handle_soft_error
args_str = _get_args_str(func, highlight=highlight)
File "/usr/lib/python2.7/site-packages/h2o/utils/debugging.py", line 316, in _get_args_str
s = str(inspect.signature(func))[1:-1]
AttributeError: 'module' object has no attribute 'signature'
Original exception was:
Traceback (most recent call last):
File "hadoop-sed.py", line 18, in <module>
y="I_TORNADO_LOGICAL", training_frame=training, validation_frame=validation)
File "/usr/lib/python2.7/site-packages/h2o/estimators/estimator_base.py", line 204, in train
model.poll()
File "/usr/lib/python2.7/site-packages/h2o/job.py", line 54, in poll
pb.execute(self._refresh_job_status)
File "/usr/lib/python2.7/site-packages/h2o/utils/progressbar.py", line 160, in execute
res = progress_fn()  # may raise StopIteration
File "/usr/lib/python2.7/site-packages/h2o/job.py", line 89, in _refresh_job_status
jobs = h2o.api("GET /3/Jobs/%s" % self.job_key)
File "/usr/lib/python2.7/site-packages/h2o/h2o.py", line 99, in api
return h2oconn.request(endpoint, data=data, json=json, filename=filename, save_to=save_to)
File "/usr/lib/python2.7/site-packages/h2o/backend/connection.py", line 410, in request
raise H2OConnectionError("Unexpected HTTP error: %s" % e)
h2o.exceptions.H2OConnectionError: Unexpected HTTP error: HTTPConnectionPool(host='localhost', port=54321):
Max retries exceeded with url: /3/Jobs/$0301ac10000e32d4ffffffff$_91d77c50e0aff3019565b9b6dddc4c69 (Caused by     NewConnectionError('<urllib3.connection.HTTPConnection object at 0xc21fa10>: Failed to establish a new     connection: [Errno 111] Connection refused',))

从这个错误中,我试图弄清楚为什么会发生这种情况。我得到了一些关于它的重要信息。

  1. Hadoop 部分中的 H2O 文档(很抱歉没有提供链接,我的声誉很低),H2O 应该使用 6 GB 的 RAM 运行。用我之前提供的截图。RAM 不是问题。

  2. 社区 H2O 问题“H2O 内存要求”,它说 RAM 大小应该是数据集大小的 4 倍。因为我的数据集是500MB,应该是通过了。

从这些信息中,我得出一个结论,即我的集群足以毫无问题地处理数据集。所以,问题不应该来自硬件。

我从与我的问题类似的问题中得到了更好的线索。

  1. 社区 H2O 问题“.h2o.doSafeREST 中的错误:无法解析主机:localhost”。它在回答点 2 中说。这是因为“H2O 仍在为先前的请求提供服务,而该请求无法通过”。

我认为 R 和 Python 中的 API 使用 Curl 和连接 H2O Rest API 的请求。由于请求太多,H2O Server 无法处理它并给我这个错误。

我也试图减慢请求,但我不知道该怎么做。您是否有更好的解决方案来解决这个问题。

非常感谢

PS 我在使用 YARN 的苏打水 1.6.11 和 2.1.8 中也遇到了这个问题。尝试使用相同数据集构建深度学习模型时,两者都突然停止工作。

里面的容器在yarn application -list没有我干预的情况下被杀死。我不知道为什么,但我认为这是一个同样的问题。

4

0 回答 0