使用這項資訊,可在叢集環境中疑難排解 Elasticsearch 和 RabbitMQ 的問題。Elasticsearch 是用於稽核、報告和目錄同步記錄的搜尋與分析引擎,RabbitMQ 則是訊息代理,兩者皆內嵌於 VMware Identity Manager 虛擬應用裝置中。

疑難排解 Elasticsearch

您可以在 VMware Identity Manager 應用裝置中使用下列命令以確認 Elasticsearch 的健全狀況。

curl 'http://localhost:9200/_cluster/health?pretty'

命令應該會傳回如下的結果。

         {
  "cluster_name" : "horizon",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "active_primary_shards" : 20,
  "active_shards" : 40,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0
}

如果 Elasticsearch 未正確啟動,或處於紅色狀態,請遵循下列步驟進行疑難排解。

  1. 確定連接埠 9300 已開啟。
    1. 將叢集中所有節點的 IP 位址新增至 /usr/local/horizon/scripts/updateiptables.hzn 檔案,以更新節點詳細資料:

      ALL_IPS="node1IPadd node2IPadd node3IPadd"

    2. 在叢集中的所有節點上執行下列指令碼。

      /usr/local/horizon/scripts/updateiptables.hzn

  2. 在叢集中的所有節點上重新啟動 Elasticsearch。

    service elasticsearch restart

  3. 查看記錄以取得詳細資料。

    cd /opt/vmware/elasticsearch/logs

    tail -f horizon.log

疑難排解 RabbitMQ

您可以在 VMware Identity Manager 應用裝置中使用下列命令以確認 RabbitMQ 的健全狀況。

rabbitmqctl cluster_status

命令應該會傳回如下的結果。

Cluster status of node 'rabbitmq@node3' ...
[{nodes,[{disc,['rabbitmq@node2','rabbitmq@node3']}]},
 {running_nodes,['rabbitmq@node3']},
 {cluster_name,<<"[email protected]">>},
 {partitions,[]},
 {alarms,[{'rabbitmq@node3',[]}]}]

如果 RabbitMQ 未啟動,或健全狀況 URL https://hostname/SAAS/API/1.0/REST/system/health/ 顯示 "MessagingConnectionOk":"false",請遵循下列步驟進行疑難排解。

  1. 確定連接埠 4369、5700、25672 已開啟。若要開啟連接埠:
    1. 使用下列命令建立檔案:

      touch /usr/local/horizon/conf/flags/enable.rabbitmq

    2. 執行下列指令碼:

      /usr/local/horizon/scripts/updateiptables.hzn

  2. 重新啟動 RabbitMQ。
    1. 結束任何現有的 rabbitmq 程序。
    2. rabbitmqctl stop
    3. rabbitmq-server -detached
  3. 如果 RabbitMQ 未正常啟動,您可能需要重新啟動 VMware Identity Manager 服務。

    service horizon-workspace restart