Oracle Enterprise Manager fails to start! OC4J Configuration issue

February 8, 2009  |  dba, linux

If you ever tried to start the Enterprise Manager with the command ‘emctl start dbconsole’ and you got stuck with the error:

OC4J Configuration issue. <ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<YOURHOST>_<YOURDB> not found.

for instance:

OC4J Configuration issue. /opt/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_db.neoface.pt_ORCL not found.

Then the cause may be that Database Control is not configured or misconfigured… This can be verified by checking if the following directories exist in your ORACLE_HOME:

<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<HOSTNAME>_<DBNAME>
<ORACLE_HOME>/<HOSTNAME>_<DBNAME>

If those directories do not exist, Database Control has not been configured for the database.

SOLUTION

To configure the enterprise manager database control for your database, issue the following commands as oracle user:

[oracle@neoface oracle]$ export ORACLE_HOME=<ORACLE_HOME>
[oracle@neoface oracle]$ export ORACLE_SID=<ORACLE_SID>
[oracle@neoface bin]$ cd $ORACLE_HOME/bin
[oracle@neoface bin]$ ./emca -config dbcontrol db -repos create

Now just follow the instructions on the screen… you’ll need the SYS, DBSNMP and SYSAUX passwords.

Sometimes you already have the SYSMAN, DBSNMP and SYSAUX accounts, and the previous EMCA command can fail to create the DBConsole repository the error ORA-20001 occurs.

ORA-20001 Sysman Already Exists While Running EMCA
.

The Solution is simple… Drop the existing repository :)

[oracle@neoface oracle]$ cd $ORACLE_HOME/bin
[oracle@neoface bin]$ ./emca -deconfig dbcontrol db -repos drop

After removing the repository try to created it with the commands I explained previously. After you install the EM repositiry, the DBConsole should be started and you should be able to access the DBConsole using the URL provided at the installation screen.

(UPDATE)

If the previous drop procedure fails and by checking the logs we see an ORA-01031 insufficient privileges, this may be because we don’t have a password file created. Just go to $ORACLE_HOME/dbs and check if we have a file called pwd<sid>.ora. If not, create it…

[oracle@neoface oracle]$ cd $ORACLE_HOME/bin
[oracle@neoface bin]$ ./orapwd file=$ORACLE_HOME/dbs/pwd<sid>.ora password=oracle entries=5

Hope it helps! By the

PS: to provide better look and give you more resources, my site is now supported by advertising. If you feel that it very annoying, please give me some feedback. If you think it deserves to be clicked… just do it :)


28 Comments


  1. Sebastian Graf

    Hi there,

    I had the exact same issue and I tried to configure EM with the command you mentioned. However I get an Error Message saying tha certain ports could not be assigned:

    SCHWERWIEGEND: Port(s) in den angegebenen Bereich(en) konnte(n) f?r den bzw. die folgenden Prozesse nicht zugewiesen werden: JMS [5540-5559],RMI [5520-5539],Database Control [5500-5519],EM Agent [3938] | [1830-1849]

    Do you kow how to get around this?

  2. Hi Sebastian,

    I can’ read german, but check if your firewall is disabled while you do that… may be your hostname is pointing to your ip address and your firewall is blocking access to it…

    /etc/init.d/iptables stop

    or you can also try to change the hosts from this:
    127.0.0.1 localhost.localdomain localhost
    123.44.55.66 hostname.domain.com hostname

    To this:
    127.0.0.1 localhost.localdomain localhost
    127.0.0.1 hostname.domain.com hostname

    Once completed, you can revert the changes to the hosts file.

    Try it :)

    Regards
    Joao

  3. Sebastian Graf

    Hi,
    thanks, but that does not help. It has definitely something to do with the fact that the ports mentioned can not be assigned. Hosts file is fine, listener is fine, but still no luck. I guess I will see if there is some information on this on metalink or on otn.

    Sebastian

  4. Sebastian Graf

    Ok I am one step further. I have resolved the port issue, but now the ecma utility fails because it is looking for the schema SYSMAN wich does not exist…

  5. hi Sebastian,

    the error that you are reaching happens when you execute ./emca -config dbcontrol db -repos create ?

  6. thanks alot, your advise make me solve my big problem

  7. Sebastian Graf

    Hi Joao,

    yes, the error happens during config. Doimg a deconfig first, like in your article does not help. The logfile says (apparently it is trying to grant something to dbsnmp, but that fails. User dbsnmp does exist, user sysadmin does not… Error message is table or view does not exist):

    24.04.2009 21:55:23 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    KONFIG: SQLEngine connecting with SID: NANDO, oracleHome: /Users/oracle/RDBMS, and user: SYS
    24.04.2009 21:55:23 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    KONFIG: SQLEngine created successfully and connected
    24.04.2009 21:55:23 oracle.sysman.emcp.EMReposConfig grantPrivsToDbsnmp
    KONFIG: Exception while granting priviliges.
    oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-00942: Tabelle oder View nicht vorhanden

    at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1482)
    at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeSql(SQLEngine.java:1723)
    at oracle.sysman.emcp.EMReposConfig.grantPrivsToDbsnmp(EMReposConfig.java:571)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:218)
    at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:134)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:171)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)
    24.04.2009 21:55:23 oracle.sysman.emcp.EMReposConfig invoke
    KONFIG: Failed to grant priviliges to dbsnmp.

  8. Thanks this helped me get past this issue. Just an FYI I did get the:

    ORA-20001 Sysman Already Exists While Running EMCA

    error initially but instead of dropping the repository I just reran the emca command without repository create and that worked:

    ./emca -config dbcontrol db

  9. Hi guys,

    The drop repository procedure may fail with an ORA-01031 if you don’t have an oracle password file created in $ORACLE_HOME/dbs… I’ve updated the post!

    Regards
    Joao

  10. I am facing a problem while starting up dbconsole using emctl start dbconsole. This is a new installation on AIX5 oracle version 10.2.0.4 I have upgraded from 9.2.0.7.

    I have configured OEM and the configuration was succesful. Now while starting up EM using emctl start dbconsole I get the following error in the log

    2009-06-12 13:38:54 Thread-1 WARN http: snmehl_connect: connect failed to (sapm30:1158): A remote host refused an attempted connect operation. (error = 79)
    2009-06-12 13:39:02 Thread-1 WARN http: snmehl_connect: connect failed to (sapm30:1158): A remote host refused an attempted connect operation. (error = 79)

    2009-06-12 13:37:02 Thread-1 ERROR ssl: nzos_Handshake failed, ret=28862
    2009-06-12 13:37:02 Thread-1 ERROR http: 6: Unable to initialize ssl connection with server, aborting connection attempt
    2009-06-12 13:37:11 Thread-1 WARN http: snmehl_connect: connect failed to (sapm30:3938): A remote host refused an attempted connect operation. (error = 79)
    2009-06-12 13:37:20 Thread-1 WARN http: snmehl_connect: connect failed to (sapm30:3938): A remote host refused an attempted connect operation. (error = 79)

    Although the ports 1158 and 3938 have their entries in /etc/services as

    dbconsole_agent 1158/tcp #Oracle dbConsole Agent

    dbcontrol_agent 3938/tcp # Oracle dbControl Agent po
    dbcontrol_agent 3938/udp # Oracel dbControl Agent po

    Please advice me.

  11. im having almost the same problem with oem. i was able to deconfig and drop the repos successfully. but when a try to configurate and create the repos. the process stop, checked the log file to see , i get this error ORA-04063 saying that the package SYSMAN.MGMT_AUDIT_LOG invalid, i tried to recompile that package alter package SYSMAN.MGMT_AUDIT_LOG compile. i get ” package not found”. Please help out here.

  12. Thanks for hints. For my installation, I also had to adjust memory_target (max and actual). Most likely because I installed it on ubuntu 9.04 x64, so there was probably to small sizes to start with.

  13. thanks alot, it really help.

  14. Rami Atallah

    Many thanks :) my problem is solved now

  15. EM Repository is giving Error OF ORA- 01115 , ORA – 01110 , ORA 27091 , ORA – 27070 .

    I am not able to drop EM repository .

    My Server is window 2003 Server with ORACLE 10 G.

    Regards
    NJ

  16. This solution works
    make sure you restart after applying the below changes to /etc/hosts then in order

    1) switch to root do a quick
    xhost local:root

    SWITCH TO user oracle

    2) Then open the database, http://www.thegeekstuff.com/2009/01/oracle-database-startup-and-shutdown-procedure/

    3) Then open LSNRCTL
    http://www.thegeekstuff.com/2009/05/oracle-lsnrctl-listener-shutdown-and-startup-procedures/

    4) Then EN
    emctl start dbconsole

    IT WORKED Thanks to all who helped patch this together..
    this was for a Centos distro, with 11gR2

    listener
    and Enterprise Manager

    having the same problem, after my oracle 11gR2 installation, and having the following /etc/hosts file on my linux box

    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6

    I solved changing the order of the aliases, like this

    127.0.0.1 localhost localhost.localdomain
    ::1 localhost6.localdomain6 localhost6

    thanks
    Mario

    November 30, 2

  17. Problem Solved. Thanks ;)

  18. Thanks for this post. It helped me a lot….

  19. Hi ….

    While dropping the repository, I am getting the error as below… Can you please help ….

    E:\ETL\product\11.2.0\dbhome_1\BIN>orapwd file=$ORACLE_HOME/dbs/pwdwassup.ora

    Enter password for SYS:

    OPW-00001: Unable to open password-file

    E:\ETL\product\11.2.0\dbhome_1\BIN>

  20. I followed your writeup and was assisted a great deal. My em is now up and running.

    Thanks very much

  21. i am facing same issue on windows……….. how to solve it on windows

  22. Thank’s a lot, it works for me.. :)

    Awesome..

  23. buty trekkingowe

    We’re a group of volunteers and opening a new scheme in our community. Your website provided us with useful information to work on. You’ve performed a formidable process
    and our whole group will probably be grateful to you.

  24. Hi.
    I am trying to follow your guide but i have faced with error on the repo stage. Please help to solve it. Thanks.

    [oracle@node1 bin]$ ./emca -config dbcontrol db -repos create

    STARTED EMCA at May 2, 2014 2:45:36 AM
    EM Configuration Assistant, Version 11.2.0.3.0 Production
    Copyright (c) 2003, 2011, Oracle. All rights reserved.

    Enter the following information:
    Database SID: PROD
    Listener port number: 1521
    Listener ORACLE_HOME [ /d01/oracle/PROD/11.2.0 ]:
    Password for SYS user:
    Password for DBSNMP user:
    Password for SYSMAN user:
    Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):
    —————————————————————–

    You have specified the following settings

    Database ORACLE_HOME ……………. /d01/oracle/PROD/11.2.0

    Local hostname ……………. node1.node.com
    Listener ORACLE_HOME ……………. /d01/oracle/PROD/11.2.0
    Listener port number ……………. 1521
    Database SID ……………. PROD
    Email address for notifications ……………
    Outgoing Mail (SMTP) server for notifications ……………

    —————————————————————–
    Do you wish to continue? [yes(Y)/no(N)]: y
    May 2, 2014 2:46:05 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /d01/oracle/PROD/cfgtoollogs/emca/PROD/emca_2014_05_02_02_45_35.log.
    May 2, 2014 2:46:06 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
    WARNING: ORA-01031: insufficient privileges

    May 2, 2014 2:46:06 AM oracle.sysman.emcp.EMConfig perform
    SEVERE:

    Database connection through listener failed. Fix the error and run EM Configuration Assistant again.

    Some of the possible reasons may be:

    1) Listener port 1521 provided is incorrect. Provide the correct port.
    2) Listener is not up. Start the Listener.
    3) Database service PROD is not registered with listener. Register the database service.
    4) Listener is up on physical host and ORACLE_HOSTNAME environment variable is set to virtual host. Unset ORACLE_HOSTNAME environment variable.
    5) Listener is up on virtual host. Set environment variable ORACLE_HOSTNAME=.
    6) /etc/hosts does not have correct entry for hostname.

    Refer to the log file at /d01/oracle/PROD/cfgtoollogs/emca/PROD/emca_2014_05_02_02_45_35.log for more details.
    Could not complete the configuration. Refer to the log file at /d01/oracle/PROD/cfgtoollogs/emca/PROD/emca_2014_05_02_02_45_35.log for more details.
    [oracle@node1 bin]$

  25. I had the same issue. It turns out was not in /etc/hosts file (on a linux box).
    I edited the hosts file to include and problem was solved….
    So i will try that before creating the folders…

  26. I had the same issues.. it turns out the hostname in the config file was different from the one in /etc/hosts file (linux box).
    I edited the /etc/hosts file and included the hostname.
    emctl start dbconsole started fine no issue.
    you may want to try that before creating the folder…

    note. it maybe the host name is not resolved.. so check your dns or hosts file

Trackbacks

  1. Liens pratiques « Blog Oracle de mgiraldeau

Leave a Reply