Skip to main content

Troubleshooting Tips

Log Files

檔案目錄: /u01/app/oracle/ovm-manager-3/domains/ovm_domain/servers/AdminServer/logs/

  • access.log: Used to track HTTP access to the Web interface of the Oracle VM Manager and to the underlying Oracle WebLogic Server HTTP interface. This log can be used to track access and HTTP operations within Oracle VM Manager to help debug access issues and to audit access to the Oracle VM Manager.
  • AdminServer.log: Used to track events within the underlying Oracle WebLogic Server framework, including events triggered by Oracle VM Manager. This log can be used to track a variety of issues within Oracle VM Manager including TLS/SSL certificate issues, server availability issues, and any actions performed within Oracle VM Manager which are usually identifiable by searching for items containing the string com.oracle.ovm.mgr. Log in failures resulting from locked accounts (as opposed to incorrect credentials) are also in this file.
  • AdminServer-diagnostic.log: Used to track exceptions within the underlying Oracle WebLogic Server framework, including particular events triggered by Oracle VM Manager such as log in failures due to incorrect credentials. This log can be used to track Oracle VM Manager behavior that results in an exception or for log in failure, which can be tracked by searching for the string An incorrect username or password was specified.

Log Parsing Tool: OvmLogTool.py

檔案目錄: /u01/app/oracle/ovm-manager-3/ovm_tools/ , 由於 AdminServer.log 的內容不易讀取,使用這指令格式化 log 內容。

cd /u01/app/oracle/ovm-manager-3/ovm_tools/
python OvmLogTool.py -s -o ~/ovm_logs/summary.`date +%y%m%d_%H%M`

格式化後的結果會儲存在 ~/ovm_logs/summary.<todaty_now>

TIP:

-s , 只會顯示 Error 相關的 Log; 不加則會顯示所有 Log。

Q: 執行手動備份 OVMM 資料庫失敗編輯區段

執行 /u01/app/oracle/ovm-manager-3/ovm_tools/bin/BackupDatabase -w

mysqlbackup: WARNING: The value of 'innodb_checksum_algorithm' option provided to mysqlbackup might be incompatible with server config.
mysqlbackup: ERROR: Page at offset 5242880 in /u01/app/oracle/mysql/data/appfw/APPFW_EVENTS.ibd seems corrupt!

解決方案:

  1. 檢查資料表 APPFW_EVENTS 是否已損壞
  2. 如果已損壞,嘗試執行修復資料表
  3. 如果顯示正常,嘗試手動重建資料表
  4. 再執行備份一次

檢查資料表狀態

mysqlcheck -uroot -p -S /u01/app/oracle/mysql/data/mysqld.sock --databases appfw

mysql -u appfw -p -S /u01/app/oracle/mysql/data/mysqld.sock appfw
mysql> select count(*) from APPFW_EVENTS;
+----------+
| count(*) |
+----------+
|    18650 |
+----------+
1 row in set (0.01 sec)

重建 table APPFW_EVENTS

service ovmm stop
mysqldump -uappfw -p -S /u01/app/oracle/mysql/data/mysqld.sock --databases appfw --tables APPFW_EVENTS > table_dump.appfw_events.sql

mysql -u appfw -p -S /u01/app/oracle/mysql/data/mysqld.sock appfw
mysql> create table APPFW_EVENTS_NEW like APPFW_EVENTS;
mysql> rename table APPFW_EVENTS to APPFW_EVENTS_OLD;
mysql> rename table APPFW_EVENTS_NEW to APPFW_EVENTS;

# Import the table
mysql -uappfw -p -S /u01/app/oracle/mysql/data/mysqld.sock appfw < table_dump.appfw_events.sql

# Drop the old table
mysql -u appfw -p -S /u01/app/oracle/mysql/data/mysqld.sock appfw
mysql> drop table APPFW_EVENTS_OLD;
Q: OVMM 主機的 MySQL DB 耗盡所有磁碟空間

檢查 MySQL 的資料表使用空間
# du -chs /u01/app/oracle/mysql/data/ovs/OVM_STATISTIC*
16K /u01/app/oracle/mysql/data/ovs/OVM_STATISTIC.frm
121G /u01/app/oracle/mysql/data/ovs/OVM_STATISTIC.ibd <===

解決:

  1. 先釋出一些其他的可用空間,使 MySQL 可正常運作。
  2. 關閉 ovmm 服務,避免更多資料的寫入。
  3. 清除資料表 OVM_STATISTIC 的內容。

關閉 ovmm

service ovmm stop

檢查資料表 OVM_STATISTIC 的筆數

mysql -u ovs -p -S /u01/app/oracle/mysql/data/mysqld.sock ovs
Enter password: <網頁登入密碼>
mysql> select count(*) from OVM_STATISTIC;
+-----------+
| count(*)  |
+-----------+
| 184795278 |
+-----------+
1 row in set (6 min 35.98 sec)

清除資料表 OVM_STATISTIC

mysql> truncate table OVM_STATISTIC;

TIP:
truncate 基本上是先執行 drop 再 create,就算有 1 億多筆資料在幾秒鐘就會完成清除。

另一個方式取代 truncate

mysql> create table NEW_OVM_STATISTIC like OVM_STATISTIC;
mysql> rename table OVM_STATISTIC to OLD_OVM_STATISTIC, NEW_OVM_STATISTIC to OVM_STATISTIC;
mysql> drop table OLD_OVM_STATISTIC;
Q: VM 無法結束,使用 Kill 也沒用