Posted by: joao | February 8, 2009

Oracle Enterprise Manager fails to start! OC4J Configuration issue

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!


Responses

  1. 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. 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. 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. 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.


Leave a response

Your response:

Categories