EMCA创建em资料库时报错

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

emca报错:

[[email protected] 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)
[[email protected] 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相关。

解决办法:
[[email protected] ~]# 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)

[[email protected] 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

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

时间: 2024-10-20 17:48:00

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

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

问题描述: 使用Eclipse自带的Maven插件创建Web项目时报错: Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories. Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:REL

Django2.0在models创建数据表时报错

Django2.0在models创建数据表时报错TypeError: __init__() missing 1 required positional argument: 'on_delete' 如下创建了两个表,Tag 表以 Contact 表为外部键,此时可以看到pycharm控制台报错 123456789101112131415 class (models.Model): name = models.CharField(max_length=200) age = models.Intege

django2.0 models.py创建外键时报错

现象: 在创建外键的时候遇到报错:TypeError: __init__() missing 1 required positional argument: 'on_delete' 解决: 查询一番后发现Django2.0版本创建外键时需要在后面加上on_delete.   原文地址:https://www.cnblogs.com/yang842718540/p/8386059.html

用m2eclipse创建Maven项目时报错??

Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of centra

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

以上错误需要,下载一个补丁. 补丁地址:http://www.shareyx.com/blog/2 补丁的安装可以参考: http://jingyan.baidu.com/article/dca1fa6fba6a0af1a4405290.html 解决办法2: 看截图你myeclipse10吗,myeclipse对activiti的插件集成不怎么好. 建议用eclipse kepler以上的版本画图,或者activiti不是有web版的画图工具吗,不用插件也行

eclipse创建maven项目时报错解决办法

1.Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories. 办法:下载maven-archetype-quickstart-1.1.jar放入安装maven的lib文件夹下,在此处启动dos窗口输入命令:mvn install:install-file -DgroupId=org.apache.ma

通过VS2010命令提示窗口创建强命名文件时报错问题

问题描述详见图 解决方案 00000005意思是Access Denied(即拒绝访问). 原因是:Program Files(x86)目录对一般用户和未提升权限的管理员是只读的. 所以只要赋予Users.Tusted Installer用户组对文件夹Microsoft Visual Studio 10.0或VC的完全权限即可(不必对Program Files(x86)进行权限提升) 通过VS2010命令提示窗口创建强命名文件时报错问题

QL Server 创建用户时报错:15023 用户,组或角色'XXX'在当前数据库中已存在?

在使用SQL Server 2000时,我们经常会遇到一个情况:需要把一台服务器上的数据库转移到另外一台服务器上.而转移完成后,需要给一个"登录"关联一个"用户"时,往往会发生错误: “错误15023:当前数据库中已存在用户或角色” 这个问题非常棘手,几经排常找到了原因与解决方法,因为这个问题与解决方法均比较复杂,所以把这个过程中的一些经验纪录下来与大家分享,希望能对大家以后的类似操作有所帮助. 原因及解决办法如下: 首先介绍一下sql server中“登录”与“用

在执行inoic创建项目时报错

在执行inoic创建项目时报错.主要错误是:operation not permitted, scandir 1 × Running command - failed! 2 [ERROR] npm ERR! path C:\Users\Administrator\cutePuppyPics\node_modules\fsevents\node_modules\dashdash\node_modul 3 4 npm ERR! code EPERM 5 npm ERR! errno -4048 6