This is the sixth in a series of blog posts, that covers the details to deploy the Oracle Management Servers for a high available set up of Oracle Enterprise Manager 13.5 using Oracle Cloud Infrastructure‘s resources.
This is the last of a six-part series on how to deploy a high available installation of Oracle Enterprise Manager (OEM) 13.5 using Oracle Cloud Infrastructure (OCI) services.
Details of previous posts:
This post shows how to configure and include additional Management Services behind the load balancer.
To add more Management Servers (also called application machines) to your environment there are a series of prerequisites:
The full requirements for a high available installation of OEM can be found here:
Part VI Configuring Enterprise Manager for High Availability
To deploy the management service in a new host first you need to deploy the agent on it.
[root@vloemapp01 oracle]# cat /home/opc/.ssh/authorized_keys ssh-rsa XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXHQeOcjx9qcyl8erGt956Lq6uLnAzXFMF2VcxItPbMTG3HNVkuKLVGSecmrjxTcTRTY2XEG7vgnCQCbY6n7J3mZasahmZCD1MhPJ93uD4ze7FBdcJYvNnuxWIeXmMlisWXFCFHsF75jMYm5DWRrFeyBAkuOxVuJ5+DfIqLPD/apcdsr0SzJzZGbU2PtpTf302aAK/G4PtxO0GAh8NKK19OlX6mo1c1u3n59ADYb//vp5xYln3+Q== salgado-oci
[root@vloemapp01 oracle]# vi /home/oracle/.ssh/authorized_keys [root@vloemapp01 oracle]# cat /home/oracle/.ssh/authorized_keys ssh-rsa XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXHQeOcjx9qcyl8erGt956Lq6uLnAzXFMF2VcxItPbMTG3HNVkuKLVGSecmrjxTcTRTY2XEG7vgnCQCbY6n7J3mZasahmZCD1MhPJ93uD4ze7FBdcJYvNnuxWIeXmMlisWXFCFHsF75jMYm5DWRrFeyBAkuOxVuJ5+DfIqLPD/apcdsr0SzJzZGbU2PtpTf302aAK/G4PtxO0GAh8NKK19OlX6mo1c1u3n59ADYb//vp5xYln3+Q== salgado-oci
Note: To use SSH Connection while deploying the agent, the key must be in OpenSSH mode.
To convert your Base64 key to OpenSSH, open your Private Key with Putty Generator, then save it in OpenSSH mode (Conversions -> Export OpenSSH Key), otherwise it won’t work.
Also, add only the private key exported in OpenSSH mode, there’s no need to add the public key.
[root@vloemapp02 ~]# cd /u01/oemagent/agent_13.5.0.0.0 [root@vloemapp02 agent_13.5.0.0.0]# ./root.sh Finished product-specific root actions. /etc exist [root@vloemapp02 agent_13.5.0.0.0]#
[oracle@vloemapp02 ~]$ /u01/app/oracle/oemagent/agent_13.5.0.0.0/bin/emctl status agent Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Agent Version : 13.5.0.0.0 OMS Version : 13.5.0.0.0 Protocol Version : 12.1.0.1.0 Agent Home : /u01/app/oracle/oemagent/agent_inst Agent Log Directory : /u01/app/oracle/oemagent/agent_inst/sysman/log Agent Binaries : /u01/app/oracle/oemagent/agent_13.5.0.0.0 Core JAR Location : /u01/app/oracle/oemagent/agent_13.5.0.0.0/jlib Agent Process ID : 29923 Parent Process ID : 29855 Agent URL : https://vloemapp02.sub0XXXXXXXXXX.oemvcn.oraclevcn.com:3872/emd/main/ Local Agent URL in NAT : https://vloemapp02.sub0XXXXXXXXXX.oemvcn.oraclevcn.com:3872/emd/main/ Repository URL : https://oem135slb01.oemtest.com:4903/empbs/upload Started at : 2021-07-31 04:19:52 Started by user : oracle Operating System : Linux version 4.14.35-1902.8.4.el7uek.x86_64 (amd64) Number of Targets : 38 Last Reload : (none) Last successful upload : 2021-07-31 05:34:56 Last attempted upload : 2021-07-31 05:34:56 Total Megabytes of XML files uploaded so far : 0.34 Number of XML files pending upload : 0 Size of XML files pending upload(MB) : 0 Available disk space on upload filesystem : 39.08% Collection Status : Collections enabled Heartbeat Status : Ok Last attempted heartbeat to OMS : 2021-07-31 05:36:18 Last successful heartbeat to OMS : 2021-07-31 05:36:18 Next scheduled heartbeat to OMS : 2021-07-31 05:37:19 --------------------------------------------------------------- Agent is Running and Ready
Even after successfully installing the agent, the following error message was displayed while trying to access the host:
“Target data is currently being uploaded to the repository. The Target will be accessible once the process is complete”
I found that the connections between the agent and OMS were being blocked due to missing rules on my VCN, as well as the firewalls installed in the hosts. So, make sure to add the required rules. In this test, I simply allowed all connections and disabled the firewalls, which is not recommended in a live system.
You must also add the required ingress/egress rules for all ports used by the management service and the agents. The full list of ports used by OEM can be found, summarized, in My Oracle Support:
Before adding Management servers, the Load Balancer must be configured to work with the first OMS. All Management Agents communicating with the first OMS must be uploading data only through this SLB.
If you’re following the whole procedure to set up OEM 13.5 on OCI, check the fifth post on how to set up the load balancer, before deploying the application in the second machine:
Furthermore, the management agent must be up and running on the target host, otherwise you won’t be able to proceed with the deployment procedure.
Also, there are a few more things to be checked in the machine.
[root@vloemapp02 ~]# dd if=/dev/zero of=/u01/swapfile bs=1024 count=33554432
[root@vloemapp02 ~]# mkswap /u01/swapfile Setting up swapspace version 1, size = 33554428 KiB no label, UUID=310c3383-fa5b-4e0f-b1db-bea13a416db0
[root@vloemapp02 ~]# swapon /u01/swapfile
UUID=310c3383-fa5b-4e0f-b1db-bea13a416db0 /u01/swapfile swap swap defaults 0
Before installing a secondary management server, you need to copy the SSL keys to the repository, otherwise you’ll hit the following error:
Copy the key to the repository before adding the new server:
[oracle@vloemapp01 ~]$ /u01/app/oracle/middleware135/bin/emctl config emkey -copy_to_repos Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. Enter Enterprise Manager Root (SYSMAN) Password : The EMKey has been copied to the Management Repository. This operation will cause the EMKey to become unsecure. After the required operation has been completed, secure the EMKey by running "emctl config emkey -remove_from_repos".
[oracle@vloemapp02 ~]$ /u01/app/oracle/middleware135/bin/emctl stop oms -all -force [oracle@vloemapp02 ~]$ /u01/app/oracle/middleware135/bin/emctl start oms
[oracle@vloemapp02 ~]$ emctl status oms -details Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. Enter Enterprise Manager Root (SYSMAN) Password : Console Server Host : vloemapp02.sub0XXXXXXXXXX.oemvcn.oraclevcn.com HTTP Console Port : 7788 HTTPS Console Port : 7803 HTTP Upload Port : 4889 HTTPS Upload Port : 4903 EM Instance Home : /u01/app/oracle/oem135_inst/em/EMGC_OMS1 OMS Log Directory Location : /u01/app/oracle/oem135_inst/em/EMGC_OMS1/sysman/log SLB or virtual hostname: oem135slb01.oemtest.com HTTPS SLB Upload Port : 4903 HTTPS SLB Console Port : 7803 HTTPS SLB JVMD Port : 7803 Agent Upload is locked. OMS Console is locked. Active CA ID: 1 Console URL: https://oem135slb01.oemtest.com:7803/em Upload URL: https://oem135slb01.oemtest.com:4903/empbs/upload WLS Domain Information Domain Name : GCDomain Admin Server Host : vloemapp02.sub0XXXXXXXXXX.oemvcn.oraclevcn.com Admin Server HTTPS Port: 7102 Admin Server is RUNNING Oracle Management Server Information Managed Server Instance Name: EMGC_OMS1 Oracle Management Server Instance Host: vloemapp02.sub0XXXXXXXXXX.oemvcn.oraclevcn.com WebTier is Up Oracle Management Server is Up JVMD Engine is Up
httsp://vloemapp02.subXXXXXXXXXX.oemvcn.oraclevcn.com:7803/em
Now that our environment has two management servers, we need to include the second one in our backend sets, so the load balancer balances the load between the two.
Check the Fifth Post of this series for details on how to add a server to the backend set of a load balancer.
Oracle also mentions we need to execute the “root.sh” script, but since we included the OPC credential with privileges to use “sudo” as “root,” we don’t need to.
As recommended by Oracle, after adding the secondary management server, it’s important to remove the SSL Keys from the repository.
[oracle@vloemapp01 ~]$ emctl config emkey -remove_from_repos
[oracle@vloemapp02 ~]$ emctl status oms -details Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. Enter Enterprise Manager Root (SYSMAN) Password : Console Server Host : vloemapp02.subXXXXXXXXXXXXXX.oemvcn.oraclevcn.com HTTP Console Port : 7788 HTTPS Console Port : 7803 HTTP Upload Port : 4889 HTTPS Upload Port : 4903 EM Instance Home : /u01/app/oracle/oem135_inst/em/EMGC_OMS1 OMS Log Directory Location : /u01/app/oracle/oem135_inst/em/EMGC_OMS1/sysman/log SLB or virtual hostname: oem135slb01.oemtest.com HTTPS SLB Upload Port : 4903 HTTPS SLB Console Port : 7803 HTTPS SLB JVMD Port : 7803 Agent Upload is locked. OMS Console is locked. Active CA ID: 1 Console URL: https://oem135slb01.oemtest.com:7803/em Upload URL: https://oem135slb01.oemtest.com:4903/empbs/upload WLS Domain Information Domain Name : GCDomain Admin Server Host : vloemapp02.subXXXXXXXXXXXXXX.oemvcn.oraclevcn.com Admin Server HTTPS Port: 7102 Admin Server is RUNNING Oracle Management Server Information Managed Server Instance Name: EMGC_OMS1 Oracle Management Server Instance Host: vloemapp02.sub01181259440.oemvcn.oraclevcn.com WebTier is Up Oracle Management Server is Up JVMD Engine is Up
Note: You’ll be asked to enter the SYSMAN password.
https://oem135slb01.oemtest.com:7803/em
When dealing with multiple management servers, you’ll need to control the load balancer to make the most of your high available setup.
For instance, when patching a Management Server, you can change the load balancer settings to divert traffic from it. To do this, get into the “Load Balancer” section on OCI.
Once the maintenance on the first server is over, disable the “Drain” option for it and drain the connections from the second one, using the steps above.
This allows for maintenance on each server individually without causing any outages to the system or its end users.
If you simply stop the servers without draining it or take it offline, the end users might get some errors until the Load Balancer marks that server as offline. Therefore it’s preferable to drain the server traffic through the load balancer before stopping it.
This series demonstrated all the steps required to launch a high available OEM 13.5 using OCI’s resources. Hope you enjoyed it and stay tuned for my next series.
As always, drop your questions in the comments. Don’t forget to sign up for our updates here.
Ready to optimize your Oracle Database for the future?