1. 程式人生 > >Ambari某臺主機失去心跳,重啟ambar-server和ambari-agent都不生效

Ambari某臺主機失去心跳,重啟ambar-server和ambari-agent都不生效

"IOError: Request to https://localhost:8441/agent/v1/register/namenode.exterrocloud.info failed due to EOF occurred in violation of protocol (_ssl.c:661)" when starting an Ambari agent

檢視/var/log/ambari-agent/ambari-agent.log日誌列印:

File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 545, in sendRequest
raise IOError('Request to {0} failed due to {1}'.format(url, str(exception)))
IOError: Request to https://localhost:8441/agent/v1/register/namenode.exterrocloud.info 
failed due to EOF occurred in violation of protocol (_ssl.c:661)
ERROR 2018-04-09 07:09:38,185 Controller.py:227 - 
Error:Request to https://localhost:8441/agent/v1/register/namenode.exterrocloud.info 
failed due to EOF occurred in violation of protocol (_ssl.c:661)
WARNING 2018-04-09 07:09:38,185 Controller.py:228 - Sleeping for 27 seconds and 
then trying again

原因:可能是python升級或安裝了某些模組導致

解決辦法:vim /etc/ambari-agent/conf/ambari-agent.ini

在[security] 新增如下一行

[security] 
force_https_protocol=PROTOCOL_TLSv1_2

重啟ambari-agent,# ambari-agent restart