Tag Archives: Enterprise Manager

Solaris EM12c Agent Unreachable with Error “peer not authenticated”

Today faced this error on solaris 5.10 sparc

./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2  
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Status agent Failure:unable to connect to http server at https://myhost.mydomain.ge:3872/emd/lifecycle/main/. [peer not authenticated]

solution : Stop the Agent:

$ ./emctl stop agent

Verfiy the java process has stopped

  $ ps -ef |grep java

If the java process is still running you would see like the following still running

$AGENT_HOME/core/12.1.0.2.0/jdk/bin/sparcv9/java
$kill -9 pid

Update Config File:

$cd $AGENT_HOME/agent_inst/sysman/config
$cp s_jvm_options.opt s_jvm_options.opt.bkp

Add the following line to s_jvm_options.opt

-Dsun.security.pkcs11.enable-solaris=false

Restart Agent and Test Upload:

$ cd $AGENT_HOME/bin
$ ./emctl start agent
$ ./emctl upload agent

Enterprise Manager – perl: warning: Setting locale failed, LC_ALL = (unset)

today we faced warnings when starting agent of enterprise manager grid control.

emctl start agent

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_GB:en",
	LC_ALL = (unset),
	LANG = "en_GB"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

check your locale settings by type locale
solution is very simple in the .bash_profile add LC_ALL=”en_GB.utf8″ :

locale
.........
.........
vi .bash_profile
export LC_ALL="en_GB.utf8"

How to clear alerts in enterprise manager (database control)

When alert appear in enterprise manager and with some action solve, it may stay in enterprise manager as shown picture:
1
Here i’ll show you how to clear this unnecessary information.
login into database with sysman user and execute this script:

SELECT t.target_name,
       t.target_type,
       collection_timestamp,
       MESSAGE,
          'exec em_severity.delete_current_severity('''
       || t.target_guid
       || ''','''
       || metric_guid
       || ''','''
       || key_value
       || ''')'
          em_severity
  FROM    sysman.mgmt_targets t
       INNER JOIN
          sysman.mgmt_current_severity s
       ON t.target_guid = s.target_guid;

result:
2

after that run this scripts

SQL> exec em_severity.delete_current_severity('C894D538793FFA3B4727BCBCD84D4925','3F2BBE6BF105C0D16A3710F2868B8399','RECOVERY AREA');

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

same way you can clear entire alerts.

Enterprise Manager DB Control/DB Console (OEM) is not working after Changing Hostname or IP Address

After change hostname on oracle linux 6, enterprise manager doesn’t working, for solve this problem make next steps:
1) Set $ORACLE_HOSTNAME to the old hostname

  
export ORACLE_HOSTNAME=old_name

2) De-configure the old DB Console by running the following command:

  
$ORACLE_HOME/bin/emca -deconfig dbcontrol db

3) Set $ORACLE_HOSTNAME to the new hostname:

export ORACLE_HOSTNAME=new_name

4)Configure the new DB Console

$ORACLE_HOME/bin/emca -config dbcontrol db -repos recreate

Enterprise Manager is not able to connect to the database instance. The state of the components are listed below

When started browser for login in enterprise manager, it shows next:
1

first of all check enterprise manager status :
emctl status dbconsole
that told Oracle Enterprise Manager 10g is running.
after that i checked log files under $ORACLE_HOME\hostname.domainname_dbname\sysman\log
and found the following error
[SystemThreadGroup-8] ERROR app.SessionObjectManager sessionDestroyed.128 – java.sql.SQLException: ORA-28000: the account is locked
now Solution is simple:

sqlplus  / as sysdba                            

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Oct 10 09:59:32 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

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

SQL> select account_status from dba_users where username='SYSMAN';

ACCOUNT_STATUS
--------------------------------
LOCKED(TIMED)

SQL> alter user sysman account unlock;

User altered.

after that run browser and enjoy with enterprise manager.

2

if that don’t help then make next steps:

SQL> alter user sysman account unlock;
SQL> alter user sysman identified by passwd;

emctl setpasswd dbconsole

and this must helps.

The database is down. Please specify the host credentials to access database restart and diagnostics tools

1
The database is down. Please specify the host credentials to access database restart and diagnostics tools.
Enterprise manager shows that database is down but in real it is not.

[oracle@oel6 trace]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Sep 13 10:38:01 2013

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

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

SQL> select status from v$instance;

STATUS
------------
OPEN

check status of listener

[oracle@oel6 log]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 16-DEC-2013 11:54:14

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                16-DEC-2013 11:51:59
Uptime                    0 days 0 hr. 2 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u0/app/oracle/diag/tnslsnr/oel6/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
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

check status of dbconsole

[oracle@oel6 oracle]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://oel6:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running. 
------------------------------------------------------------------
Logs are generated in directory /u0/app/oracle/product/11.2.0/dbhome_1/oel6_orcl/sysman/log 

it’s runing, after that i checked alert.log but there was nothing about some errors.
Solution:
select username, account_status from dba_users order by 2;
shows that
DBSNMP EXPIRED
SYSMAN EXPIRED
SYSTEM EXPIRED(GRACE)

now simple change their statuses.

alter user SYSTEM identified by oracle;
alter user SYSMAN identified by oracle;
alter user DBSNMP identified by oracle;

if they are locked then simple unlock with commands:

alter user DBSNMP account unlock;
alter user SYSTEM account unlock;
alter user SYSMAN account unlock;

it’s all, now enjoy with enterprise manager
2

Recreate Oracle Enterprise Manager 11g for Real Application Cluster (RAC)

If you you want to recrate enterprise manager for rac scenario is next:

[oracle@node1-230-231 ~]$ emca -config dbcontrol db -repos recreate -cluster

STARTED EMCA at Jun 12, 2013 12:15:19 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Service name: orcl
Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
Password for SYS user:  
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform a fresh configuration
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Password for DBSNMP user:  
Password for SYSMAN user:  
Cluster name: rac-scan

if you don’t know cluster name open another terminal

[oracle@node1-230-231 ~]$ su - grid
Password: 
[grid@node1-230-231 ~]$ cemutlo -n
rac-scan
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
ASM port [ 1521 ]: 
ASM username [ ASMSNMP ]: 
ASM user password:  
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1

Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ rac-scan
Database unique name ................ orcl
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
ASM ORACLE_HOME ................ /u01/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 12, 2013 12:17:27 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2013_06_12_12_15_19.log.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jun 12, 2013 12:18:18 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jun 12, 2013 12:22:02 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jun 12, 2013 12:22:06 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 12, 2013 12:30:28 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jun 12, 2013 12:30:47 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jun 12, 2013 12:31:50 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jun 12, 2013 12:31:51 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_node1-230-231_orcl to remote nodes ...
Jun 12, 2013 12:31:52 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_node2-232-233_orcl to remote nodes ...
Jun 12, 2013 12:32:04 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl to remote nodes ...
Jun 12, 2013 12:32:06 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/node2-232-233_orcl to remote nodes ...
Jun 12, 2013 12:32:29 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jun 12, 2013 12:33:17 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 12, 2013 12:33:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 12, 2013 12:33:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://node1-230-231:1158/em <<<<<<<<<<<
Jun 12, 2013 12:34:09 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO: 
****************  Current Configuration  ****************
 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

orcl              node1-230-231              node1-230-231
orcl              node2-232-233              node1-230-231


Jun 12, 2013 12:34:09 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING: 
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. 

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 12, 2013 12:34:09 PM

check status of enterprise manager

[oracle@node1-230-231 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://node1-230-231:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running. 
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl/sysman/log 

that’s all.