db2 创建实例 The host name "fordatabase" is invalid. Specify a valid host name.
admin
2023-05-30 14:42:12
0次

有这样一个现象,在DB2安装后,使用db2icrt 来创建实例时,提示主机名无效,提示如下:



[plain] view plain copy

  1. [root@centos-0 instance]# ./db2icrt -u db2inst1 db2inst1  

  2. The host name "centos-0.msdomain" is invalid. Specify a valid host name.   

  3. DBI1922N  The host name is not valid.  

  4.   

  5. Explanation:   

  6.   

  7. The TCP/IP host name parameter is not valid or does not exist.  

  8.   

  9. User response:   

  10.   

  11. Ensure that TCP/IP is operational on the system. If a domain name server  

  12. is used, ensure that the domain name server machine is active. Issue the  

  13. command again using the correct TCP/IP host name.  

  14.   

  15.   

  16. DBI1079I  Output is saved in the log file /tmp/db2icrt.log.2816.  

  17.   

  18. Explanation:   

  19.   

  20. All processed and failed operations have been saved into this log file.  

  21.   

  22. User response:   

  23.   

  24. Do not modify this file in any way. This file is for IBM Technical  

  25. Support reference.  

  26.   

  27.   

  28. /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

  1. ${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}  

  2.   

  3.   

  4.  if [ $? -eq 3 ]; then  

  5.   

  6. db2isrv  

  7.   

  8.   

  9.   

  10. ${DB2DIR?}/instance/db2isrv -addfcm -i ${INSTNAME?} ${DB2ISRVOPTS?}  

  11.         if [ $? -eq 3 ]; then  

  12.             display_msg ${DB2CAT?} 922 \  

  13.                         'DBI1922N  The host name is not valid.\n'            stop_prog 1 fi

      

  14.   


  15.   

  16. 就是当db2isrv -addcfm -i ${INSTNAME?} ${DB2ISRVOPTS?} 返回为3的时候提示主机名称不正确。
      

  17. 这个db2isrv 找了很多东西,没找到具体的内容,看名字是给系统增加一个服务。后面是addfmc ,这个fmc是DB2的故障守护进程。
      

  18. 这个是监测DB2实例正常运行,当实例异常宕机后,它会自动启动实例。那么以上的错误可以连起来了:
      

  19. 再给系统增加一个DB2守护进程的时候失败了,原因是主机名不对。
      

  20. 好的,看一下主机名定义
      

  21.   

  22. [root@centos-0 instance]# hostname  

  23. centos-0.msdomain这没问题
      

  24. 再看

      

  25. [root@centos-0 instance]# vi /etc/hosts  

  26. 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4  

  27. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
      

  28. 这个地方不知为什么CENTOS装好之后没有修改,修改一下。修改后内容如下
      

  29.   

  30. [root@centos-0 instance]# vi /etc/hosts  

  31. 127.0.0.1   localhost centos.msdomain localhost4 localhost4.localdomain4  

  32. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
      

  33. 保存再次执行创建实例,正常

      


  34.   

  35.  


相关内容

热门资讯

空调连续工作多久需要停机休息 空调连续工作的时间取决于多个因素,包括空调的型号、功率、使用环境和维护情况等。一般来说,空调可以连续...
空调哪个符号是除湿的 空调除湿功能通常用一个水滴形状的符号表示。不同品牌和型号的空调遥控器可能会有所差异,但一般来说,除湿...
格力空调多长时间加一次氟利昂 1、一般情况下,空调对氟利昂的使用量是非常小的,所以在空调使用了四年左右的时候再考虑加也没问题。2、...
空调用多长时间需要加氟一次 一般情况下是五年。当出现以下这几种情况时,空调才需要加氟。1、空调的室内机和室外机各有两个接口,当接...
格调生活·C标思享荟:卡萨帝在... 9月12日的郑州龙湖金融岛,夜风轻拂,灯光璀璨。“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑...
品牌价值破千亿、高端份额持续领... 9月12日,“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑州站”在郑州龙湖金融岛举办。2026...
空调主板坏了修800还是换新的 空调主板坏了是修还是换新,需要考虑多个因素,以下是一些建议:1. 维修成本:如果维修费用较低,比如 ...
空调开多久需要休息多长时间 问题:空调开多久需要休息多长时间回答:1、在使用空调的过程中,一般空调开7~8个小时左右需要休息2~...
中央空调多长时间清洗一次 1、一般空调开机前清洗一次即可,空调开机中间时段再清洗一次,空调关机时清洗一次,这样比较合理。2、空...
中央空调氟利昂多久加一次 看空调制热和制冷程度,很多人的观点认为氟利昂必须一年放一次,其实这个观点是错误的,理解上面有点偏差,...