VMware vCenter Storage Monitoring Service failed

環境是 vSphere 5 與 VMware vCenter Server Appliance,監控 storage 的服務是 VMware vCenter Storage Monitoring Service 縮寫是 sms。

今天發現從 vCenter Service Status sms 一直 failed,也可以從 vCenter 的這個網址檢查是不是健康 https://vcenter/sms/health.xml。造成跟硬碟效能監控有關的圖都跑不出來,嚴重影響我的測試,十分不悅。

結果去 /var/log/vmware/vpx/sms.log 裡面看到如下的錯誤:

— Cause: org.h2.jdbc.JdbcSQLException: NULL not allowed for column “ENTITYID”; SQL statement:
INSERT INTO scsiTarget ( entityId, wwn, portWwn, nodeWwn, iscsiName, iscsiAlias, type, vendor
) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? ) [90006-147]
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:59)
at com.vmware.vim.sms.provider.VcProviderImpl.populateScsiTargets(VcProviderImpl.java:849)
at com.vmware.vim.sms.provider.VcProviderImpl.access$300(VcProviderImpl.java:41)
at com.vmware.vim.sms.provider.VcProviderImpl$PopulateStorageInfoTask.run(VcProviderImpl.java:3006)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

十分不悅 again..,是 vCenter 的 bug = =?

好險找到這篇文章最後一個回答是解答,這個表裡面有一筆 NULL 的資料因此出了問題。所以找個軟體來連進去資料庫,我這環境是用 oracle,Client 是用 Navicat Premium 登入 Oracle,按照順序檢查有沒有這筆空資料,有的話就刪除。

select * from VPX_PSA_TARGET_TRANSPORT where ISCSI_NAME is NULL AND VPX_TYPE=’vim.host.InternetScsiTargetTransport’;

delete from VPX_PSA_TARGET_TRANSPORT where ISCSI_NAME is NULL AND VPX_TYPE=’vim.host.InternetScsiTargetTransport’;

接著重開 ESXi Service 他就復活拉拉拉阿~~~~~

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *