说明:监听程序配置及启动正常。实例运行正常,远程或是本地sqlplus连接实例也正常。主机名显示正常,与主机名相关三个配置文件也没问题。

emca报错:

[oracle@rusky-oracle11g admin]$ emca -config dbcontrol db

STARTED EMCA at Apr 2, 2015 9:27:10 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved. Enter the following information:
Database SID: orcl
log4j:ERROR No appenders could be found for category (emSDK.config). (报错1)
log4j:ERROR Please initialize the log4j system properly.
Listener port number: ……

Do you wish to continue? [yes(Y)/no(N)]: yes
Apr 2, 2015 9:42:48 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_34_33.log.
Apr 2, 2015 9:42:49 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_34_33.log for more details.
Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_34_33.log for more details. (报错2)
[oracle@rusky-oracle11g admin]$

 

详细错误日志如下:

/u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_22_12.log
CONFIG: ORA-12545: Connect failed because target host or object does not exist

oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-12545: Connect failed because target host or object does not exist

        at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeSql(SQLEngine.java:1898)
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3230)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_22_12.log for more details.
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3245)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0.1/db_1/oui

从错误日志可看出,应该是跟target host和listener相关。

解决办法:
[root@rusky-oracle11g ~]# cat /etc/hosts  该文件配置错误
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost    --此处写错,原来为localhost.domain
192.168.1.203 rusky-oracle11g.com rusky-oracle11g

手动注册监听: SQL> conn sys/sys as sysdba Connected. SQL> alter system register; System altered

重新创建EMCA资料库:(未出现错误1)

[oracle@rusky-oracle11g admin]$ emca -config dbcontrol db

STARTED EMCA at Apr 2, 2015 9:34:33 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved. Enter the following information:
Database SID:
……
出现错误2:
oracle.sysman.emcp.exception.EMConfigException: Listener is not up or database service is not registered with it. Start the Listener and register database service and run EM Configuration Assistant again .
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:3245)
at oracle.sysman.emcp.EMReposConfig.unlockMGMTAccount(EMReposConfig.java:1000)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:345)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:157)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:253)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:589)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1448)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:573)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)
Apr 2, 2015 9:22:30 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to /u01/app/oracle/product/11.2.0.1/db_1/oui

==================

各种折腾,还是报同样的错, 后来也出现上面的错误1,因此可推断错误1跟/etc/hosts没关系。

在dbca下重新配置emca也报错:

使用命令再次创建时也报错:
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_02_09_22_12.log for more details.根据上多次出现的该提示,找到文件中的如下错误:

No value was set for the parameter ORACLE_HOME.

ORA-12545:connect failed because target host or object does not exist.

每次都提示错误目标主机ORACLE_HOSTNAEM,  rusky-oel.com不正确或不存在。我配置的正确的主机名为rusky-oracle11g.com。

/home/oracle/.bash_profile 最后发现该文件内ORACLE_HOSTNAME配置有错,修改为正确的rusky-oracle11g.com后,重新配置emca正常。

ORACLE_HOSTNAME=rusky-oel.com; export ORACLE_HOSTNAME

好坑爹的错误,折腾了两天。

EMCA创建em资料库时报错的更多相关文章

  1. 创建Maven Module时报错:The parent project must have a packaging type of POM

    创建Maven Module时报错:The parent project must have a packaging type of POM 解决的办法,是把父项目的Packaging改成pom:

  2. 终端创建scrapy项目时报错(转)

    在终端创建scrapy项目时报错 PS D:\scrapy_project> scrapy startproject fangFatal error in launcher: Unable to ...

  3. 使用Eclipse自带的Maven插件创建Web项目时报错:

    问题描述: 使用Eclipse自带的Maven插件创建Web项目时报错: Could not resolve archetype org.apache.maven.archetypes:maven-a ...

  4. 如何解决git创建密匙时报错Too many arguments

    如题:git创建密匙时报错Too many arguments. 前几天我遇见了一个问题,git需要重新创建密匙,运行命令ssh-keygen -t rsa -b 4096 -C " you ...

  5. CoreData手动创建托管对象子类时报错

    1.具体问题 手动创建CoreData,在进行创建托管对象子类时出现报错如图: 2.解决方法 当使用CoreData时,Xcode自动管理实体类,文件都放在Derived Data文件夹中: 所以不需 ...

  6. 创建jsp文件时报错,"javax.servlet.http.HttpServlet" was not found on the Java)

    原因: 创建jsp文件的步骤如下: 出现"javax.servlet.http.HttpServlet" was not found on the Java) 报错信息就是因为没有 ...

  7. 创建DB2数据库时报错--SQL1052N 数据库路径不存在(Windows)(转载)

    用DB2 v9.7新建数据库的时候,默认路径为:D:\ 把缺省路径“写的是D:\XXX(此目录存在),新建时提示如下:SQL1052N 数据库路径 "D:\XXX" 不存在.如下: ...

  8. 一个模型中有两个外键指向同一张表时,创建迁移模型时报错:“ HINT: Add or change a related_name argument to the definition for 'AnswersModel.author' or 'AnswersModel.relay_to'.”解决方案

    class AnswersModel(models.Model): author = models.ForeignKey(FrontUserModel,null=True,related_name=' ...

  9. myeclipse10安装了activiti插件后创建BPMN 文件时报错,

    以上错误需要,下载一个补丁. 补丁地址:http://www.shareyx.com/blog/2 补丁的安装可以参考: http://jingyan.baidu.com/article/dca1fa ...

随机推荐

  1. php php打乱数组二维数组、多维数组

    php中的shuffle函数只能打乱一维数组,有什么办法快速便捷的打乱多维数组?手册上提供了 <?php function shuffle_assoc($list) {      if (!is ...

  2. Unity 飞机的子弹轨迹

    最近公司在开发一款儿童打飞机游戏.  策划跟我说能在子弹上加上一些轨迹就好了.  比如 旋转 左右移动呀.然后它就很愉快的跑去截其他游戏的图啦... 我看见图的时候, 解决方案: 1.   使用牛逼的 ...

  3. Lua多重继承

    http://blog.csdn.net/ssihc0/article/details/7742421 代码收藏了,以后用的到 --多重继承 local function search(k,plist ...

  4. font-face 使用

    <style type="text/css"> @font-face{ font-family:'Aaargh'; src:url(fonts/Aaargh/Aaarg ...

  5. django学习笔记一

    django作为一个python的开源项目发布,其web框架采用了mtv设计模式 在目前一些较为成熟的大型网站中有不少网站的应用基于django开发,django作为一个重量型的web框架提供了以下的 ...

  6. 什么时候会刷新备库控制文件refresh the standby database control file?

    通过合理的设置,对于Primary的绝大数操作,都是可以传递到Physical Standby,datafile的操作是通过STANDBY_FILE_MANAGEMENT参数来控制的,但是即使STAN ...

  7. 伪元素”:after” , “:before"

    伪元素就是源码html中不存在,而视觉上又存在的元素     简单用法: blockquote:before {      content: open-quote;      // 其他样式 } // ...

  8. RMAN之一:快速入门

    1.数据导出基础 (1)创建datapump导出文件的目录对象并为相应用户授予权限. 出于安全考虑,不允许oracle用户直接在OS上进行文件的操作,而应通过directory对象指定. SQL> ...

  9. 菜鸟的jQuery源码学习笔记(一)

    整个jQuery是一个自调用的匿名函数: (function(global, factory) { if (typeof module === "object" && ...

  10. redis怎么动态添加内存,动态配置,无需重启。

    在redis的使用过程中,有时候需要急需修改redis的配置,比如在业务运行的情况下,内存不够怎么办,这时要么赶紧删除无用的内存,要么扩展内存.如果有无用的内容可删除那么所有问题都已经解决.如果内容都 ...