您好,登錄后才能下訂單哦!
有這樣一個(gè)現(xiàn)象,在DB2安裝后,使用db2icrt 來(lái)創(chuàng)建實(shí)例時(shí),提示主機(jī)名無(wú)效,提示如下:
[plain] view plain copy
[root@centos-0 instance]# ./db2icrt -u db2inst1 db2inst1
The host name "centos-0.msdomain" is invalid. Specify a valid host name.
DBI1922N The host name is not valid.
Explanation:
The TCP/IP host name parameter is not valid or does not exist.
User response:
Ensure that TCP/IP is operational on the system. If a domain name server
is used, ensure that the domain name server machine is active. Issue the
command again using the correct TCP/IP host name.
DBI1079I Output is saved in the log file /tmp/db2icrt.log.2816.
Explanation:
All processed and failed operations have been saved into this log file.
User response:
Do not modify this file in any way. This file is for IBM Technical
Support reference.
/opt/ibm/db2/V9.7/instance/db2iutil: line 2528: DB2INSTVER: parameter null or not set
檢查 /opt/ibm/db2/V9.7/instance/db2iutil 文件(非提示的2528行),發(fā)現(xiàn)有如下內(nèi)容
[plain] view plain copy
${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}
if [ $? -eq 3 ]; then
db2isrv
${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}
if [ $? -eq 3 ]; then
display_msg ${DB2CAT?} 922 \
'DBI1922N The host name is not valid.\n'<pre name="code" class="plain"> stop_prog 1</pre> fi<p></p>
<pre></pre>
<br>
就是當(dāng)db2isrv -addcfm -i ${INSTNAME?} ${DB2ISRVOPTS?} 返回為3的時(shí)候提示主機(jī)名稱(chēng)不正確。<br>
這個(gè)db2isrv 找了很多東西,沒(méi)找到具體的內(nèi)容,看名字是給系統(tǒng)增加一個(gè)服務(wù)。后面是addfmc ,這個(gè)fmc是DB2的故障守護(hù)進(jìn)程。<br>
這個(gè)是監(jiān)測(cè)DB2實(shí)例正常運(yùn)行,當(dāng)實(shí)例異常宕機(jī)后,它會(huì)自動(dòng)啟動(dòng)實(shí)例。那么以上的錯(cuò)誤可以連起來(lái)了:<br>
再給系統(tǒng)增加一個(gè)DB2守護(hù)進(jìn)程的時(shí)候失敗了,原因是主機(jī)名不對(duì)。<br>
好的,看一下主機(jī)名定義<br>
<p></p>
<p></p><pre name="code" class="plain">[root@centos-0 instance]# hostname
centos-0.msdomain</pre>這沒(méi)問(wèn)題<br>
再看<p></p>
<p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>
這個(gè)地方不知為什么CENTOS裝好之后沒(méi)有修改,修改一下。修改后內(nèi)容如下<br>
<p></p>
<p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts
127.0.0.1 localhost centos.msdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>
保存再次執(zhí)行創(chuàng)建實(shí)例,正常<p></p>
<p><br>
</p>
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。