昨天給某用戶安裝TimesTen Classic 11.2.2.8,前面一切正常,建立只讀緩存組及測試正常。建立AWT緩存組正常,但數據無法複製到Oracle。
檢查日誌,發現不斷報錯:
[timesten@n-pc-nf8260-71 ~/TimesTen/tt1122/info]$tail -f tterrors.log
2019-05-13 12:09:59.89 Err : REP: 67226: [0x7f4b8106e700, 0, Awt] TTDB:transmitter.c(1726): TT16113: Failed to get IP address for host N-PC-NF8260-71. Retry in 60 seconds
2019-05-13 12:10:01.89 Err : REP: 67226: [0x7f4b8106e700, 0, Awt] TTDB:transmitter.c(1726): TT16113: Failed to get IP address for host N-PC-NF8260-71. Retry in 60 seconds
2019-05-13 12:10:03.89 Err : REP: 67226: [0x7f4b8106e700, 0, Awt] TTDB:transmitter.c(1726): TT16113: Failed to get IP address for host N-PC-NF8260-71. Retry in 60 seconds
2019-05-13 12:10:05.89 Err : REP: 67226: [0x7f4b8106e700, 0, Awt] TTDB:transmitter.c(1726): TT16113: Failed to get IP address for host N-PC-NF8260-71. Retry in 60 seconds
2019-05-13 12:10:07.89 Err : REP: 67226: [0x7f4b8106e700, 0, Awt] TTDB:transmitter.c(1726): TT16113: Failed to get IP address for host N-PC-NF8260-71. Retry in 60 seconds
2019-05-13 12:10:09.89 Err : REP: 67226: [0x7f4b8106e700, 0, Awt] TTDB:transmitter.c(1726): TT16113: Failed to get IP address for host N-PC-NF8260-71. Retry in 60 seconds
2019-05-13 12:10:11.89 Err : REP: 67226: [0x7f4b8106e700, 0, Awt] TTDB:transmitter.c(1726): TT16113: Failed to get IP address for host N-PC-NF8260-71. Retry in 60 seconds
......
安裝TimesTen的主機名爲n-pc-nf8260-71。而錯誤中的N-PC-NF8260-71即爲大寫的主機名。
[timesten@n-pc-nf8260-71 ~]$hostname
n-pc-nf8260-71
ping主機名是通的,但解析的地址172.3.11.230並不是我們所需的服務地址:
[timesten@n-pc-nf8260-71 ~]$ping $(hostname)
PING n-pc-nf8260-71 (172.3.11.230) 56(84) bytes of data.
64 bytes from n-pc-nf8260-71 (172.3.11.230): icmp_seq=1 ttl=64 time=0.008 ms
^C
然後在主機名文件中添加解析,解析爲服務地址後,數據馬上自動複製過去了。
vi /etc/hosts
10.0.3.11 n-pc-nf8260-71
原因就是在主機上有多個IP,但解析的不是我們所需的。
結論:
- 要保證ping $(hostname)可以通
- 要保證ping $(hostname)解析的地址是正確的地址。