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

 

  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. Explanation:

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

  6. User response:

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

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

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

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

  11. Explanation:

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

  13. User response:

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

  15. Support reference.

  16. /opt/ibm/db2/V9.7/instance/db2iutil: line 2528: DB2INSTVER: parameter null or not set

检查 /opt/ibm/db2/V9.7/instance/db2iutil 文件(非提示的2528行),发现有如下内容

 

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

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

  3. db2isrv

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

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

  6. display_msg ${DB2CAT?} 922 \

  7. 'DBI1922N  The host name is not valid.\n'<pre name="code" class="plain">            stop_prog 1</pre> fi<p></p>

  8. <pre></pre>

  9. <br>

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

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

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

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

  14. 好的,看一下主机名定义<br>

  15. <p></p>

  16. <p></p><pre name="code" class="plain">[root@centos-0 instance]# hostname

  17. centos-0.msdomain</pre>这没问题<br>

  18. 再看<p></p>

  19. <p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts

  20. 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

  21. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>

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

  23. <p></p>

  24. <p></p><pre name="code" class="plain">[root@centos-0 instance]# vi /etc/hosts

  25. 127.0.0.1   localhost centos.msdomain localhost4 localhost4.localdomain4

  26. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6</pre><br>

  27. 保存再次执行创建实例,正常<p></p>

  28. <p><br>

  29. </p>

db2icrt创建实例,提示主机名无效的更多相关文章

  1. ORACLE提示表名无效

    在创建ORACLE数据库时,创建表 提示表名无效 请查看数据库表名是否出现了小写字母或者关键字,如USER

  2. SQL Server 2008 r2 中 SQL语句提示“对象名无效”,但可执行

    [问题描述]在使用 SQL Server 2008 r2 时,有时在完成SQL书写后,会提示“对象名无效”,而SQL语句可正常执行. [原因]缓存相关. [解决方法]ctrl+shift+R 刷新下, ...

  3. AWS CentOS7 实例修改主机名

    问题描述: AWS EC2 实例在升级到CentOS7以后,我们发现主机名的修改不再像之前的版本(CentOS 5/6)一样简单. 每次新建实例之后,修改好主机名,重启或者克隆之后的机器,主机名还是会 ...

  4. mysql启动服务时提示"服务名无效"

    1,首先说明一下我的环境,我刚开始是用的XAMPP这个集成的软件,里面安装了apache, mysql,tomcat这些软件,然后通过控制面板对其进行启动关闭的操作,这些操作很方便,但是我就用net ...

  5. Mysql----mysql启动服务时提示"服务名无效"

    1,首先说明一下我的环境,我刚开始是用的XAMPP这个集成的软件,里面安装了apache, mysql,tomcat这些软件,然后通过控制面板对其进行启动关闭的操作,这些操作很方便,但是我就用net ...

  6. 关于DOS下启动MySQL时提示服务名无效

    主要原因:启动时:net start mysql 而打开服务后发现,本地服务中mysql这个服务实际名字为mysql55,故启动语句应为:net  start mysql55: 以下摘自课程提问: 你 ...

  7. DOS下启动MySQL时输入net start mysql 提示服务名无效的问题

    原因:mysql服务名错误. 正确做法:net start  +mysql服务名

  8. python easy install时,使用aliyun阿里云镜像提示主机名不匹配的问题

    因网络问题,因此设置 easy_install 使用阿里云的源, ## 更新 easy_install 源 tee ~/.pydistutils.cfg <<-'EOF' [easy_in ...

  9. SQL查询语句可以执行,但是提示对象名无效

    类似于缓存的问题,ctrl+shift+R 刷新下 一般就好了

随机推荐

  1. 【PHP绘图技术&&验证码绘制】

    PHP绘图是比较简单的事情,基本绘图如直线.圆.矩形.弧线.填充矩形.填充扇形.非中文字的打印.中文文字的打印在在下面的代码中会纤细讲解. 需要支持中文的字体,可以到windows自带的字体库中找,并 ...

  2. poj 1195:Mobile phones(二维树状数组,矩阵求和)

    Mobile phones Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 14489   Accepted: 6735 De ...

  3. hdu 2203:亲和串(水题,串的练习)

    亲和串 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...

  4. POJ1351 Number of Locks(数学)

    截至写博客为止,貌似这是网上第一个采用数学公式来处理的. 网上的题解都是DFS或是动态规划,但感觉可以推公式直接用数学的方法处理,想了好久,终于推出公式. 题意:一个长度为n的由数字1,2,3,4 组 ...

  5. <转>JDBC获取DB元数据

    原文链接:http://jiauwu.iteye.com/blog/1307617 package com.util.jdbc; import java.sql.Connection; import ...

  6. 让用VS2012/VS2013编写的程序在XP中顺利运行

    转自:http://blog.csdn.net/asanscape/article/details/38752655/ 微软为了推销自家平台,默认配置下VS2012和VS2013编写的应用程序只能在V ...

  7. ios 区域检测 使用coreLocation

    #import "ViewController.h" #import <CoreLocation/CoreLocation.h> @interface ViewCont ...

  8. h5嵌入视频遇到的bug及总结---转载

    最近做的一个h5活动因为嵌入视频而发现了好多以前从未发现的问题,在测试的时候不同系统不同版本不同环境等多多少少都出现了些问题,搞得我也是焦头烂额的,不过好在最终问题都解决了,自己也学到了好多东西,为了 ...

  9. SoapUI接口测试之实战运用操作(五)

    SoapUI接口测试之实战运用操作(五)

  10. JQuery解析json数据

    <script> var data ="{" + "root:[" + "{name:'1',value:'0'}," + &q ...