您好,登錄后才能下訂單哦!
有這樣一個現象,在DB2安裝后,使用db2icrt 來創建實例時,提示主機名無效,提示如下:
[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行),發現有如下內容
[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>
就是當db2isrv -addcfm -i ${INSTNAME?} ${DB2ISRVOPTS?} 返回為3的時候提示主機名稱不正確。<br>
這個db2isrv 找了很多東西,沒找到具體的內容,看名字是給系統增加一個服務。后面是addfmc ,這個fmc是DB2的故障守護進程。<br>
這個是監測DB2實例正常運行,當實例異常宕機后,它會自動啟動實例。那么以上的錯誤可以連起來了:<br>
再給系統增加一個DB2守護進程的時候失敗了,原因是主機名不對。<br>
好的,看一下主機名定義<br>
<p></p>
<p></p><pre name="code" class="plain">[root@centos-0 instance]# hostname
centos-0.msdomain</pre>這沒問題<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>
這個地方不知為什么CENTOS裝好之后沒有修改,修改一下。修改后內容如下<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>
保存再次執行創建實例,正常<p></p>
<p><br>
</p>
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。