EMCC: Redirection http->https

To have the unsecured login page redirected to the secured https page, proceed as follow:

#1 On each OMS server, navigate into the htdocs directory, for example:

cd /u01/app/oracle/gc/gc_inst/user_projects/domains/GCDomain/config/fmwconfig/components/OHS/instances/ohs*/htdocs

 

#2 Create there the redirection page welcome-index.html (12c) or index.html (13c) with the following content:

<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="1; url=https://xxxxx.xxx.com/em">
</head>
<body>
<center>
<img src="/images/company.png"/>
<p>
<p><font size="14"><font color="##FF0000"><font face="Calibri"><i>Redirecting</i></font></font></font></p>
</center>
</body>
</html>

Optionally include an image as above.

Advertisements

AWRW: AWR Datawarehouse cleanup

I have one AWR Warehouse that has been running for a few years now. Time for a cleanup after EMCC 13.3 upgrade.

The EMCC UI is confusing as it show the view of the AWR Warehouse instance, instead of filtering whatever database information relevant for the current EMCC instance we are looking at, remember that the AWR Warehouse can be connected to many EMCC.

Since the UI does not offer all capabilities to troubleshoot, Here are a few tips:

#1 Use the emcli from all EMCC clients.

To view all source db:

$ORACLE_HOME/bin/emcli awrwh_list_src_dbs

To delete a source db:

$ORACLE_HOME/bin/emcli awrwh_remove_src_db -target_name=<dbname> -target_type=<rac_database or database_instance>'

Unfortunately the command above will hit the EMCC metadata, when, when a target is deleted in EMCC, the snapshots located in the AWR Warehouse are not deleted. So this command has many chance to fail with an error target not found, when the database is long gone.

Solution is to cleanup the AWR Warehouse database directly.

Connect with dbsmp.

To view all source databases, check the table CAW_SRC_DBS. Possibly, identify the em_id that corresponds to obsolete EMCC instances.

To delete a repository (remember that the AWR Warehouse can connect AWRs from many EMCC):

SQL> execute mgmt_caw_load.cleanup(<the emid>);

To mark a database as deleted:

SQL> execute mgmt_caw_load.mark_db_deleted<the em id>, '<db_name>','rac_database' ir 'oracle_database');

Do not forget to commit.

WLS: Entropy setup on OL

I was getting some hanging, clearly related to entropy while trying to upgrade an EMCC instance from 13.2 to 13.3.

This note is about to check and increase the entropy on a OL6.9 compute.

 

#1 Verify the entropy values

cat /proc/sys/kernel/random/entropy_avail

Recommended value should be higher than 1000

 

#2 Install rng

yum install rng-utils

 

#3 Start the rng process

# rngd -r /dev/urandom -o /dev/random -t 1

This command can be moved on /etc/rc.local

 

#4 Verify that the entropy is increased:

cat /proc/sys/kernel/random/entropy_avail

 

 

OCI(-c): Deploying EMCC 13cR2 and 13cR3 on DBcs 12.2 and 18.2 Extreme Performance

This note is about deploying EMCC 13cR2 or 13cR3 on either OCI or OCI Classic with the database running on DBcs 12.2 or 18.2 Extreme Edition

Due to some improper validation being executed, the solution for this topology is first to install the software, apply a quickfix to support EE, then configure the OMS.

 

Database setup

#1 Provision the DBcs or dbsystem

Provision an emccdb DBcs with an emcc PDB running 12.2 or 18.2 with 2 OCPU/15GB, 100GB data.

 

#2 Setup the access rules to allow the compute hosting the OMS to connect to the database.

On OCI-c, create an IP security list for example emccdb_listener_client 10.29.0.0/16 (when 10.29.0.0 would be the private subnet)

On OCI-c, create a security rules to allow dblister access between the IP security list emccdb_listener_client and the security_list emccdb/db01/ora_db

On OCI, create an ingress rules to allow all traffic from 10.0.0.0/23

 

#3 Setup the PDB

Setup the PDB with the following parameters

ALTER SESSION SET CONTAINER=emcc;
ALTER SYSTEM SET "_allow_insert_with_update_check"=TRUE SCOPE=BOTH;
ALTER SYSTEM SET session_cached_cursors=500 SCOPE=SPFILE; 
ALTER PROFILE DEFAULT LIMIT password_verify_function null;
SHUTDOWN IMMEDIATE;
STARTUP;

OMS setup

#1 OMS provisioning

Provision a compute with 2 OCPUs, 15GB memory, and 100GB disk space

 

#2 Setup the oracle UNIX user

Create the oracle user. Use this note as a guideline.

Copy the private key to the oracle user to allow ssh directly to ssh.

 

#3 Increase system parameters

Set the following parameter

On Classic and OL6.9, in /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536

On OCI and OL75 in /etc/security/limits.d/30-nofile.conf
oracle soft nofile 1024
oracle hard nofile 65536

 

#4 Prepare the product home directories

mkdir -p /u01/app/oracle/product/gc133
mkdir -p /u01/app/oracle/product/emagent
mkdir -p /u01/app/oracle/product/library 
mkdir -p /u01/app/oracle/product/gc_bip/config 
mkdir -p /u01/app/oracle/product/gc_bip/cluster
mkdir -p /u01/app/oraInventory 
chown -R oracle:oinstall /u01/app/oracle
chown -R oracle:oinstall /u01/app/oraInventory

Note that if the purpose is to deploy EMCC in HA mode, at this point, a shared directory may have to be setup for the library and BI Publisher

 

#5 Create the file /etc/oraInst.loc

Create the file /etc/oraInst.loc with the following content, owned by oracle:oinstall

inventory_loc=/u01/app/oraInventory
inst_group=oinstall

 

#6 Download em13cR3

Download the emcc 13cR3 software. Use this note as a guideline.

 

#7 Install the system prereq

Classic OL6.9:
yum install make binutils gcc libaio glibc-common libstdc++ libXtst sysstat glibc-devel.i686 glibc-devel glibc

Classic OL7.4:
sudo yum install make binutils gcc libaio glibc-common libstdc++ sysstat glibc-devel.i686 glibc-devel libXtst xdpyinfo wget xorg-x11-xauth

OCI OL7.5: sudo yum install gcc glibc-devel glibc-devel.i686

 

#8 Generate the response file to prepare for a silent install

ssh -X oracle@<opchost>
chmod +x em13300_linux64.bin
./em13300_linux64.bin -getResponseFileTemplates -outputLoc /home/oracle

 

#9 Configure the installation file

Edit the file software_only.rsp

 

#10 Run the installer in silent mode

./em13300_linux64.bin -silent -responseFile /home/oracle/software_only.rsp

 

#11 Change the prereq checking files

Edit the file /u01/app/oracle/product/gcXXX/install/requisites/properties/stopPrereqOnDemand.properties and make sure that the following property is set to TRUE

id_check_db_is_enterprise_edition=TRUE

If install in interactive, the same would be achieved by downloading the following file for EMCC 13.2: p25679612_132000_Generic.zip

 

#12 Run the configuration assistant

/u01/app/oracle/product/gc132/sysman/install/ConfigureGC.sh

 

At this point, if getting any issue with the DISPLAY settings, check out this note.

 

EM13c: agent install via rpm

Here is a script to install a the emcc agent automatically, via rpm.

As a prerequisite, the rpm must has been built and could be pulled from somewhere via http.

As root:

rm oracle-agt-13.2.0.0.0-1.0.x86_64.rpm*

wget http://where_do_i_can_pull_the_rpm/oracle-agt-13.2.0.0.0-1.0.x86_64.rpm

rpm -e oracle-agt-13.2.0.0.0-1.0.x86_64

rm -fr /u01/app/emagent/*
rm -fr /u01/app/emagent/agent_inst/*

rpm -ivh oracle-agt-13.2.0.0.0-1.0.x86_64.rpm --relocate /usr/lib/oracle/agent=/u01/app/emagent

echo "
OMS_HOST=<my_oms_host>
OMS_PORT=443
AGENT_REGISTRATION_PASSWORD=<welcome1>
#-------------------------------------------------------------------------------
AGENT_USERNAME=emagent
AGENT_GROUP=dba
AGENT_PORT=3879
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=<myhost_where_the_agent_is_getting_deployed>
AGENT_INSTANCE_HOME=/01/app/emagent/agent_inst" >/u01/app/emagent/agent.properties

/etc/init.d/oracle-agt RESPONSE_FILE=/u01/app/emagent/agent.properties

/u01/app/emagent/agent_13.2.0.0.0/root.sh

rsync from EMCC standby OMS nodes

From the OMS secondary 1:

export LVMSOURCE=<IP>

echo "Synching /u01"
rsync -vat --stats --checksum --delete --delete-excluded --exclude '*.log' --exclude '*.trc' --log-file=$HOME/admin/rsync.log --progress ${LVMSOURCE}:/u01/ /u01

echo "Synching /library"
rsync -vat --stats --delete --checksum --delete ${LVMSOURCE}:/library/ /library

echo "Synching /bip"
rsync -vat --stats --delete --checksum --delete ${LVMSOURCE}:/bip/ /bip

 

From the OMS secondary 2:

export LVMSOURCE=<IP>

echo "Synching /u01"
rsync -vat --stats --checksum --delete --delete-excluded --exclude '*.log' --exclude '*.trc' --log-file=$HOME/admin/rsync.log --progress ${LVMSOURCE}:/u01/ /u01