Introduction

This post focuses on the creation, configuration and tuning of an initial SOA Suite 12.2.1.1.0 Domain.

The WebLogic Server is a necessary requirement, and must already be installed. For instruction how to install the WebLogic Server 12.2.1.1 please refer to my previous post:  WebLogic Server 12.2.1.1.0: Installation on the Linux OS

The following tasks will be implemented:

  • Preparing the Operating System for the installation of the WebLogic Server 12.2.1.1, Installation JDK 1.8 and the WebLogic Server 12.2.1.1: WebLogic Server 12.2.1.1.0: Installation on the Linux OS
  • Creating of database schemas
  • Creating a SOA Suite Domain
  • Post-Installation Tasks:
    • Configuring of components
    • Creating of Start & Stop scripts for the automatic start/stop of components
  • SOA Suite Domain Tuning and Troubleshooting

The SOA/OSB Domain will be installed without BAM (different Domain) because of:

–    Oracle Best Practices and our experience

–    In order to stabilize the system (BAM is unstable at the moment)

The Domain will be created on two servers (OS OEL 6.7):

  • host01.example.com
  • host02.example.com

We will configure four clusters:

  • OWSM Cluster (Oracle Web Services Management)
  • ESS Cluster (Enterprise Scheduler Services)
  • SOA Cluster
  • OSB Cluster (Oracle Service Bus)

Installation SOA / OSB 12.2.1.1

Note: All tasks described in this chapter must be running on both servers: host01 and host02

Prepare Software

Download and extract the following software from the Oracle Software Delivery Cloud: https://edelivery.oracle.com:

–    SOA Suite 12.2.1.1.0

–    OSB 12.2.1.1.0

Installation SOA Suite 12.2.1.1 (as OS User oracle)

Note: All tasks described in this chapter must be running on both servers: host01 and host02

Navigate to software directory, extract the SOA software, set the environment and start the installation:

[oracle@host01 Oracle_Home]$ cd /u01/app/oracle/software/SOA_Suite/

[oracle@host01 SOA_Suite]$ unzip V138472-01.zip

[oracle@host01 SOA_Suite]$ export JAVA_HOME=/u01/app/oracle/product/JAVA/jdk

[oracle@host01 SOA_Suite]$ export PATH=$JAVA_HOME/bin:$PATH

[oracle@soa01 SOA_Suite]$ java -jar ./fmw_12.2.1.1.0_soa.jar

On the Welcome page click „Next“:

Enable „Skip Auto Updates“:

Set the Oracle Home to /u01/app/oracle/product/FMW/Oracle_Home:

Activate „Fusion Middleware Infrastructure“:

Activate „SOA Suite“:

Prerequisite Checks:

Verify the Summary of the Installation and click the button „Install“:

Verify installation“¦Next:

Check installed components and click „Finisch“:

The Installation Oracle SOA Suite 12.2.1.1.0 is now completed

Installation Oracle Service Bus 12.2.1.1 (as OS User oracle)

Note: All tasks described in this chapter must be running on both servers: host01 and host02

[oracle@host01 SOA_Suite]$ cd /u01/app/oracle/software/OSB/

[oracle@host01 OSB]$ unzip V138477-01.zip

[oracle@host01 OSB]$ export JAVA_HOME=/u01/app/oracle/product/JAVA/jdk

[oracle@host01 OSB]$ export PATH=$JAVA_HOME/bin:$PATH

[oracle@host01 OSB]$ java -jar ./fmw_12.2.1.1.0_osb.jar

On the Welcome page click „Next“:

Enable „Skip Auto Updates“:

Set the Oracle Home to /u01/app/oracle/product/FMW/Oracle_Home:

Activate the button „Service Bus“:

Prerequisite Checks:

Verify the Summary of the Installation and click the button „Install“:

Verify installation“¦Next:

Check installed components and click „Finish“:

The Installation Oracle Servce Bus 12.2.1.1.0 is now completed

Create Database Schemas (as OS User oracle)

Note: The creating of the database schemas must be running only once on the first server: host01

The database must be already created and prepared for the WebLogic Server Domain. For more information about the preparing the database please refer to the documentation:

http://docs.oracle.com/html/E73100_01/toc.htm#GUID-85F0EAF9-3ACE-421D-BD72-F1A8E6B91116

Login to the server as user oracle, navigate to oracle_common directory, and start the Repository Creation Utility (RCU):

[oracle@host01 oracle]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/bin

[oracle@host01 bin]$ ./rcu

Step 1: the Welcome page: click „Next“:

Step 2: Create Repository: For the new SOA Installation choose „Create Repository“ and „System Load and Production Load“:

Step 3: Database Connection Details: On this Page provide the database connection information:

Database Type: Oracle Database

Host Name (database host): host02.example.com

Port (Database Listener Port: 1521)

Service Name (Service Name of the repository database): orcl

Username & Password: Administration Account of the SOA Database: sys/xxx

Role (Database Admin Role: SYSDBA or SYSOPER): SYSDBA

„¦ „Next“:

The Installer checks the database connectivity:

Step 4: Select Components and the Prefix for database schemas:

Following are mandatory selected components:

  • Common Infrastructure Services (Mandatory selected components cannot be deselected)

Additionally I selected „Oracle Platform Security Services“, „SOA Infrastructure“ and „Oracle Enterprise Scheduler“.

The installer will check database prerequisites:

Step 5: Set the password for all database schemas:

Step 6: Choose the size of the SOA Repository (small, medium or high): Medium

Step 7: Map Tablespaces: On this page you can change the tablespace settings:

In the next step the installer asks for the creating tablespaces for the soa repository:

Tablespaces will be created:

Step 8: Summary: check the details and click „Create“:

Check detail and click „Close“:

The SOA Repository Creation is now completed

Create the SOA / OSB Domain (as OS User oracle)

Note: The creating of the WebLogic Server Domain must be running only once on the first server: host01.

Navigate to the oracle_common directory and start the Configuration Wizard:

[oracle@host01 bin]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin

[oracle@host01 bin]$ ./config.sh

Choose „Create a new Domain“ and set the „Domain Location“ to /u01/app/oracle/user_projects/domains/soa_domain:

On the next page you can add several WebLogic Server and SOA „“ OSB Templates.

Select „SOA Suite“, „Oracle Service Bus“, „Oracle API Manager“, „Oracle Enterprise Scheduler Service Basic“, „Oracle User Messaging Service Basic“ and „Oracle OPSS REST Service Application“ (additional prerequisite components Coherence and JRF will be selected automatically).

For more information about templates please refer to oracle documentation:

https://docs.oracle.com/middleware/1221/wls/WLDTR/fmw_templates.htm#WLDTR227

Specify an „Application Location“: /u01/app/oracle/user_projects/applications/soa_domain:

Set the Name and Password for the WebLogic Administrator:

Choose „Domain Mode“: Production and check the JDK location:

Configure the database details:

Specify the correct schema prefix: SOATST_STB and the information what were specified when you previously ran RCU (Chapter „Create Database Schemas“).

Then click on the Button „Get RCU Configuration“:

Installer checks database connectivity“¦ „Next“:

Let default values and click „Next“:

The installer checks the database connections:

We don’t configure the Key Store. Let default values and click „Next“

Activate check boxes for Administration Server, Node Manager and Topology for the advanced configuration:

On the next page configure the Administration Server:

Name: AdminServer

Listen Address: 192.168.75.32 (IP Address Server host01.example.com)

Listen Port: 7001

Configure the Node Manager:

Set Node Manager Type to „Per Domain Default Location“ „“ default

Enter Node Manager Credentials:

Username: nodemanager

On the page „Managed Servers“ add 8 Managed Servers with following settings:

Managed server Listen Address Port Server Group
soa_server1 192.168.75.32 7003 SOA-MGD- SVRS-ONLY
osb_server1 192.168.75.32 7004 OSB-MGD-SVRS-ONLY
ess_server1 192.168.75.32 7005 ESS-MGD-SVRS
owsm_server1 192.168.75.32 7006 JRF-MAN-SVR, WSM-CACHE-SVR, WSMPM-MAN-SVR
soa_server2 192.168.75.33 7003 SOA-MGD- SVRS-ONLY
osb_server2 192.168.75.33 7004 OSB-MGD-SVRS-ONLY
ess_server2 192.168.75.33 7005 ESS-MGD-SVRS
owsm_server2 192.168.75.33 7006 JRF-MAN-SVR, WSM-CACHE-SVR, WSMPM-MAN-SVR

In this example we will create eight managed servers for soa, osb, scheduler and webservices.

We will place the four managed server (soa_server1, osb_server1, ess_server1 and owsm_server1) on the server host01.example.com (IP Address: 192.168.75.32) and the four managed server (soa_server2, osb_server2, ess_server2 and owsm_server2) on the host02.example.com (IP Address: 192.168.75.32).

Server groups in the Middleware 12c allow to target and execute of middleware components (such soa or osb) on managed servers.

For example the server group SOA-MGD-sRVC-ONLY is responsible to execute the SOA content.

Server groups JRF-MAN-SVR and WSM-CACHE-SVR / WSMPM-MAN-SRV ensure that Oracle JRF and Oracle Web Services Manager (OWSM) services target Managed Servers you are creating.

For more info about Server Groups please refer to: https://docs.oracle.com/middleware/1221/core/INFIN/GUID-CA80A6E9-8903-4E19-81D7-A3647A11D0A6.htm#INFIN332

Create 4 Clusters: soa_cluster1, osb_cluster1, ess_cluster1 and owsm_cluster1.

Leave all another fields default „¦ „Next“:

Add Managed Servers to clusters:

ess_cluster1: ess_server1, ess_server2

osb_cluster1: osb_server1, osb_server2

owsm_cluster1: owsm_server1, owsm_server2

soa_cluster1: soa_server1, soa_server2

Specify the Coherence Cluster Listen Port:

Create two Unix Machines: one for the host host01.example.com and the second UNIX Machine for the host02.example.com):

Name Listen Address Port
host01.example.com 192.168.75.32 5556
host02.example.com 192.168.75.33 5556

Add Managed Servers to machines:

host01.example.com: AdminServer, ess_server1, osb_server1, owsm_server1, soa_server1

host01.example.com: ess_server2, osb_server2, owsm_server2, soa_server3

In this example we don’t configure „Virtual Targets“:

We don’t create „Partitions“:

Check configuration summary and press the button „Create“:

The Creation of initial Domain is now completed“¦ „Next“

The SOA Domain is now created, „¦“Finish“:

Post-Installation Tasks

Disabling the Derby Database

Note: All tasks described in this chapter must be running on both servers: host01.example.com and host02.example.com

[oracle@host01]$ cd /u01/app/oracle/product/FMW/Oracle_Home/wlserver/common/derby/lib/

[oracle@host01 lib]$ mv derby.jar disable_derby.jar

Start the AdminServer via script

Enter the values for the Administration User (weblogic) and passwort when prompted:

[oracle@host01 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@soa01 bin]$ ./startWebLogic.sh

Enter username to boot WebLogic server:weblogic

Enter password to boot WebLogic server:xxx

Shutdown the AdminServer via script:

[oracle@host01 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@soa01 bin]$ ./stopWebLogic.sh

Create the file boot.properties on the server host01

[oracle@host01]$ cd /u01/app/oracle/user_projects/domains/soa_domain/servers/AdminServer

[oracle@host01 AdminServer]$ mkdir security

[oracle@host01 AdminServer]$ cd security/

[oracle@host01 security]$ echo -e "username=weblogic\npassword=welcome1" > boot.properties

[oracle@host01 security]$ cat boot.properties

username=weblogic
password=welcome1

Copying the Domain configuration from the server host01 to the host02

Save the Domain configuration on the server host01:

[oracle@host01 oracle]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin

[oracle@host01 bin]$ ./pack.sh -domain=/u01/app/oracle/user_projects/domains/soa_domain -template=/home/oracle/soa_domain.jar -template_name=soa_domain

Output:

<< read domain from "/u01/app/oracle/user_projects/domains/soa_domain" >> succeed: read domain from "/u01/app/oracle/user_projects/domains/soa_domain"

<< write template to "/home/oracle/soa_domain.jar" .............................. >> succeed: write template to "/home/oracle/soa_domain.jar"

<< close template >> succeed: close template

Copy the file host01:/home/oracle/soa_domain.jar to the server host02

[oracle@host01 ~]$ scp /home/oracle/soa_domain.jar host02.example.com:/home/oracle

Extract the domain configuration on the server host02.example.com:

[oracle@host02 oracle]$ mkdir -p /u01/app/oracle/user_projects/domains

[oracle@host02 oracle]$ mkdir -p /u01/app/oracle/user_projects/applications

[oracle@host02 oracle]$ cd /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin

[oracle@host02 bin]$ ./unpack.sh -user_name=weblogic -password=welcome1 -domain=/u01/app/oracle/user_projects/domains/soa_domain -overwrite_domain=true -template=/home/oracle/soa_domain.jar -log_priority=DEBUG -log=/tmp/unpack.log -app_dir=/u01/app/oracle/user_projects/applications

Output:

<< read template from "/home/oracle/soa_domain.jar" >> succeed: read template from "/home/oracle/soa_domain.jar"

<< set config option AppDir to "/u01/app/oracle/user_projects/applications" >> succeed: set config option AppDir to "/u01/app/oracle/user_projects/applications"

<< find User "weblogic" as u1_CREATE_IF_NOT_EXIST >> succeed: find User "weblogic" as u1_CREATE_IF_NOT_EXIST

<< set u1_CREATE_IF_NOT_EXIST attribute Password to "********" >> succeed: set u1_CREATE_IF_NOT_EXIST attribute Password to "********"

<< set u1_CREATE_IF_NOT_EXIST attribute IsDefaultAdmin to "true" >> succeed: set u1_CREATE_IF_NOT_EXIST attribute IsDefaultAdmin to "true"

<< write Domain to "/u01/app/oracle/user_projects/domains/soa_domain" ............................................................................................... >> succeed: write Domain to "/u01/app/oracle/user_projects/domains/soa_domain"

<< close template >> succeed: close template

NodeManager configuration (as OS User oracle)

Server host1:

Edit file nodemanager.properties:

[oracle@host01 ~]$ cd /u01/app/oracle/user_projects/domains/soa_domain/nodemanager

[oracle@host01 nodemanager]$ vi nodemanager.properties

Change parameter:

Old:

CrashRecoveryEnabled=false

New:

CrashRecoveryEnabled=true

Start NodeManager:

[oracle@host01 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host01 bin]$ nohup ./startNodeManager.sh &

Server host02:

Edit file nodemanager.properties:

[oracle@host02 ~]$ cd /u01/app/oracle/user_projects/domains/soa_domain/nodemanager

[oracle@host02 nodemanager]$ vi nodemanager.properties

Change parameter:

Old:

ListenAddress=192.168.75.32

CrashRecoveryEnabled=false

New:

ListenAddress=192.168.75.33

CrashRecoveryEnabled=true

Start NodeManager:

[oracle@host02 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host02 bin]$ nohup ./startNodeManager.sh &

Start AdminServer via NodeManager and WLST on the Server host01 (as OS User oracle)

Start wlst:

[oracle@host01 oracle]$ /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin/wlst.sh

Connect to NodeManager:

wlst> nmConnect('nodemanager','welcome1', '192.168.75.32','5556','soa_domain','/u01/app/oracle/user_projects/domains/soa_domain')

Start AdminServer:

wls:/nm/soa_proddomain> nmStart('AdminServer')

Output:

Starting server AdminServer ...

Successfully started server AdminServer ...

Execute nmEnroll commando on the second server: host02.example.com (as OS User oracle)

Start wlst:

[oracle@host02]$ /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin/wlst.sh

Connect to AdminServer (AdminServer must be running):

wls:/offline> connect('weblogic','welcome1','t3://192.168.75.32:7001')

Execute nmEnroll commando:

wls:/soa_domain/serverConfig/> nmEnroll('/u01/app/oracle/user_projects/domains/soa_domain','/u01/app/oracle/user_projects/domains/soa_domain/nodemanager')

Output.

Enrolling this machine with the domain directory at /u01/app/oracle/user_projects/domains/soa_domain ...

Successfully enrolled this machine with the domain directory at /u01/app/oracle/user_projects/domains/soa_domain.

Restart the NodeManager:

[oracle@host02 bin]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host02 bin]$ ./stopNodeManager.sh

[oracle@host02 bin]$ nohup ./startNodeManager.sh &

Start all Managed Servers via AdminConsole

Open the Browser and go to http://192.168.75.32:7001/console

Starting all Managed Servers via WebLogic Server Admin Console:

All Managed Servers are running:

Get your familiar with the new look of the Enterprise Manager:

Open the page: http://192.168.75.32:7001/em:

Prepare the WebLogic Server domain for the auto start

Server host01:

Create directory (as OS User oracle):

[oracle@host01 ~]$ mkdir /u01/app/oracle/scripts

[oracle@host01 ~]$ chmod 744 /u01/app/oracle/scripts

[oracle@host01 ~]$ cd /u01/app/oracle/scripts

Create scripts in the directory /u01/app/oracle/scripts (as OS User oracle)

Create script /home/oracle/scripts/fmw_nodemanager.sh:

#!/bin/bash
## fmw_nodemanager.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME WORK_DIR

case "$1" in
  start)
    nohup ${DOMAIN_HOME}/bin/startNodeManager.sh > ${WORK_DIR}/nodemanager.out 2>&1 &
    ;;
  stop)
    ${DOMAIN_HOME}/bin/stopNodeManager.sh
    ;;
  *)
    echo "usage: $0 [start|stop]"
    exit 2
    ;;
esac

Create script /u01/app/oracle/scripts/fmw_admin_and_ms.sh:

#!/bin/bash
## fmw_admin_and_ms.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
ORACLE_HOME=/u01/app/oracle/product/FMW/Oracle_Home
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME ORACLE_HOME WORK_DIR
WLST=${ORACLE_HOME}/oracle_common/common/bin/wlst.sh
export WLST

case "$1" in
  start)
    ${WLST} ${WORK_DIR}/start_admin.py
    ${WLST} ${WORK_DIR}/start_ms.py
    ;;
  start_admin)
    ${WLST} ${WORK_DIR}/start_admin.py
    ;;
  start_ms)
    ${WLST} ${WORK_DIR}/start_ms.py
    ;;
  stop)
    ${WLST} ${WORK_DIR}/stop_ms.py
    ${WLST} ${WORK_DIR}/stop_admin.py
    ;;
  stop_admin)
    ${WLST} ${WORK_DIR}/stop_admin.py
    ;;
  stop_ms)
    ${WLST} ${WORK_DIR}/stop_ms.py
    ;;
  *)
    echo "usage: $0 [start|start_admin|start_ms|stop|stop_admin|stop_ms]"
    exit 2
    ;;
esac

Create script /u01/app/oracle/scripts/start_admin.py:

nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmStart('AdminServer')

Create script /u01/app/oracle/scripts/stop_admin.py:

nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmKill('AdminServer')

Create script /u01/app/oracle/scripts/start_ms.py:

nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmStart('owsm_server1')
nmStart('osb_server1')
nmStart('soa_server1')
nmStart('ess_server1')

Create script /u01/oracle/scripts/stop_ms.py:

nmConnect('nodemanager','welcome1, '192.168.75.32','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmKill('ess_server1')
nmKill('soa_server1')
nmKill('osb_server1')
nmKill('owsm_server1')

Set permissions:

[oracle@host01 scripts]$ chmod -R 747 /u01/app/oracle/scripts

Integrate start-stop-scripts in Linux run-level (as OS user root)

Create script /etc/init.d/oracle (as root):

#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Set ORA_OWNER to the user id of the owner of the
export HOME=/u01/app/oracle/scripts
ORA_OWNER=oracle

if [ ! -f ${HOME}/fmw_nodemanager.sh \
  -o ! -f ${HOME}/fmw_admin_and_ms.sh     \
  -o ! -f ${HOME}/start_admin.py     \
  -o ! -f ${HOME}/stop_admin.py     \
  -o ! -f ${HOME}/start_ms.py     \
  -o ! -f ${HOME}/stop_ms.py ]
then
  echo "Oracle FMW startup: cannot start"
  exit
fi

case "$1" in
  'start')
    su $ORA_OWNER -c "$HOME/fmw_nodemanager.sh start"
    sleep 120
    su $ORA_OWNER -c "$HOME/fmw_admin_and_ms.sh start"
    ;;
  'stop')
    su $ORA_OWNER -c "${HOME}/fmw_admin_and_ms.sh stop"
    su $ORA_OWNER -c "${HOME}/fmw_nodemanager.sh stop"
    ;;
esac

Integrate the script /etc/init.d/oracle in run-levels (as root):

[root@host01 init.d]# chmod 700 /etc/init.d/oracle

[root@host01 init.d]# cd /etc/init.d

[root@host01 init.d]# chkconfig --add oracle

Check ( as root):

[root@host01 init.d]# chkconfig --list oracle

oracle 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Server soa02

Create directory (as OS User oracle):

[oracle@host02 ~]$ mkdir /u01/app/oracle/scripts

[oracle@host02 ~]$ chmod 744 /u01/app/oracle/scripts

[oracle@host02 ~]$ cd /u01/app/oracle/scripts

Create scripts in the directory /u01/app/oracle/scripts (as OS User oracle)

Create script /u01/app/oracle/scripts/fmw_nodemanager.sh:

#!/bin/bash
## fmw_nodemanager.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME WORK_DIR

case "$1" in
  start)
    nohup ${DOMAIN_HOME}/bin/startNodeManager.sh > ${WORK_DIR}/nodemanager.out 2>&1 &
    ;;
  stop)
    ${DOMAIN_HOME}/bin/stopNodeManager.sh
    ;;
  *)
    echo "usage: $0 [start|stop]"
    exit 2
    ;;
esac

Create script /u01/app/oracle/scripts/fmw_ms.sh:

#!/bin/bash
## fmw_ms.sh

DOMAIN_HOME=/u01/app/oracle/user_projects/domains/soa_domain
ORACLE_HOME=/u01/app/oracle/product/FMW/Oracle_Home
WORK_DIR=/u01/app/oracle/scripts
export DOMAIN_HOME ORACLE_HOME WORK_DIR
WLST=${ORACLE_HOME}/oracle_common/common/bin/wlst.sh
export WLST

case "$1" in
  start)
    ${WLST} ${WORK_DIR}/start_ms.py
    ;;
  stop)
    ${WLST} ${WORK_DIR}/stop_ms.py
    ;;
  *)
    echo "usage: $0 [start|stop]"
    exit 2
    ;;
esac

Create script /u01/app/oracle/scripts/start_ms.py:

nmConnect('nodemanager','welcome1, '192.168.75.33','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmStart('owsm_server2')
nmStart('osb_server2)
nmStart('soa_server2')
nmStart('ess_server2')

Create script /u01/app/oracle/scripts/stop_ms.py:

nmConnect('nodemanager','welcome1, '192.168.75.33','5556','base_domain','/u01/app/oracle/user_projects/domains/soa_domain')
nmKill('ess_server2')
nmKill('soa_server2')
nmKill('osb_server2')
nmKill('owsm_server2')

Set permissions:

[oracle@host02 scripts]$ chmod -R 747 /home/oracle/scripts

Integrate start-stop-scripts in Linux run-level (as OS user root)

Create script /etc/init.d/oracle (as root):

#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Set ORA_OWNER to the user id of the owner of the
export HOME=/u01/app/oracle/scripts
ORA_OWNER=oracle

if [ ! -f ${HOME}/fmw_nodemanager.sh \
  -o ! -f ${HOME}/fmw_ms.sh     \
  -o ! -f ${HOME}/start_ms.py     \
  -o ! -f ${HOME}/stop_ms.py ]
then
  echo "Oracle FMW startup: cannot start"
  exit
fi

case "$1" in
  'start')
    su $ORA_OWNER -c "$HOME/fmw_nodemanager.sh start"
    sleep 120
    su $ORA_OWNER -c "$HOME/fmw_ms.sh start"
    ;;
  'stop')
    su $ORA_OWNER -c "${HOME}/fmw_ms.sh stop"
    su $ORA_OWNER -c "${HOME}/fmw_nodemanager.sh stop"
    ;;
esac

Integrate the script /etc/init.d/oracle in run-levels (as root):

[root@host02 init.d]# chmod 700 /etc/init.d/oracle

[root@host02 init.d]# cd /etc/init.d

[root@host02 init.d]# chkconfig --add oracle

Check (as root):

[root@host02 init.d]# chkconfig --list oracle

oracle 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Tuning and Troubleshooting the SOA Domain

Tuning JVM (as OS User oracle)

We will customize the settings for the Java Heap size and for WebLogic Server Start parameters by the creating the File setUserOverrrides.sh.

We will tune the Java heap size for the Admin Server and for each Managed Server.

We will set some WebLogic Server start Parameter:

  • -Dweblogic.MaxMessageSize=300000000    # increase the MessageSize
  • -Dweblogic.threadpool.MinPoolSize=1024    # Tuning the WebLogic ThreadPool

For more information about the customizing of Java settings please refer to my article https://borysneselovskyi.wordpress.com/2016/07/24/how-to-customize-java-virtual-machine-settings-in-oracle-weblogic-server-12-on-os-linux-unix

Creating the File setUserOverrides.sh on both hosts: host01.example.com and host02.example.com:

[oracle@host01 ~]$ cd /u01/app/oracle/user_projects/domains/soa_domain/bin

[oracle@host01 bin]$ cat setUserOverrides.sh

Content of setUserOverrides.sh:

#!/bin/bash
echo "Setting from UserOverrides.sh"

# global settinga (for all servers)s
export JAVA_OPTIONS="$JAVA_OPTIONS -Dweblogic.MaxMessageSize=300000000 -Dweblogic.threadpool.MinPoolSize=1024"

# customer settings for each server
if [ "${SERVER_NAME}" = "AdminServer" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms512m -Xmx1g"
fi

if [ "${SERVER_NAME}" = "soa_server1" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms1g -Xmx2g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=1g"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
  # Coherence Settings
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localhost=192.168.75.32"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.wka1=192.168.75.32 -Dtangosol.coherence.wka2=192.168.75.33"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport=8090"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport.adjust=true"
fi

if [ "${SERVER_NAME}" = "soa_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms1g -Xmx2g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=1g"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
  # Coherence Settings
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localhost=192.168.75.33"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.wka1=192.168.75.33 -Dtangosol.coherence.wka2=192.168.75.32"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport=8090"
  export JAVA_OPTIONS="${JAVA_OPTIONS} -Dtangosol.coherence.localport.adjust=true"
fi

if [ "${SERVER_NAME}" = "osb_server1" -o "${SERVER_NAME}" = "osb_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms1g -Xmx2g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=1g"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
fi

if [ "${SERVER_NAME}" = "owsm_server1" -o "${SERVER_NAME}" = "owsm_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms512m -Xmx1g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=512m"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
fi

if [ "${SERVER_NAME}" = "ess_server1" -o "${SERVER_NAME}" = "ess_server2" ]
then
  echo "Customizing USER_MEM_ARGS for SERVER_NAME ${SERVER_NAME}"
  export USER_MEM_ARGS="-Xms512m -Xmx1g -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:NewSize=512m"
  echo "Customizing JAVA_OPTIONS for SERVER_NAME ${SERVER_NAME}"
  export JAVA_OPTIONS="$JAVA_OPTIONS -Djava.awt.headless=true"
fi

echo "End setting from UserOverrides.sh"

Tuning Fusion Middleware Control (as OS User oracle)

Reference: MOS Note „How to Enable Discovery Cache To Avoid Long Delay During Login To Fusion Middleware Control (Doc ID 1423893.1)“

On the server host01 login to wlst with weblogic user and connect to domain environment:

[oracle@host01 ~]$ /u01/app/oracle/product/FMW/Oracle_Home/oracle_common/common/bin/wlst.sh

Connect to the AdminServer:

wls:/offline> connect('weblogic','welcome1','t3://192.168.75.32:7001')

Change location to domain custom tree

wls:/base_domain/serverConfig/> domainCustom()

Set variables:

wls:/soa_domain/domainCustom/> myMBean=ObjectName('emoms.props:Location=AdminServer,name=emoms.properties,type=Properties,Application=em')

wls:/soa_domain/domainCustom/> types=['java.lang.String', 'java.lang.String']

wls:/soa_domain/domainCustom/> type=['java.lang.String']

Set property oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS=true:

wls:/soa_domain/domainCustom/> params=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS', 'true']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'setProperty',params,types)

Set property oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE=7200000:

wls:/soa_domain/domainCustom/> params=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE','7200000']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'setProperty',params,types)

Set property oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME=10000:

wls:/soa_domain/domainCustom/> params=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME','10000']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'setProperty',params,types)

Invoke getProperty operations to display and confirm parameter values (Values returned by wlst are in red):

Display changes added:

wls:/soa_domain/domainCustom/> param=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'getProperty',param,type)

'true'

wls:/soa_domain/domainCustom/> param=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'getProperty',param,type)

'7200000'

wls:/soa_domain/domainCustom/> param=['oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME']

wls:/soa_domain/domainCustom/> mbs.invoke(myMBean,'getProperty',param,type)

'10000'

Tuning the WebLogic Server Start: Avoiding JVM Delays Caused by Random Number Generation

Change the JVM random generation from /dev/random to /dev/urandom. For more Information refer to the Oracle Documentation:

https://docs.oracle.com/cd/E13209_01/wlcp/wlss30/configwlss/jvmrand.html

Go to the file java.security and change the parameter securerandom.source:

Server host01 (as OS User oracle):

[oracle@host01 ~]$ vi /u01/app/oracle/product/JAVA/jdk/jre/lib/security/java.security

Old value:

securerandom.source=file:/dev/random

Change to:

securerandom.source=file:/dev/urandom

Repeat the step on the Server host02.example.com.

Restart the Admin and all Managed Servers.

Configure the SOA Purging via Enterprise Manager Fusion Middleware Control

Go to Fusion Middleware Control

http://10.10.240.123:7001/em

Navigate to SOA -> soa-infra:

Then to SOA Infrastructure -> SOA Administration -> Auto Purge:

The Purge Configuration Page appears. You can set the scheduling options, Type of Purge (single or parallel) and another settings:

enjoy 🙂

Alle Beiträge von Neselovskyi, Borys

Borys Neselovskyi is a leading Infrastructure Architect at OPITZ CONSULTING - a German Oracle Platinum Partner. Since Februar 2019 he is an Oracle ACE. Borys field of work includes the conceptual design and implementation of infrastructure solutions based on Oracle Database/Middleware/Engineered Systems/Virtualization. He is also a frequent speaker at conferences (with live demos about Oracle software, sessions, panels, etc.).

11 Kommentare

  1. Pingback: SOA & BPM Community Newsletter September 2016 | SOA Community Blog

  2. Pingback: SOA Suite 12.2.1.1.0: Create, configure and tune a SOA/OSB Domain by Neselovskyi, Borys | SOA Community Blog

  3. Pingback: SOA Suite 12.2.1.1.0: Create, configure and tune a SOA/OSB Domain by Borys Neselovskyi - GIN Personal Web Site

    • Thanks for your response. In the blog entry I described the basic installation/configuration.
      The topics like performance / security and high availability are very extensive. Maybe I’ll write about it later

  4. Ahmed Hassan Reply

    Great topic
    now soa got two links one for each machine right ?
    if i want to make it one url i must use load blander !

Schreibe einen Kommentar