Showing posts with label OEM13c Release 2. Show all posts
Showing posts with label OEM13c Release 2. Show all posts

RECOVER WEBLOGIC ADMINISTRATION PASSWORD OF ENTERPRISE MANAGER 13.3 IN OCI (MARKETPLACE IMAGE)

 

RECOVER WEBLOGIC ADMINISTRATION PASSWORD OF ENTERPRISE MANAGER 13.3 IN OCI (MARKETPLACE IMAGE)

First let’s get the encrypted information from boot.properties file:

The encrypted information starts with {AES} and ends with equal (=) sign. To decrypt the username and password, we will create a simple java application:

Save it as “recoverpassword.java”. To be able to compile (and run) it, we need to set environment variables (we’re still in GCDomain folder). We’ll give the encrypted part as the last parameter:

I intentionally break the lines to make the code fits the page but you don’t need to do it. Correct CLASSPATH and DOMAIN_NAME are set when we issued “. bin/setDomainEnv.sh” command. When we run the last two commands, we should see the weblogic administrator username and password in plain text. By the way, even if you use the same password with me, you may see different encrypted text because when encrypting and decrypting, weblogic uses the cypher key stored in “security/SerializedSystemIni.dat” file. So as long as the cypher key is different, you get different encrypted text for even same input.

Patch Recommendations functionality in 13.2 Cloud Control is showing old and incorrect recommendation

ERROR: 

Patch Recommendations" functionality in 13.2 Cloud Control is showing old and incorrect recommendation about database targets. The issue may not be isolated just to database targets.

The issue was reported on both 12.2.0.1 and 12.1.0.2 Repository databases.

FIX: 

1. Set the following parameter on the repository database:

SQL> alter system set "_fix_control" = '13836796:0' scope=both;

2. Restart the OMS (emctl stop oms -all; emctl start oms)

3. Login as SYSMAN user in the repository database and run:

SQL>  DELETE FROM mgmt_aru_patch_recom_md;

2431 rows deleted.

SQL> begin

mos_pa_patch_recom.delete_checksums;

end;

/  

PL/SQL procedure successfully completed.

SQL>


4. Rerun the "Refresh from My Oracle Support" job.

Remove Oracle Enterprise Manager 13c Agent Manually

The process is quite straightforward just by invoking the AgentDeinstall.pl script located under:

$AGENT_HOME/sysman/install/AgentDeinstall.pl

[oracle@DB1 ~]$/u01/app/oracle/product/Agent13c/agent_13.2.0.0.0/perl/bin/perl  /u01/app/oracle/product/Agent13c/agent_13.2.0.0.0/sysman/install/AgentDeinstall.pl -agentHome /u01/app/oracle/product/Agent13c/agent_13.2.0.0.0


 Agent Oracle Home: /u01/app/oracle/product/Agent13c/agent_13.2.0.0.0

agentHome = /u01/app/oracle/product/Agent13c/agent_13.2.0.0.0
Agent installed in config modevalue of skip flag is false
NOTE: The agent base directory: /u01/app/oracle/product/Agent13c will be removed after successful deinstallation of agent home.
The command is /u01/app/oracle/product/Agent13c/agent_13.2.0.0.0/oracle_common/jdk/jre/bin/java -classpath /u01/app/oracle/product/Agent13c/agent_13.2.0.0.0/oui/modules/OraInstaller.jar:/u01/app/oracle/product/Agent13c/agent_13.2.0.0.0/oui/modules/emCfg.jar:/u01/app/oracle/product/Agent13c/agent_13.2.0.0.0/jlib/agentInstaller.jar oracle.sysman.agent.installer.AgentDeinstallation /u01/app/oracle/product/Agent13c/agent_13.2.0.0.0 /u01/app/oracle/product/Agent13c /u01/app/oracle/product/Agent13c/agent_inst
Apr 17, 2018 12:37:52 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Oracle Enterprise Manager Cloud Control 13c Release 2
Apr 17, 2018 12:37:52 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
Apr 17, 2018 12:37:59 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Agent is Not Running
Apr 17, 2018 12:37:59 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Plugin homes:
Apr 17, 2018 12:37:59 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Plugin homes:
Apr 17, 2018 12:37:59 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: Both /etc/oragchomelist and /var/opt/oracle/oragchomelist does not exist.
The output is Agent Deinstall:agent deintall has been started
Executing status :0
Agent service stopped successfully.
 and the exit code is 0
Agent deconfiguration completed successfully. 0


 DetachHome Command executed:/u01/app/oracle/product/Agent13c/agent_13.2.0.0.0/oui/bin/detachHome.sh -silent ORACLE_HOME=/u01/app/oracle/product/Agent13c/agent_13.2.0.0.0
WARNING: Ignoring ORACLE_HOME=<value> on the command line (cannot override the Oracle Home to be detached)
Launcher log file is /tmp/OraInstall2018-04-17_12-38-03PM/launcher2018-04-17_12-38-03PM.log.
Starting Oracle Universal Installer

Checking swap space: must be greater than 500 MB.   Actual 5983 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)


'detachHome' was successful.
Logs successfully copied to /u01/app/oraInventory/logs.

 Removing other files ...

NOTE: The targets monitored by this Management Agent will not be deleted in the Enterprise Manager Repository by this deinstall script. Make sure to delete the targets manually from the Cloud Control Console for a successful deinstallation.
[oracle@DB1 ~]$

Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files.



Error :
[oracle@xxxx-oem-01 emcli]$cd /u01/app/oracle/Middleware132c/bin/
[oracle@xxxx-oem-01 bin]$ emcli sync
Synchronized successfully
[oracle@xxxx-oem-01 bin]$ emcli get_targets
Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files.
[oracle@xxxx-oem-01 bin]

Executing any Enterprise Manager (EM) 13c Cloud Control command (except sync) fails with the following error:
./emcli sync
Synchronized successfully
./emcli get_targets
Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files.
-  The <gc_inst>/em/EMGC_OMS1/sysman/log/emoms.trc reports the below errors for the emcli command:
2016-10-13 12:19:08,266 [EMUI_12_19_07_/console/cli] ERROR emCLI.CLIPageHandler render.671 - ORA-14400: inserted partition key does not map to any partition
ORA-06512: at "SYSMAN.EM_CLI", line 303
java.sql.SQLException: ORA-14400: inserted partition key does not map to any partition ORA-06512: at "SYSMAN.EM_CLI", line 303
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:407)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1113)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:546)
-  The EM Diagkit (from Doc ID 1426973.1) reports:
 verifyCORE
0002. Missing DBMS_SCHEDULER jobs: 36
-  All the DBMS Scheduler jobs related to the EM repository are shown to be down in the Setup -> Manage Cloud Control > Repository, page in the Console UI.
-  Log in to EM 13c Cloud Control through a browser works without any errors.

CAUSE

None of the DBMS_scheduler jobs are running in the EM repository.

The ORA-14400 error indicates that the expected partitions are not present in the EM 13c repository for storage of the login-related data.
The dbms_scheduler jobs are responsible for creating the partitions.

SOLUTION

Use the following steps to perform the partition maintenance and re-submit all mandatory DBMS scheduler jobs related to the EM repository:
SQL> connect / as sysdba
SQL> alter system set job_queue_processes = 0;
SQL> connect sysman/<password>
SQL> exec emd_maintenance.remove_em_dbms_jobs;
SQL>exec gc_interval_partition_mgr.partition_maintenance;
SQL> @<OMS_HOME>/sysman/admin/emdrep/sql/core/latest/admin/admin_recompile_invalid.sql SYSMAN
SQL> connect / as sysdba
SQL> alter system set job_queue_processes = 1000;
SQL> connect sysman/<password>
SQL> exec emd_maintenance.submit_em_dbms_jobs;
SQL> commit;
Execute the necessary emcli commands after the above.

[oracle@xxxx-oem-01 bin]$emcli login -username=sysman
Enter password :

Login successful
[oracle@xxxx-oem-01 bin]$
[oracle@xxxx-oem-01 bin]$emcli sync
Synchronized successfully
[oracle@fcias-oem-01 bin]$emcli get_targets
Status  Status           Target Type           Target Name
 ID
-9      N/A              cloud                 Middleware and Database Cloud
.
.
..

Useful emcli commands in EM Cloud Control 12c

 you to realize useful operation in EM Cloud Control 12c using emcli tool rather than GUI.

You can use emcli when you need to implement batch scripts on your Oracle Management Server (OMS).
  • Login to EM
$ emcli login -username=sysman
Enter password :
Login successful
OR
$ emcli login -username=sysman -password=XXXXXX
Login successful
  • Synchronize emcli with the OMS
$ emcli sync
Synchronized successfully
  • Logout EM
$ emcli logout
Logout successful
  • List all the targets already promoted
$ emcli get_targets
Status  Status           Target Type           Target Name
 ID
-9      n/a              group                 OFM
1       Up               host                  xxxdb-prod3.mydomain.com
1       Up               host                  xxxdb-prod2.mydomain.com
1       Up               host                  xxxlgc-prod2.mydomain.com
1       Up               host                  xxxdb-prod1.mydomain.com
1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/e
                                               mgc
1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/O
                                               CMRepeater
1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/e
                                               mpbs
-9      n/a              metadata_repository   /EMGC_GCDomain/GCDomain/EMGC_ADMINS
                                               ERVER/mds-sysman_mds
-9      n/a              metadata_repository   /EMGC_GCDomain/GCDomain/EMGC_ADMINS
                                               ERVER/mds-owsm
1       Up               oracle_apache         /EMGC_GCDomain/instance1/ohs1
1       Up               oracle_apm            /EMGC_GCDomain/GCDomain/EMGC_OMS1/o
                                               racle.security.apm(11.1.1.3.0)
1       Up               oracle_beacon         EM Management Beacon
1       Up               oracle_em_service     EM Console Service
1       Up               oracle_em_service     EM Jobs Service
1       Up               oracle_emd            xxxdb-prod1.mydomain.com:1830
1       Up               oracle_emd            xxxdb-prod3.mydomain.com:1830
1       Up               oracle_emd            xxxlgc-prod2.mydomain.com:3872
1       Up               oracle_emd            xxxdb-prod2.mydomain.com:1830
1       Up               oracle_emrep          Management Services and Repository
-9      n/a              oracle_home           agent12g1_9_xxxlgc-prod2
-9      n/a              oracle_home           WebLogicServer10_3_5_0_0_xxxlgc-pro
                                               d2
-9      n/a              oracle_home           oms12g1_3_xxxlgc-prod2
-9      n/a              oracle_home           webtier12g1_20_xxxlgc-prod2
-9      n/a              oracle_ias_farm       EMGC_GCDomain
1       Up               oracle_oms            xxxlgc-prod2.mydomain.com:4889_Managem
                                               ent_Service
1       Up               oracle_oms_console    xxxlgc-prod2.mydomain.com:4889_Managem
                                               ent_Service_CONSOLE
1       Up               oracle_oms_pbs        xxxlgc-prod2.mydomain.com:4889_Managem
                                               ent_Service_PBS
-9      n/a              weblogic_domain       /EMGC_GCDomain/GCDomain
1       Up               weblogic_j2eeserver   /EMGC_GCDomain/GCDomain/EMGC_OMS1
1       Up               weblogic_j2eeserver   /EMGC_GCDomain/GCDomain/EMGC_ADMINSERVER
  • Delete a specific target
$ emcli delete_target -name="/wlstest_wlstest/wlstest/myServer_jvm" -type="java_virtual_machine"
  • Delete an agent and its targets
$ emcli delete_target -name="xxxlgc-prod2.mydomain.com:3872" -type="oracle_emd" -delete_monitored_targets
  • Follow a plugin deployment (on the OMS / on an agent)
-- Oracle Database plugin
$ emcli get_plugin_deployment_status -plugin_id=oracle.sysman.db
-- Oracle Fusion Middleware plugin
$ emcli get_plugin_deployment_status -plugin_id=oracle.sysman.emas
-- My Oracle Support plugin
$ emcli get_plugin_deployment_status -plugin_id=oracle.sysman.mos
  • Import an update (for example: a plugin update) into the software library.
$ emcli import_update -file="p14018177_112000_Generic.zip" -omslocal
  • Deploy a plugin on the OMS
$ emcli deploy_plugin_on_server -plugin=oracle.sysman.db -sys_password=XXXXX
  • Deploy a plugin on EM agent(s)
$ emcli deploy_plugin_on_agent -plugin="oracle.sysman.db"  -agent_names="xxxdb-prod1.mydomain.com:3872;xxxdb-prod2.mydomain.com:3872"
  • List available agents in the library
$ emcli get_supported_platforms
Getting list of platforms ...
Check the logs at /home/oracle/agent.log
About to access self-update code path to retrieve the platforms list..
Getting Platforms list ...
-----------------------------------------------
Version = 12.1.0.1.0
 Platform = Linux x86-64
-----------------------------------------------
Version = 12.1.0.1.0
 Platform = Linux x86
-----------------------------------------------
Version = 12.1.0.1.0
 Platform = IBM AIX on POWER Systems (64-bit)
-----------------------------------------------
Version = 12.1.0.1.0
 Platform = Microsoft Windows (32-bit)
-----------------------------------------------
Version = 12.1.0.1.0
 Platform = Microsoft Windows (64-bit)
-----------------------------------------------
Platforms list displayed successfully
  • Download an agent from the library (used for agentDeploy.sh script method)
$ emcli get_agentimage -destination=/home/oracle -platform="Microsoft Windows x64 (64-bit)" -version="12.1.0.1.0"
Platform:Microsoft Windows x64 (64-bit)
Destination:/home/oracle
 === Partition Detail ===
Space free : 11 GB
Space required : 1 GB
Check the logs at /home/oracle/get_agentimage_2012-06-11_15-18-09-PM.log
Setting property ORACLE_HOME to:/u02/Middleware/oms
calling pulloneoffs with arguments:/u02/Middleware/oms/u02/softLibrary/32/C0C9BF40C6A36668E0439D33010AE58512.1.0.1.0windows_x64
Check this logs for more information: /u02/Middleware/oms/sysman/prov/agentpush/logs
  • Set monitoring credentials for a specific target (example given for an Oracle database instance)
$ emcli set_credential -target_type=oracle_database -target_name="prod1" -credential_set=DBCredsMonitoring -user=sysman -column="Role:SYSDBA;UserName:sys;password:XXXXX" -monitoring
Advertisements