在將 Oracle 資料庫虛擬機克隆並修改 IP/主機名後啟動實例,遭遇 ORA-07445 [kslgetl()+120] 核心傾印與 ORA-00108: failed to set up dispatcher 錯誤。本文記錄完整排查過程、根因定位與修復步驟,供同類環境遷移參考。
Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
Linux 2.6.32-200.13.1.el5uek (Oracle Unbreakable Enterprise Kernel)
Instance Name: epps
Errors in file /u01/app/oracle/admin/epps/bdump/epps_ora_5109.trc:
ORA-07445: exception encountered: core dump [kslgetl()+120] [SIGSEGV] [Address not mapped to object] [0x000000208]
ORA-00108: failed to set up dispatcher to accept connection asynchronously
dispatcher 'D000' encountered error getting listening address
NS Primary Error: TNS-12533: TNS:illegal ADDRESS parameters
NS Secondary Error: TNS-12560: TNS:protocol adapter error
NT Generic Error: TNS-00503: Illegal ADDRESS parameters
Warning: keltnfy call to ldmInit failed with error 46
network error encountered getting listening address:
NS Primary Error: TNS-12533: TNS:illegal ADDRESS parameters
NS Secondary Error: TNS-12560: TNS:protocol adapter error
NT Generic Error: TNS-00503: Illegal ADDRESS parameters
OPIRIP: Uncaught error 108. Error stack:
ORA-00108: failed to set up dispatcher to accept connection asynchronously
Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x208, PC: [0x75f178, kslgetl()+120]
kslgetl() 記憶體存取違規 (SIGSEGV)。TNS-12533 / TNS-00503: Illegal ADDRESS parameters 表明監聽地址解析異常。listener.ora, tnsnames.ora, /etc/hosts) 與實際主機名不一致,Dispatcher 解析本地監聽地址失敗,進而觸發內部 Latch (kslgetl) 競爭異常。[oracle@getlnx01uat ~]$ hostname
getlnx01uat.esquel.com
[oracle@getlnx01uat ~]$ ping getlnx01uat.esquel.com
# 此時可通,但檢查 /etc/hosts 發現條目錯誤
[oracle@getlnx01uat ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
xxxx getlnx01uat.com getlnx01uat # 缺少 .esquel.com 完整 FQDN
/etc/hosts 中主機名條目不完整 (getlnx01uat.com vs 實際 getlnx01uat.esquel.com),導致 Dispatcher 解析本地端點時參數非法,觸發底層 Latch 錯誤進而 Core Dump。/etc/hosts,確保主機名解析正確:
# 正確格式
127.0.0.1 localhost.localdomain localhost
192.168.x.x getlnx01uat.esquel.com getlnx01uat
listener.ora 與 tnsnames.ora 中的 HOST 參數是否為正確 IP 或可解析主機名。SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP;
LSNRCTL> services
# 應看到 D000 狀態 READY
DISPATCHERS 參數設定 (如 (PROTOCOL=TCP)(DISPATCHERS=3))。/etc/hosts:新 IP 對應完整 FQDN 與短主機名。/etc/sysconfig/network (或 /etc/hostname):永久主機名設定。listener.ora:HOST = 新IP或主機名。tnsnames.ora:服務條目指向新 IP/主機名。sqlnet.ora:NAMES.DIRECTORY_PATH=(TNSNAMES, HOSTNAME)。LOCAL_LISTENER、REMOTE_LISTENER 指向正確端點。hostname -f 回傳完整 FQDN。克隆虛擬機修改網路身份後,/etc/hosts 主機名解析不一致 是導致 Dispatcher 啟動失敗、進而觸發 ORA-07445/ORA-00108 的常見根因。建立標準化遷移檢查清單,確保作業系統層面的網路身份 (hostname, /etc/hosts, DNS) 與 Oracle 網路配置 (listener.ora, tnsnames.ora, LOCAL_LISTENER) 完全一致,可避免此類難以診斷的核心錯誤。