Monday, January 5, 2015

How to Start the Oracle Cloud Control OMS



This is for cloud control 12.1.0.4  but should work for most Cloud Control variants

We're assuming here that you have installed the Cloud Control database, and run all the installation etc but you've forgotten how to start the OMS, so this is a fairly basic Oracle Cloud Control installation.



Assumptions : We're working on Oracle Linux here but it's fairly simple to do this on any platform.


First thing to do is to source the environment :

export ORACLE_BASE=/u01/oracle/
export ORACLE_HOME=/u01/oracle/oms12104/oms
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=EMREP

Your paths and SID will of course vary.   If  you don't want to spend too much time looking for those values 

SID should be easy to find 

and the first two values can be found by checking 
/etc/oragchomelist which is a file that should exist on every OMS with usually the first two lines being that of the BASE and HOME 

e.g. 

[oracle@ebscloud ~]$ cat /etc/oragchomelist
/u01/oracle/oms/oms
/u01/oracle/oms12104/oms

/u01/oracle/agent/core/12.1.0.4.0:/u01/oracle/agent/agent_inst
[oracle@ebscloud ~]$



Steps to check

1.  OMS repository database is available
2.  OMS Repository listener is available and you can connect to it.

The above steps are easy to check by using a SQLPLUS check from SYSMAN/@ if you have defined it in TNSNAMEs 

[oracle@ebscloud ~]$ tnsping EMREP

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 05-JAN-2015 11:54:16

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ebscloud)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = EMREP)))
OK (90 msec)
[oracle@ebscloud ~]$ sqlplus sysman/password@emrep

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 5 11:54:31 2015

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


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

SQL>

so that is all OK.

OK so now we can see the database.

next step is to start the OMS.

[oracle@ebscloud ~]$ emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Already Started
Oracle Management Server is Up
[oracle@ebscloud ~]$

This can take a few minutes. 

note that this can cause a lot of database throughput so be aware that "Management Server is Up"  may not be entirely correct, but we will show it off as the management server will not start until some database work is complete. 

How do we check it is started OK ? 

Simple Method : 

[oracle@ebscloud ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Down

So we realize that starting cloud control can take a LONG time 

top - 12:11:48 up 31 min,  2 users,  load average: 3.50, 2.52, 2.20
Tasks: 456 total,   2 running, 454 sleeping,   0 stopped,   0 zombie
Cpu(s): 23.0%us,  2.6%sy,  0.0%ni, 70.2%id,  4.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  14387520k total,  8291548k used,  6095972k free,    59120k buffers
Swap:        0k total,        0k used,        0k free,  5566052k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
10373 oracle    20   0 7133m 888m  54m S 152.4  6.3   5:34.56 java
 2858 oracle    20   0 4509m 817m 773m S 43.4  5.8   2:40.02 oracle
 1999 oracle    -2   0 4461m  16m  14m S  4.0  0.1   0:29.90 oracle


If we look at top or iotop we can see lots of Java or DBW on the database server.  Wait till it all dies off and then run the status command again.  This can take up to 25-30 minutes on slow OMS machines 


but finally 

[oracle@ebscloud ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up
[oracle@ebscloud ~]$


so that's not very detailed so let's ask for the details  ( note you need the sysman password for this ) .  If you don't have the sysman password you shouldn't really be starting and stopping the OMS .....  but it might happen.  However to get the detail status you need it. 


if we add the detail and sysman_pwd in

[oracle@ebscloud ~]$ emctl status oms -details -sysman_pwd
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Console Server Host        : ebscloud.bsx.com
HTTP Console Port          : 7790
HTTPS Console Port         : 7803
HTTP Upload Port           : 4890
HTTPS Upload Port          : 4904
EM Instance Home           : /u01/oracle/gc_inst1/em/EMGC_OMS1
OMS Log Directory Location : /u01/oracle/gc_inst1/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://ebscloud.bsx.com:7803/em
Upload URL: https://ebscloud.bsx.com:4904/empbs/upload

WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : ebscloud.bsx.com
Admin Server HTTPS Port: 7103
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: ebscloud.bsx.com
WebTier is Up
Oracle Management Server is Up

BI Publisher is not configured to run on this host.
[oracle@ebscloud ~]$


Note that the Console URL should be recorded as that is what you want to put into the browser address bar and that will be the title of the next post. 

so from above we record  https://ebscloud.bsx.com:7803/em


How do we stop the OMS

emctl stop oms should work just fine.


Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
[oracle@ebscloud ~]$



No comments: