hosts文件有多余条目导致dbconsole配置不成功

2023-11-20

1.修改密码
alter user system identified by oracle;
alter user sys identified by oracle;
alter user dbsnmp identified by oracle account unlock;
alter user sysman identified by oracle account unlock;

2.配置em

emca -config dbcontrol db -repos recreate -cluster

===========crmdb
oracle@rac1[rac1]:/home/oracle$ emca -config dbcontrol db -repos recreate -cluster

STARTED EMCA at Nov 23, 2011 2:45:49 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:
Database unique name: racdb
Service name: racdb
Listener ORACLE_HOME [ /oracle/app/11.2.0.3/grid ]:
Password for SYS user:
Database Control is already configured for the database racdb
You have chosen to configure Database Control for managing the database racdb
This will remove the existing configuration and the default settings and perform a fresh configuration
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Password for DBSNMP user:
Password for SYSMAN user:
Cluster name: racdb
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /oracle/app/oracle/product/11.2.0.3/dbhome_1

Database instance hostname ................ Listener ORACLE_HOME ................ /oracle/app/11.2.0.3/grid
Listener port number ................ 1521
Cluster name ................ racdb
Database unique name ................ racdb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 23, 2011 2:46:40 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/app/oracle/cfgtoollogs/emca/racdb/emca_2011_11_23_14_45_48.log.
Nov 23, 2011 2:46:44 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Nov 23, 2011 2:46:44 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Nov 23, 2011 2:46:44 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Nov 23, 2011 2:46:44 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 23, 2011 2:46:52 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Nov 23, 2011 2:49:02 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Nov 23, 2011 2:49:03 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Nov 23, 2011 2:53:43 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Nov 23, 2011 2:53:49 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 23, 2011 2:54:55 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 23, 2011 2:54:57 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/OC4J_DBConsole_rac1_racdb to remote nodes ...
Nov 23, 2011 2:55:03 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /oracle/app/oracle/product/11.2.0.3/dbhome_1/oc4j/j2ee/OC4J_DBConsole_rac2_racdb to remote nodes ...
Nov 23, 2011 2:55:16 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/app/oracle/product/11.2.0.3/dbhome_1/rac1_racdb to remote nodes ...
Nov 23, 2011 2:55:22 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /oracle/app/oracle/product/11.2.0.3/dbhome_1/rac2_racdb to remote nodes ...
Nov 23, 2011 2:55:29 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 23, 2011 2:56:48 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl secure dbconsole -host rac1 -sid racdb
Nov 23, 2011 2:56:48 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
WARNING: Error securing Database Control for node rac1.
Nov 23, 2011 2:57:03 PM oracle.sysman.emcp.EMDBPostConfig setRACWarnMsg
INFO: Error securing Database Control. Database Control has not been brought-up on nodes rac1 . Execute the following command(s) on nodes: rac1 .

1) Set the environment variable ORACLE_UNQNAME to Database unique name
2) /oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user > -host -sid < Database unique name >
3) /oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user > -host -sid < Database unique name >
4) /oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl start dbconsole

To secure Em Key, run /oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
Nov 23, 2011 2:57:03 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 23, 2011 2:57:21 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 23, 2011 2:57:21 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://rac1:1158/em <<<<<<<<<<<
Nov 23, 2011 2:57:22 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------

racdb rac1 rac1
racdb rac2 rac1

=======================================================
3. 日志报secure agent时错:
WARNING: Error executing /oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl secure dbconsole -host rac1 -sid racdb
Nov 23, 2011 2:56:48 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
WARNING: Error securing Database Control for node rac1.

4.重新运行emca -config dbcontrol db -repos recreate -cluster,结果还是相同的错误

5.检查secure.log中的日志,报Failed to stop agent...

2011-11-23 16:06:24,848 [main] INFO rep.EmKeyUtil main.542 - Configuring emkey from repos
2011-11-23 16:06:24,963 [main] INFO rep.EmKeyUtil main.572 - The Em Key has been configured successfully.
[23-11-2011 16:06:26] USERINFO ::DBCONSOLE already stopped... Done.
[23-11-2011 16:07:40] USERINFO ::Failed to stop agent...
2011-11-23 16:07:43,554 [main] INFO rep.EmKeyUtil main.517 - Configuring emkey
2011-11-23 16:07:43,677 [main] INFO rep.EmKeyUtil getConnection.464 - Connecting to jdbc:oracle:thin:@rac-scan:1521/racdb using i
d SYSMAN


6.手工执行/oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl secure dbconsole -host rac1 -sid racdb
也是报Failed to stop agent...

oracle@rac1[rac1]:/oracle/app/oracle/product/11.2.0.3/dbhome_1/rac2_racdb/sysman/log$ emctl secure dbconsole -host rac1 -sid racdb
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
Please enter repository password:
DBCONSOLE already stopped... Done.
Failed to stop agent...

7.杀掉节点2 agent 进程,重新运行第6步,还是一样的错误

8.根据第2步中的日志提示先执行以下脚本
/oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl config emkey -repos -sysman_pwd oracle -host rac1 -sid racdb
/oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl secure dbconsole -sysman_pwd oracle -host rac1 -sid racdb
/oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl start dbconsole

oracle@rac1[rac1]:/home/oracle$ /emctl config emkey -repos -sysman_pwd oracle -host rac1 -sid racdb <
/oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl secure dbconsole -sysman_pwd oracle -host rac1 -sid racdb
/oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.

The Em Key has been configured successfully.
oracle@rac1[rac1]:/home/oracle$ /emctl secure dbconsole -sysman_pwd oracle -host rac1 -sid racdb <
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
DBCONSOLE already stopped... Done.
Failed to stop agent...
oracle@rac1[rac1]:/home/oracle$ /oracle/app/oracle/product/11.2.0.3/dbhome_1/bin/emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ..... started.
------------------------------------------------------------------

dbconsole启动成功,用http://rac1:1158/em可以访问,没有secure,不是https

9.但停止dbconsole一直不成功,hang住
oracle@rac1[rac1]:/home/oracle$ emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
...

10.查看emdctl.trc,报以下错误
2011-11-23 17:28:59,544 Thread-1 WARN http: nmehl_connect_internal: connect failed to (rac1:1158): A remote host did not respond w
ithin the timeout period. (error = 78)
2011-11-23 17:29:00,548 Thread-1 WARN http: nmehl_connect_internal: connect failed to (rac1:3938): A remote host did not respond w
ithin the timeout period. (error = 78)
2011-11-23 17:29:00,548 Thread-1 ERROR main: nmectla_agentctl: Error connecting to http://rac1:3938/emd/main. Returning status code
2
2011-11-23 17:30:14,623 Thread-1 WARN http: nmehl_connect_internal: connect failed to (rac1:1158): A remote host did not respond w
ithin the timeout period. (error = 78)
2011-11-23 17:30:16,626 Thread-1 WARN http: nmehl_connect_internal: connect failed to (rac1:3938): A remote host did not respond w
ithin the timeout period. (error = 78)
2011-11-23 17:30:16,626 Thread-1 ERROR main: nmectla_agentctl: Error connecting to http://rac1:3938/emd/main. Returning status code
2

11.根据"Returning status code 2"关键字查找MOS,找到1292074.1,里面提到可能的原因是"etc/hosts file was not in the correct format."

12.查看/etc/hosts文件
127.0.0.1 loopback localhost # loopback (lo0) name/address
10.27.229.220 rac1
10.27.229.221 rac1-vip
200.200.229.220 rac1-priv
10.27.229.222 rac2
10.27.229.223 rac2-vip
200.200.229.222 rac2-priv
10.27.229.224 rac-scan
10.27.229.196 stormon2
10.27.229.11 stormon2_cps
192.168.10.3 rac1

格式没有问题,发现多了192.168.10.3 rac1,而且192.168.10.3地址ping不通

root@rac1:/# ping 192.168.10.3
PING 192.168.10.3: (192.168.10.3): 56 data bytes
^C
----192.168.10.3 PING Statistics----
2 packets transmitted, 0 packets received, 100% packet loss

nestat -in看并没有这个地址
root@rac1:/# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
en13 1500 link#2 e4.1f.13.50.e4.72 0 0 1488 1488 0
en13 1500 192.168.10 192.168.10.11 0 0 1488 1488 0
en17 1500 link#3 5c.f3.fc.f.19.6e 9676217 0 1862293 2 0
en17 1500 10.27.229 10.27.229.220 9676217 0 1862293 2 0
en17 1500 10.27.229 10.27.229.221 9676217 0 1862293 2 0
en17 1500 10.27.229 10.27.229.224 9676217 0 1862293 2 0
en18 1500 link#4 5c.f3.fc.f.10.80 8392367 0 7428186 3 0
en18 1500 200.200.229 200.200.229.220 8392367 0 7428186 3 0
en18 1500 169.254 169.254.38.237 8392367 0 7428186 3 0
lo0 16896 link#1 1935698 0 1935376 0 0
lo0 16896 127 127.0.0.1 1935698 0 1935376 0 0
lo0 16896 ::1%1 1935698 0 1935376 0 0

13.注释该地址后em可以正常停止,立刻返回Stopped

oracle@rac1[rac1]:/home/oracle$ emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
... Stopped.

14.重新secure dbconsole,也正常

oracle@rac1[rac1]:/home/oracle$ emctl secure dbconsole -host rac1 -sid racdb
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
Please enter repository password:
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Securing dbconsole... Started.
Please enter repository schema password:
Securing dbconsole... Sucessful.

15.重启dbconsole也正常了
oracle@rac1[rac1]:/home/oracle$ emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
... Stopped.
oracle@rac1[rac1]:/home/oracle$ emctl secure dbconsole -host rac1 -sid racdb
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
http://rac1:1158/em/console/aboutApplication
Please enter repository password:
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Securing dbconsole... Started.
Please enter repository schema password:
Securing dbconsole... Sucessful.
oracle@rac1[rac1]:/home/oracle$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
https://rac1:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ..... started.

16.加密也成功了,可以通过https://rac1:1158/em/正常访问

总结:
1.碰到任何问题都要先看仔细的日志,不要漏过任何信息,然后根据日志一步一步的分析,不要盲目的处理。

2./etc/hosts文件中不要不留无用的条目 ,碰到一些问题棘手问题的时候检查一下hosts配置是否正确

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90901/viewspace-1056601/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/90901/viewspace-1056601/

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

hosts文件有多余条目导致dbconsole配置不成功 的相关文章

  • 无线测距设备和原理介绍

    UWB 超宽带 无线测距传感器是一种基于超宽带技术开发的无线测距传感器 该设备可以实现1对1 或者1对多或者多对多个设备之间互相测距 设备测距精度可达3 10厘米 测距距离可到500多米 测距频率最高可达200Hz 如下图所示为1对1频率5
  • 孤儿进程与僵尸进程[总结](转)

    转自http www cnblogs com Anker p 3271773 html 1 前言 之前在看 unix环境高级编程 第八章进程时候 提到孤儿进程和僵尸进程 一直对这两个概念比较模糊 今天被人问到什么是孤儿进程和僵尸进程 会带来

随机推荐

  • 【WPS】论文添加引用和参考文献简明方法 (图文详解)

    对于日常的作业 报告 草稿等 经常会用 Office Word 或 WPS Word 来编辑和整理 以下 本文将说明 如何用 WPS 为论文添加引用 尾注 和参考文献 WPS 2019 1 正文中 用鼠标左击 将输入光标放在 需要放置方括号
  • 离散数据与连续数据

    离散数据 离散数据是指其数值只能用自然数或整数单位计算的数据 例如 企业个数 职工人数 设备台数等 只能按计量单位数计数 这种数据的数值一般用计数方法取得 在统计学中 数据按变量值是否连续可分为连续数据与离散数据两种 连续数据 在一定区间内
  • Caffe源码中caffe.proto文件分析

    Caffe源码 caffe version 09868ac date 2015 08 15 中有一些重要文件 这里介绍下caffe proto文件 在src caffe proto目录下有一个caffe proto文件 proto目录下除了
  • 包的创建、包的命名、包的导入

    包 package 1 分门别类的管理java文件 2 避免文件重名 3 保护包内的文件 包的命名 1 公司域名的到写 部门名称 项目名称 模块名称 部门名可以不写 2 用 作为分隔符 例 com openlab phone employe
  • 数据库选型粗略对比,欢迎补充!!!

    关系型数据库 Oracle SQL Server MySQL PostgreSQL SQLite Oracle 甲骨文开发的商业数据库 不开源 支持所有主流平台 性能好 功能强 稳定性好 安全性好 支持大数据量 比较复杂 收费昂贵 SQL
  • Unity3D小程序部署与开发

    Unity3D目前已经支持微信小程序开发 目前正处于公测阶段 可以参考文档 这样我们只需要在unity本地开发完 一键导出微信小程序工程发布即可 0 下载小程序开发工具与Unity 微信小程序插件 小程序开发工具 wechat devtoo
  • 本地jar上传至私服

    本地jar上传至私服 一 eclipse的maven 打包 安装在本地仓库 二 使用cmd命令行将jar包上传至maven私服 三 一二中已完成 另 将jar包安装在本地仓库 一 eclipse的maven 打包 安装在本地仓库 1 对po
  • logn是以什么为底_一文带你了解算法复杂度O(1),O(n),O(logn),O(nlogn)的含义

    相信很多开发的同伴们在研究算法 排序的时候经常会碰到O 1 O n O logn O nlogn 这些复杂度 看到这里就会有个疑惑 这个O N 到底代表什么呢 首先o 1 o n o logn o nlogn 是用来表示对应算法的时间复杂度
  • 【element中el-cascader使用及自定义key名】

    element中el cascader使用及自定义key名 下面展示一些 内联代码片 el cascader的通过改变值时 获取当前选中数据 根据接口返回数据 灵活定义key名 template中的应用 options为数据 1 props
  • mermaid

    Butterfly在不久的未来能支持mermaid https butterfly js org posts 4aa8abbe mermaid
  • Qt开发记录2——功能开发——按钮-打开缓存(打开本地文件夹)

    链接1 qt程序实现打开文件夹 链接2 QT5 利用QDesktopServices打开本地文件或文件夹 目录 打开缓存 打开本地文件夹 在UI界面拖拽一个按钮控件 转到槽 跳转到槽函数编写代码 打开缓存 打开本地文件夹 需求 选中扫描到本
  • dns提供商主机名_什么是FQDN?它和主机名有区别吗?

    请关注本头条号 每天坚持更新原创干货技术文章 如需学习视频 请在微信搜索公众号 智传网优 直接开始自助视频学习 1 前言 本文主要讲解什么是FQDN 什么是FQDN 2 FQDN的名词解释 完全限定域名fully qualified dom
  • (Python)计算平均值

    计算平均值 问题描述 从键盘输入三个整数 分别存入x y z三个整型变量中 计算并输出三个数的和以及平均值 输入形式 从键盘输入三个整数 整数之间以空格隔开 输出形式 在屏幕上分两行显示结果 第一行为三个数的和 整数形式输出 第二行为三个数
  • 数据库设计范式的理解

    文章来自 http www ccvita com 418 html 前言 为什么要写这篇文章呢 从去年年底开始 就和很多做技术的朋友交流过 从数据库设计到数据库架构各个方面的内容 有一些朋友执着于ORM 执着于所谓的数据库设计 却忘记了一切
  • 惠普服务器硬盘指示灯不亮或显示蓝色

    通过惠普服务器指示灯我们可以了解服务器当前的运行状态 指示灯不同的颜色和闪烁频率都代表不同的意义 那么惠普服务器硬盘指示灯不亮是什么原因导致的呢 如果已经在系统中安装了一个或多个硬盘 请检查下列各项 1 硬盘的电源线与信号线安装是否正确 2
  • 数仓面试总结

    2021年5月开始找工作 面试了若干个数仓的岗位 面的差不多也就2个 总结下大致的面试内容 一 字节视频面 上海的一个部门 视频面挂 小伙伴内推的 这个5月份面的 大概视频面试了一个小时 主要面试内容 1 问了mapreduce的具体执行过
  • MySQL减一年的日期函数_MySQL 日期加减函数汇总

    1 addtime 为日期加上指定秒数select addtime now 1 加1秒 2 adddate 有两种用法 第二个参数直接填数字的话是为日期加上指定天数 填interval的话是为日期加上指定的interval时间select
  • AI 预测世界杯比赛结果,惊掉下巴

    哈喽 大家好 今天看到Kaggle上有一个预测世界杯比赛结果的项目 截至目前 4 场比赛预测结果全中 今天把源码研究了一下 做了中文注释 给大家分享下 文章目录 技术提升 1 获取数据集 2 特征工程 3 建模 4 预测 技术提升 本文由技
  • 一文搞懂ARP协议

    更多文章请关注我的个人微信公众号 极客熊猫 欢迎扫码关注 什么是ARP ARP是Address Resolution Protocol的首字母缩写 即地址解析协议 如果一台主机要将一个帧发送到另一台主机 只知道这台主机的IP地址是不够的 还
  • hosts文件有多余条目导致dbconsole配置不成功

    1 修改密码alter user system identified by oracle alter user sys identified by oracle alter user dbsnmp identified by oracle