有这样一个现象,在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. 在PYTHON3中,使用Asyncio来管理Event loop

    #!/usr/bin/env python # -*- coding: utf-8 -*- import asyncio import datetime import time def functio ...

  2. python类中的super,原理如何?MRO是什么东东?

    下面这个URL解释得比较清楚. http://python.jobbole.com/86787/?utm_source=group.jobbole.com&utm_medium=related ...

  3. [LeetCode] Binary Tree Zigzag Level Order Traversal

    Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to ...

  4. centos6.4下安装php的imagick和imagemagick扩展教程

    imagick在centos6.4的安装方法: .安装ImageMagick 代码如下: wget http://soft.vpser.net/web/imagemagick/ImageMagick- ...

  5. hdu 4027 2011上海赛区网络赛G 线段树 成段平方根 ***

    不能直接使用成段增减的那种,因为一段和的平方根不等于平方根的和,直接记录是否为1,是1就不需要更新了 #include<cstdio> #include<iostream> # ...

  6. linux文本模式下使用PPPOE拨号ADSL上网的方法

    转自:http://www.myzhenai.com.cn/post/945.html 转载请注明出处:http://www.myzhenai.com/thread-15431-1-1.html ht ...

  7. Git提交基本流程

    在无其他分支,大家都向同一分支master分支提交代码的情况下: 1.查看本地对代码的修改情况,即可以被提交的修改记录 git status 其中被修改过的文件标识为modified,删除的文件del ...

  8. Android学习二_八:Animation的使用(一) (转)

    一.Animations介绍 Animations是一个实现android UI界面动画效果的API,Animations提供了一系列的动画效果,可以进行旋转.缩放.淡入淡出等,这些效果可以应用在绝大 ...

  9. html css js 一些记录.

    webstorm 的基本使用 webstorm 格式化 html 代码: Ctrl+Alt+L js html css 基本使用 注意 dom 的 innerHTML会刷新dom,所以里面包含的事件绑 ...

  10. 【Web前端】---js调用本地应用程序

    最近进入了一个项目组,向大牛们一起学习如何搞开发,可谓是边开发边学习.就在前两天,我们的项目被领导们验收了一次,顺便给我们提了点新的需求,要求我们能够使用外在设备拍照上传.君要臣死,臣不能不死.更何况 ...