問題:
在Ambari頁面關閉組件時,始終關閉不成功,重啓 ambari-server、重啓節點都解決不了該問題,日誌中也缺少保存信息??
報錯如下:
On host
hostname
role YARN_CLIENT in invalid state.
Invalid transition. Invalid event: HOST_SVCCOMP_OP_IN_PROGRESS at INSTALL_FAILED
或
On host
hostname
role ELASTICSEARCH_SLAVE in invalid state.
Invalid transition. Invalid event: HOST_SVCCOMP_STOP at STOPPING
原因:
有可能是任務執行時與數據庫連接中斷,導致組件狀態更新失敗。
解決:
登錄元數據庫(例如:mysql)
把組件狀態不正常的數據更新,再去Ambari頁面查看組件狀態(正常)
use ambari;
selecthost_id
from hosts where host_name=’hostname
’;
update hostcomponentstate set current_state=’INSTALLED
’ where current_state=’INSTALL_FAILED
’ and host_id=host_id
;
或(總之把一切不正常的組件數據狀態更新爲正常數據即可
)
update hostcomponentstate set current_state=’INSTALLED
’ where current_state=’STOPPING
’ and host_id=host_id
;