Installing the Oracle OSB on Red Hat 6

Peter Lorenzen
05/03-2013

I have a new and improved post about installing OSB 11.1.1.7

Here is my experiences with installing OSB 11.1.1.6 on Red Hat 6 (64-bit) using Java 7.

By the way you might also be interested in my post about Silent installation of the OSB on Red Hat 6.

First have a look at the documentation:
Oracle Fusion Middleware Download, Installation, and Configuration ReadMe
Oracle Fusion Middleware Installation Planning Guide
Oracle Fusion Middleware Installation Guide for Oracle Service Bus

Overview

Download the software

Please notice

  • Before using the direkt download links to http://download.oracle.com you need to login in to the site and accept a License Agreement.
  • The RCU only exists as a 32-bit download

Prepare the OS

I am using Red Hat 6 64-bit. Check the “System Requirements for UNIX Operating Systems”.
Also check “Special Startup Requirements for Linux x86 or Linux x86-64 Operating Systems” in the same document.

This should install the needed packages:

yum install binutils-2*.x86_64 -y
yum install compat-libcap1-1* -y
yum install compat-libstdc++-33*.i686 -y
yum install compat-libstdc++-33*.x86_64 -y
yum install gcc-4*.x86_64 -y
yum install gcc-c++-4*.x86_64 -y
yum install glibc-2*.x86_64 -y
yum install glibc-2*.i686 -y
yum install glibc-devel-2*.i686 -y
yum install libaio-0.*.x86_64 -y
yum install libaio-devel-0.*.x86_64 -y
yum install libgcc-4.*.x86_64 -y
yum install libstdc++-4.*.i686 -y
yum install libstdc++-4.*.x86_64 -y
yum install libstdc++-devel-4.*.x86_64 -y
yum install libXext.i686 -y
yum install libXtst.i686 -y
yum install sysstat-9.*.x86_64 -y
yum install redhat-lsb-4.*.x86_64 -y

Change the open file limits in /etc/security/limits.conf

sed -i '/.*End of file/d' /etc/security/limits.conf
echo "* soft nofile 16384" >> /etc/security/limits.conf
echo "* hard nofile 16384" >> /etc/security/limits.conf
echo "# End of file"  >> /etc/security/limits.conf
cat /etc/security/limits.conf

Change the kernel parameters that need changing. Often the default values are OK.
Normally I only change/add these two and this is really only needed if you use Coherence.

echo "net.core.rmem_max=4192608" >> /etc/sysctl.conf
echo "net.core.wmem_max=4192608" >> /etc/sysctl.conf
/sbin/sysctl -p

Create user, group and directories.

groupadd oinstall
useradd -g oinstall -G oinstall oracle
passwd oracle

mkdir -p /u01/app/oracle/product
mkdir -p /u01/tmp

chown -R oracle:oinstall /u01
chmod -R 750 /u01

Enabling Unicode Support in the .bash_profile for the oracle user.

export LANG="en_US.UTF-8"

Install Java

Unzip and untar the downloaded file:

gunzip jdk-7u15-linux-x64.tar.gz
tar xvf jdk-7u15-linux-x64.tar
mv jdk1.7.0_15 /u01/app/oracle/product/.

After I install Java I always create a softlink to the installation directory and reference it everywhere. This makes it is easier later when you have to upgrade.

ln -s /u01/app/oracle/product/jdk1.7.0_15 /u01/app/oracle/product/java_current

I could not get the WebLogic Installer to work with Java 7. The Installer start without any problems but in some of the screens you cannot select options with the mouse or input text. I have reproduced this with Oracle Linux 6 and with the WebLogic Server 12c Installer. I have the problem on both physical and virtual servers.

As a workaround I use Java 6 during the installation and later switch to Java 7. This works fine.

Install the latest Java SE CPU

Check the Java SE Critical Patch Update (CPU) to see if you need to patch the Java you have installed.
The latest Java SE CPU is from February 2013. It patches update 13 and earlier. I use update 15 so there is no need to patch it.

Install the WebLogic Server 10.3.6

Take care when downloading the wls1036_generic.jar file since some browsers will rename it to wls1036_generic.zip.


/u01/app/oracle/product/java_current/bin/java
-Djava.io.tmpdir=/u01/tmp -jar wls1036_generic.jar -log=wls_install.log

-Djava.io.tmpdir is only needed if there is not enough tmp space.

Below I have ignored the screens where you can sign up for security updates etc.

wls1
wls2
wls3
wls4
wls5

Here my Java soft link is ignored so we have to fix this later.

wls6
wls7
wls8

The Java soft link was ignored so we have to fix this:

cd /u01/app/oracle/product/osb
grep -R jdk1.6.0_39 *
find . -type f -exec sed -i "s/\/u01\/app\/oracle\/product\/jdk1.6.0_39/\/u01\
/app\/oracle\/product\/java_current/g" {} \;

Install the latest WebLogic Server PSU patch

Oracle releases quarterly security updates. You can read more about CPU, SPU, PSU and BP patches here.

WebLogic 10.3.6 January 2013 PSU patch 14736139. (p14736139_1036_Generic.zip)

Make sure all WebLogic servers are stopped and remove any previously applied Patch Set Update and associated overlay patches.

mkdir /u01/app/oracle/product/osb/utils/bsu/cache_dir
cp HYKC.jar /u01/app/oracle/product/osb/utils/bsu/cache_dir/.
cp patch-catalog_18682.xml /u01/app/oracle/product/osb/utils/bsu/
cache_dir/patch-catalog.xml

Make sure that the patch-catalog_18682.xml is renamed to patch-catalog.xml!

cd /u01/app/oracle/product/osb/utils/bsu/
./bsu.sh -prod_dir=/u01/app/oracle/product/osb/wlserver_10.3
 -patchlist=HYKC -verbose -install

Verify that the patch is installed.

./bsu.sh -prod_dir=/u01/app/oracle/product/osb/wlserver_10.3
 -status=applied -verbose -view

Alternative use.

. /u01/app/oracle/product/osb/wlserver_10.3/server/bin/setWLSEnv.sh
java weblogic.version

For example.

[oracle@wintermute ~]$ java weblogic.version

WebLogic Server 10.3.6.0.3 PSU Patch for BUG14736139 Fri Nov 23 10:16:54 IST 2012
WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050

Install the OSB

Red Hat 6 is certified with the 11.1.1.6 OSB but because the OSB was shipped before it was certified you need the -ignoreSysPrereqs parameter.

The documentation does not reflect this yet but this MOS note does:
“OSB 11.1.1.6 Installation Fails on Red Hat Enterprise Linux (EL) 6 [ID 1530125.1]”

cd /u01/software/ofm_osb_generic_11.1.1.6.0_disk1_1of1/Disk1
./runInstaller -ignoreSysPrereqs -jreLoc
 /u01/app/oracle/product/java_current/jre

Below I have ignored the screens where you can sign up for security updates etc.

osb1a
osb1b
osb1c
osb2
osb3
osb4
osb5
osb6
osb7
osb8
osb9

Patch the OSB

To find out if there exists any patches that you should install check the “Information Center: Oracle Service Bus (OSB) [ID 1293368.2]” on MOS.

Currently they have listed two patches, one for the WebLogic Server and one for the OSB.

WebLogic Patch
Check “Performance Impact in WLS 10.3.6 / Oracle Service Bus 11.1.1.6 if Using Work Manager or Dispatch Policy for OSB JMS Services [ID 1388057.1]”

Patch 13573621 (p13573621_103603_Generic.zip).

cp DYCA.jar /u01/app/oracle/product/osb/utils/bsu/cache_dir/.
cp patch-catalog_19101.xml /u01/app/oracle/product/osb/utils/bsu/
cache_dir/patch-catalog.xml

Make sure that the patch-catalog_19101.xml is renamed to patch-catalog.xml!

cd /u01/app/oracle/product/osb/utils/bsu/
./bsu.sh -prod_dir=/u01/app/oracle/product/osb/wlserver_10.3
 -patchlist=DYCA -verbose -install

Verify that the patch is installed.

./bsu.sh -prod_dir=/u01/app/oracle/product/osb/wlserver_10.3
 -status=applied -verbose -view

Alternative use.

. /u01/app/oracle/product/osb/wlserver_10.3/server/bin/setWLSEnv.sh
java weblogic.version

OSB Patch
OSB patches are not applied via the BSU but uses the well-known Oracle OPatch tool.

Always download and install the latest OPatch version from MOS!

export ORACLE_HOME=/u01/app/oracle/product/osb/Oracle_OSB1
cd /u01/app/oracle/product/osb/Oracle_OSB1/OPatch
./opatch | grep version

unzip p6880880_111000_Linux-x86-64.zip -d /u01/app/oracle/product/osb/Oracle_OSB1

cd /u01/app/oracle/product/osb/Oracle_OSB1/OPatch
./opatch | grep version

The OSB patch is “14389126: PS5 Bundle Patch 1 (11.1.1.6.1)”. (p14389126_111160_Generic.zip)

Check “OSB 11g: Bundle Patch Reference [ID 1499170.1]”

export ORACLE_HOME=/u01/app/oracle/product/osb/Oracle_OSB1
cd p14389126_111160_Generic/14389126
/u01/app/oracle/product/osb/Oracle_OSB1/OPatch/opatch apply
 -jdk /u01/app/oracle/product/java_current
 -jre /u01/app/oracle/product/java_current/jre

To validate that it has been installed:

cd /u01/app/oracle/product/osb/Oracle_OSB1/OPatch
./opatch lsinventory

You should see one product and one interim patch.

Create database schemas via the RCU

You most likely do not need a database with your OSB. It is only required if you want to use the OSB Reporting features or the OWSM. Talk to your developers to check if they are using Report actions or OWSM policies.

You can see how to deal with a couple of issues if you are not using a database here.

For this installation I will use a database.

First have a look at the documentation:
Oracle Fusion Middleware Repository Creation Utility User’s Guide

Check the database requirements and notice:

AL32UTF8 character set
If you use a database that does not use the AL32UTF8 character set the RCU will complain. As long as you are not using Oracle WebCenter or Oracle Identity Management you can ignore this.
For more information see the RCU MOS FAQ: “Oracle Fusion Middleware 11g Repository Creation Utility (RCU) – FAQ [ID 1304790.1]”

NLS_LENGTH_SEMANTICS
Only Byte length semantics is supported so if you use CHAR you probably need to use another database.
See “RCU 11g Fails When Creating Index on MDS_COMPONENTS – ORA-01450: maximum key length (6398) exceeded [ID 987906.1]”

SID != Service Name
RCU uses the Service Name when connecting to a database, not the SID. The SID and the Service Name can contain different values.
You can find the Service Name in the database via:

SQL> show parameter service_names

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      xdb.egf

Which schema’s are required?
To support OSB Reporting you need to select the SOA Infrastructure component in the RCU. I cannot find any documentation that states this though. You can get information about other FMW products here but the OSB is not mentioned.

Does anybody know where this information can be found? 🙂

Tablespaces
You can create tablespaces via the RCU but I prefer to create them myself.
A database will often have a default tablespace called USERS. It often ends up being a mess with all kind of different objects that nobody really knows why are there 🙂
You should create separate tablespaces and use them after the kind of data that goes in them: Object size, growth rate, object type (Tables, LOBs, etc.)

create smallfile tablespace OSB_REPO datafile'/u01/app/oracle/oradata/osb/osb_repo01.dbf'
 size 150m autoextend on next 100m maxsize 1g extent management local autoallocate;

Start the RCU
cd ofm_rcu_linux_11.1.1.6.0_disk1_1of1/rcuHome/bin
./rcu

RCU 1
RCU 2
RCU 3
RCU 4
RCU 5
RCU 6
RCU 7
RCU 8
RCU 9
RCU 10
RCU 11

Configure the OSB

The CONFIG_JVM_ARGS is set to speed things up if the system is low on entropy.

export CONFIG_JVM_ARGS=”-Djava.security.egd=file:/dev/./urandom”
cd /u01/app/oracle/product/osb/oracle_common/common/bin
./config.sh

Below I have ignored the screens where you can sign up for security updates etc.

Domain1
Domain2
Domain3
Domain4
Domain5
Domain6a
Domain6b
Domain7
Domain8
Domain9
Domain10
Domain11
Domain12
Domain13
Domain14
Domain15

Homes overview

There are many homes:

  • Application Home – /u01/app/oracle/applications/osb
  • Domain Home – /u01/app/oracle/domains/osb
  • Middleware Home – /u01/app/oracle/product/osb
  • Oracle Common Home – /u01/app/oracle/product/osb/oracle_common
  • Oracle OSB Home – /u01/app/oracle/product/osb/Oracle_OSB1
  • WebLogic Server Home – /u01/app/oracle/product/osb/wlserver_10.3

For more information check the Oracle Fusion Middleware Installation Planning Guide.

Starting the servers

Start the Admin Server:

cd /u01/app/oracle/domains/osb
./startWebLogic.sh

Waite till you see:

<Server started in RUNNING mode>

Now you should be able to access the Admin Console:
http://wintermute:7001/console

Start the Managed Server in another terminal:

cd /u01/app/oracle/domains/osb/bin
./startManagedWebLogic.sh osb_server1

When it reaches the Running state check that all the deployments has state Active.

Java parameters
You can set Java memory parameters in several ways. Here I use setDomainEnv.sh in /u01/app/oracle/domains/osb/bin.
I place the below just after all the comments in the top of the file:

“Development Mode”

# *************************************************************************
# lorenzen Begin 
# *************************************************************************
if [ "${SERVER_NAME}" = "" ] ; then
        SERVER_NAME="AdminServer"
        export SERVER_NAME
fi
if [ "${SERVER_NAME}" = "AdminServer" ] ; then
  USER_MEM_ARGS="-Xms256m -Xmx768m -XX:MaxPermSize=350m -Djava.security.egd=file:/dev/./urandom"
elif [ "${SERVER_NAME}" = "osb_server1" ] ; then
  USER_MEM_ARGS="-Xms768m -Xmx1024m -XX:MaxPermSize=350m -Djava.security.egd=file:/dev/./urandom"
fi
# *************************************************************************
# lorenzen End
# *************************************************************************

Production Mode

# *************************************************************************
# lorenzen Begin 
# *************************************************************************
if [ "${SERVER_NAME}" = "" ] ; then
        SERVER_NAME="AdminServer"
        export SERVER_NAME
fi
if [ "${SERVER_NAME}" = "AdminServer" ] ; then
  USER_MEM_ARGS="-Xms256m -Xmx768m -XX:MaxPermSize=350m"
elif [ "${SERVER_NAME}" = "osb_server1" ] ; then
  USER_MEM_ARGS="-Xms768m -Xmx1024m -XX:MaxPermSize=350m"
fi
# *************************************************************************
# lorenzen End
# *************************************************************************

In “Development Mode” I have added a parameter to take care of any entropy problems.

If you are not running in Production Mode I always set debugFlag and ALSB_DEBUG_FLAG to false.
If you do not do this you can get errors like the below, becuase several servers are trying to use the same port:

ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized

So add this:

debugFlag="false"
ALSB_DEBUG_FLAG="false"

This should do it:

sed -i 's/debugFlag="true"/debugFlag="false"/g' setDomainEnv.sh
sed -i 's/ALSB_DEBUG_FLAG="true"/ALSB_DEBUG_FLAG="false"/g' setDomainEnv.sh

If your developers need the debug ports, make sure each server uses unique ports.

Configuring the Node Manager

I always use the Node Manager (NM) to start and stop WebLogic servers.

1. Set NM user name and password

Use the Admin Console and navigate to the domain. Select Security and then Advanced. Set “NodeManager Username” and “NodeManager Password”:
nm1

2. Set the NM type to plain

The NM default uses SSL. I normally do not use SSL for the NM and if you do you should use valid SSL certificates not the default demo certificates.
Navigate to Environment => Machines => Machine_1 => Node Manager.
Change Type to Plain.
nm2

3. Stop the Admin Server and the Managed Server

Stop them via the Admin Console or just ctrl+c in the two terminals.

4. Start the NM

cd /u01/app/oracle/product/osb/wlserver_10.3/server/bin
./startNodeManager.sh

When you see:

INFO: Secure socket listener started on port 5556

Stop NM again with ctrl+c. The NM has now create it’s setup files and we need to make a couple of changes in nodemanager.properties in:
/u01/app/oracle/product/osb/wlserver_10.3/common/nodemanager

Change these lines:

javaHome=/u01/app/oracle/product/java_current
JavaHome=/u01/app/oracle/product/java_current/jre
ListenAddress=localhost
SecureListener=false
CrashRecoveryEnabled=true
StartScriptEnabled=true

This should do it.

sed -i 's/javaHome=.*/javaHome=\/u01\/app\/oracle\/product\/java_current/g' nodemanager.properties
sed -i 's/JavaHome=.*/javaHome=\/u01\/app\/oracle\/product\/java_current\/jre/g' nodemanager.properties
sed -i 's/ListenAddress=/ListenAddress=localhost/g' nodemanager.properties
sed -i 's/SecureListener=true/SecureListener=false/g' nodemanager.properties
sed -i 's/CrashRecoveryEnabled=false/CrashRecoveryEnabled=true/g' nodemanager.properties
sed -i 's/StartScriptEnabled=false/StartScriptEnabled=true/g' nodemanager.properties

Start the NM again. Wait until you see:

INFO: Plain socket listener started on port 5556

In another terminal start the Admin Server:

. /u01/app/oracle/product/osb/wlserver_10.3/server/bin/setWLSEnv.sh
java weblogic.WLST
nmConnect(username='nodemgr', password='manager2', domainName='osb', domainDir='/u01/app/oracle/domains/osb', nmType='plain')
nmStart('AdminServer')

When the Admin Server is Running start the Managed Server via the Admin Console.

Notice that things are a bit different if you use Production Mode.

Configure automatic start of the servers

Now everything is running but of cause the NM should not be started manually but automatically when the server boots.

Here is a very simple boot script:
/etc/init.d/osbNodeManager

cd /etc/init.d
chmod 755 osbNodeManager
chkconfig --add osbNodeManager
chkconfig --list osbNodeManager
./osbNodeManager start

Java 7

Before switching to Java 7 you should read “Using WebLogic Server with JDK 7“.

mkdir /u01/app/oracle/product/jdk1.7.0_15/jre/lib/endorsed
cd /u01/app/oracle/product/osb/modules
cp javax.annotation_* /u01/app/oracle/product/jdk1.7.0_15/jre/lib/endorsed
cp javax.xml.bind_* /u01/app/oracle/product/jdk1.7.0_15/jre/lib/endorsed
cp javax.xml.ws_* /u01/app/oracle/product/jdk1.7.0_15/jre/lib/endorsed
ls /u01/app/oracle/product/jdk1.7.0_15/jre/lib/endorsed

The java_current soft link still points to Java 6 so we should change this:

rm -f /u01/app/oracle/product/java_current
ln -s /u01/app/oracle/product/jdk1.7.0_15 /u01/app/oracle/product/java_current
ls -l /u01/app/oracle/product/java_current

Warnings in log files

When you start the OSB you will see a lot of warnings in the log files. Since they are warnings they can be ignored. But it is nice to know what they mean. Some of them you can get rid of if you want to.

<BEA-381917> <MQ Transport could not be registered due to : Missing MQ Library>

You are missing some MQ libraries. If you are not using MQ transport you can untarget the “MQ Transport Provider” application.
See “BEA-000000 & BEA-381917 Warning Messages During OSB Cluster Domain Admin Server Startup [ID 1074857.1]”

<BEA-387042> <There is no user password credential mapper provider configured in your security realm

If you are not using the provider it can be ignored. See “Why Do We Get BEA-387042 Alert at Server Start-up? [ID 1267945.1]”

Metric table “oracle_oim:overall” has no key column. It will not be collected

There is nothing you can do about these messages. See “After migration to FMW 11.1.1.6 and WLS 10.3.6, Warning Messages In Stdout When Weblogic Starts [ID 1434193.1]”

UnicastUdpSocket failed to set send buffer size
UnicastUdpSocket failed to set receive buffer size
PreferredUnicastUdpSocket failed
MulticastUdpSocket failed

Coherence is complaining because the OS socket buffers are to small. You can increase them in /etc/sysctl.conf:

net.core.rmem_max=4192608
net.core.wmem_max=4192608

Run /sbin/sysctl -p

Oracle Coherence 3.7.1.1 (member=n/a): Local address “127.0.0.1” is a loopback address; this cluster node will not

If you don’t use Coherence you can disable it via the SBConsole. Operations => Global settings. Remove the check mark from “Enable Result Caching”.

No test table set up for pool “wlsbjmsrpDataSource”. Connections will not be tested

You should change the Connection Pool for the Data Source to have “SQL SELECT 1 FROM DUAL” in “Test Table Name”.

Miscellaneous

You should audit the Logging settings for the domain and the servers to make sure log rotation is configured.
Notice that .out log files cannot be rotated by WebLogic. The are only rotated when the servers are restarted.
On Windows this is a problem on Linux not so much 🙂
But make sure you developers know that:

System.out.println("This is forbidden! Use Java Logging or Log4j");

You should configure “Configuration Archiving” for the domain. Domain => Configuration => General => Advanced. Set “Configuration Archive Enabled” and “Archive Configuration Count”.
When you change the configuration a backup of config.xml will be save so you can revert to an old version if you get in trouble.

Configure OCM

If your servers has access to the Internet OCM will automatically download the latest version. If not you should download it yourself and install it manually.

. /u01/app/oracle/domains/osb/bin/setDomainEnv.sh
export ORACLE_HOME=/u01/app/oracle/product/osb/utils
export JAVA_HOME=/u01/app/oracle/product/java_current
cd $ORACLE_HOME/ccr/bin
./setupCCR -s 12345678 nobody@cgi.com DK

Verify that it is working:

cd $ORACLE_HOME/ccr/bin
./emCCR start
./emCCR status
./emCCR -register test
./emCCR -verbose test
./emCCR register
./emCCR collect
./emCCR upload
./emCCR disable_target

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: