配置EM遇到的问题:*_orcl not found\listener not up\Error creating the repository

要想打开OEM的web管理程序,必须先启动Database listener,再启动Datebase Control端口监控程序,但是碰到下面的情况。

问题0:
    [[email protected] OC4J_DBConsole]$ emctl start dbconsole
    TZ set to PRC
    OC4J Configuration issue. /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_orcl not   found.

其实产生的这样的情况,可能是em资料库配置不正确或者是dbcotrol没有配置好

注:(1)如果服务器上存在多个数据库,必须在启动Database control之前设置ORACLE_SID环境变量:$ set oracle_sid=orcl
        (2)最好使用静态IP地址来配置服务器

参考文章:http://jvilaikeo.com/?p=237

http://blog.csdn.net/huzia/article/details/6742307

http://blog.csdn.net/bamuta/article/details/7872138

http://www.linuxidc.com/Linux/2011-09/43898.htm

http://blog.itpub.net/28602568/viewspace-766317/

解决:   
  ①重建em资料
    [[email protected] OC4J_DBConsole]$ emca -repos recreate
    ... 
    Enter the following information:
    Database SID: orcl
    Listener port number: 1521
    Password for SYS user: oracle
    Password for SYSMAN user: oracle
    Do you wish to continue? [yes(Y)/no(N)]: y
    ...
    INFO: Repository successfully created

上面这一步并不一定成功,在你创建资料库的时候,依然会遇到问题:

问题1: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 .

[[email protected] ~]$ emca -repos recreate

.........

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 .

...........

问题1解决办法:

查看listener的状态

[[email protected] ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-AUG-2015 11:08:20

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat.oracle.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-JUL-2015 23:30:54
Uptime                    1 days 11 hr. 37 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/redhat/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat.oracle.com)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

这个状态说明listener已经起来,如果不是这个状态,

请启动监听:lsnrctl start

修改数据库register的状态:

$sqlplus / as sysdba

SQL>alter system register;

SQL>exit

然后在执行emca -repos recreate,发现问题还是没有解决,查看日志:

$ tail -n 50 /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_07_31_14_50_45.log

CONFIG: SQLEngine created successfully and connected

Aug 15, 2012 9:45:49 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl

CONFIG: ORA-12541: TNS:no listener

oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-12541: TNS:no listener

.....

at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)

.....

Aug 15, 2012 9:45: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 /apps/cfgtoollogs/emca/E7DEV/emca_2012_08_15_09_45_23.log for more details.

Aug 15, 2012 9:45:49 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)

.........

Aug 15, 2012 9:45:49 AM oracle.sysman.emcp.EMConfig restoreOuiLoc

CONFIG: Restoring oracle.installer.oui_loc to /apps/product/11.2.0/db_home/oui

处理方法:检查主机名:/etc/sysconfig/network、/etc/hosts、listenter.ora、tnsnames.ora、数据库中的主机名、oracle环境变量中的主机名 确保主机名的一致性。

[[email protected] ~]$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=redhat.oracle.com
[[email protected] ~]$ cat /etc/hosts
127.0.0.1   redhat.oracle.com localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.15.112 redhat redhat.oracle.com
[[email protected] ~]$

[[email protected] ~]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin/
[[email protected] admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = redhat.oracle.com)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

[[email protected] admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

NET_ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = redhat.oracle.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Aug 1 11:38:06 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select utl_inaddr.get_host_address(host_name), host_name from v$instance;

UTL_INADDR.GET_HOST_ADDRESS(HOST_NAME)
--------------------------------------------------------------------------------
HOST_NAME
----------------------------------------------------------------
127.0.0.1
redhat.oracle.com

[[email protected] ~]$ echo $ORACLE_HOSTNAME
redhat.oracle.com
[[email protected] ~]$
[[email protected] ~ ]$ emca -repos recreate
    ... 
    Enter the following information:
    Database SID: orcl
    Listener port number: 1521
    Password for SYS user: oracle
    Password for SYSMAN user: oracle
    Do you wish to continue? [yes(Y)/no(N)]: y
    ...
    INFO: Repository successfully created

修改成一致之后就可以成功创建。祝你们好运。

问题2Error creating the repository

[[email protected] ~]$ emca -repos recreate

STARTED EMCA at Jul 31, 2015 2:50:46 PM
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
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 31, 2015 2:51:04 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_07_31_14_50_45.log.
Jul 31, 2015 2:51:05 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jul 31, 2015 2:54:25 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jul 31, 2015 2:54:25 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 31, 2015 3:01:13 PM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error creating the repository
Jul 31, 2015 3:01:13 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_repos_create_<date>.log for more details.
Jul 31, 2015 3:01:13 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error creating the repository
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_07_31_14_50_45.log for more details.
Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_07_31_14_50_45.log for more details.

查看日志:

$ tail -n 50 /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2015_07_31_14_50_45.log

Aug 16, 2012 9:12:57 AM oracle.sysman.emcp.util.GeneralUtil isLocalConnectionRequired

......................

Aug 16, 2012 9:12:57 AM oracle.sysman.emcp.EMReposConfig createRepository

CONFIG: ORA-20001: SYSMAN already exists..

ORA-06512: at line 17

oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-20001: SYSMAN already exists..

ORA-06512: at line 17

at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1650)

.........

Aug 16, 2012 9:12:57 AM oracle.sysman.emcp.EMReposConfig invoke

SEVERE: Error creating the repository

Aug 16, 2012 9:12:57 AM oracle.sysman.emcp.EMReposConfig invoke

...........

at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:521)

Aug 16, 2012 9:12:57 AM oracle.sysman.emcp.EMConfig restoreOuiLoc

问题2的解决办法:

手工重新配置dbconsole的步骤 
1,修改DBSNMP密码: 
重新配置DBCONSOLE,需要输入DBSNMP密码,但任何密码都会显示错误,需要预先修改。 
sql>alter user dbsnmp identified by xxx; 
2,删除早期DBCONSOLE创建的用户: 
sql>drop role MGMT_USER; 
sql>drop user MGMT_VIEW cascade; 
sql>drop user sysman cascade; 
3,删除早期DBCONSOLE创建的对象: 
sql>drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS; 
sql>drop public synonym SETEMVIEWUSERCONTEXT; 
4,重新创建DBCONSOLE:(如果是在windows下,要先到注册表删除DBCONSOLE的服务,重启电脑) 
$emca -config dbcontrol db -repos create 
根据提示,先输入SID,再输入Y继续; 
输入端口1521,输入SYS密码,输入DBSNMP密码,输入SYSMAN 密码,输入Y继续 
完成。

时间: 2024-11-05 13:44:10

配置EM遇到的问题:*_orcl not found\listener not up\Error creating the repository的相关文章

对oracle10grac配置em

配置em A--:oracle 删除EM 首先查看em的状态 $ emctl status dbconsole 如果是正在运行,则先停止其运行,这是个好习惯 $ emctl stop dbconsole 然后,执行命令 $ emca -deconfig dbcontrol db -repos drop 删除时,很可能sysman用户没有删除,还存在一些role和public synonym 需要下面的SQL语句 drop user sysman cascade; drop user MGMT_V

12C -- 配置EM Express的端口

EM Express是基于web接口的图形化数据库管理工具. 内嵌到数据库中,可以用来监控.管理数据的性能和完成大多数管理工作. EM Express是轻量级的管理工具,减少了数据库服务器的开销.没有对应的后台进程或者task与其相关联. 它需要使用数据库内部的组件,比如XDB.sql*net. 查看em  express使用的端口号: select dbms_xdb_config.gethttpsport() from dual; 访问em express https://localhost:

重新配置EM 三步

1.使用"emca -deconfig dbcontrol db"命令删除配置 2.使用"emca -repos drop"命令删除 repository 3.使用"emca -config dbcontrol db -repos create"命令进行创建em 使用 emctl status dbconsole 可查看em状态 重新配置EM 三步

在与 SQL Serve2008r 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接) j解决方案

在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误.未找到或无法访问服务器.请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接. (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接) 今早开机发现,打开SQL Server 2008 的 SQL Server Management Studio,输入sa的密码发现,无法登陆数据库?提示以下错误: “在与 SQL Server 建立连接时出现与网络相关

CENTOS 配置好SVN服务环境后,其他服务器无法访问 Error: Can&#39;t connect to host &#39;192.168.1.103&#39;: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

CENTOS 配置好SVN服务环境后,其他服务器无法访问 根据 下面的步骤配置好服务后,使用本机可以正常 连接到 SVN 服务, 但是使用局域网的其他服务器访问时出现下面的错误, Error: Can't connect to host '192.168.1.103': 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败. 时由于防火墙配置问题, 需修改防火墙规则,或者使用下面的命令把防火墙服务关闭即可 service iptables stop 配置自动启动:把svnserv

Echarts 明明和官方文档配置一致,图表加载却是报错:Error in mounted hook: &quot;TypeError: Cannot read property &#39;get&#39; of undefined&quot;,重新npm run dev,问题解决。

在搞Echarts的关系图graph,一开始正常显示,如下: 然而就在本人修改了option里的curveness = 0.2,ctrl+f5强制刷新页面后,图表加载报错:Error in mounted hook: "TypeError: Cannot read property 'get' of undefined" 一开始以为是因为curveness的修改而报错,遂回退修改,然而问题依旧. 于是乎,研究一下报错的地方,就是“axisModel = undefined”这个鬼东西报

OEM重新配置EM资料库

方法1:通过emca命令重新创建 C:\Users\Administrator>emca -repos recreate EMCA 开始于 2017-9-4 11:40:23 EM Configuration Assistant, 11.2.0.0.2 正式版 版权所有 (c) 2003, 2005, Oracle.保留所有权利. 输入以下信息: 数据库 SID: orcl 监听程序端口号: 1521 SYS 用户的口令: SYSMAN 用户的口令: 是否继续? [是(Y)/否(N)]: y 2

oracle 11g 安装配置EM

不能登录EM,执行emca -config dbcontrol db 不知道总是默认1522的端口号,无奈,google一番,从下面第二步开始执行...(我的监听没问题) 1.打开oracle配置工具里的Net Configuration Assistant,选择"监听程序配置",下一步,接着选择"重新配置",下一步,仔细看下每一步配置的参数是否正确就OK了. 2.在命令行上使用"emca -deconfig dbcontrol db"命令删除配

Oracle 12C配置EM

12C配置OEM同之前的版本差别较大,没有了emctl,而是直接使用如下方法配置: SQL*Plus: Release 12.1.0.2.0 Production on Tue Jul 19 07:19:33 2016Copyright (c) 1982, 2014, Oracle.  All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Product