Oracle MVA

Tales from a Jack of all trades

Cloning 11g Fusion Middleware on 64-bit OEL

leave a comment »

I am discovering the mass deployment features of Fusion Middleware 11g. Oracle’s documentation sents you towards cloningclient.jar, which helps you creating a golden image and clone this image to new machines. What the documentation forgot to mention is that you only find cloningclient.jar on your filesystem after you installed an extra Oracle product in your middleware home (just WLS is not enough, you need SOA or some other component). That’s okay by me, since I am working on a SOA deployment anyway, but the docs could have been more clear on that one.

First of I copied the cloningclient.jar to some NFS share that is present on all my machines. This makes sure I will never have to look for this .jar again. Creating a golden image with cloningclient.jar is rather easy, just follow the documentation and you’ll be okay:

java -jar /software/oracle/32bit/FusionMiddleware/cloningclient.jar createclone -archiveLocation /software/oracle/32bit/FusionMiddleware/OFM_golden_image.jar -sourceMWHomeLoc /u01/app/oracle/mwhome  -excludePattern “*.log,*.bak” -invPtrLoc /u01/app/oracle/mwhome/Oracle_SOA1/oraInst.loc -silent true

Next you logon to a brand new installed machine and you call cloningclient.jar again, again all according to documentation:

java -jar /software/oracle/32bit/FusionMiddleware/cloningclient.jar applyClone -archiveLocation /software/oracle/32bit/FusionMiddleware/OFM_golden_image.jar -targetLocation /u01/app/oracle/mwhome -sourceID all -silent TRUE

Now this should give you a newly installed Fusion Middleware home, but instead you get this nice error:

Log: /u01/app/oracle/oraInventory/logs/install2009-10-21_05-07-57PM.log
contextFile:/tmp/PREREQ20091021_050730/Scripts/prereq/oui/agent_prereq_context.xml
java.lang.UnsatisfiedLinkError: /tmp/PREREQ20091021_050730/oui/lib/linux/liboraInstaller.so: /tmp/PREREQ20091021_050730/oui/lib/linux/liboraInstaller.so: cannot open shared object file: No such file or directory (Possible cause: architecture word width mismatch)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:402)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.<clinit>(OiipuUnixOps.java:125)
        at oracle.sysman.oii.oiip.oiipg.OiipgFileSystem.changePermission(OiipgFileSystem.java:1995)
        at oracle.sysman.oii.oiix.OiixFileOps.changePermission(OiixFileOps.java:2110)
        at oracle.sysman.oii.oiix.OiixFileOps.changePermissions(OiixFileOps.java:2042)
        at oracle.sysman.oii.oiit.OiitLockHeartbeat.<init>(OiitLockHeartbeat.java:178)
        at oracle.sysman.oii.oiit.OiitTargetLocker.getReaderLock(OiitTargetLocker.java:473)
        at oracle.sysman.oii.oiii.OiiiTargetAreaControl.grabReaderLock(OiiiTargetAreaControl.java:361)
        at oracle.as.install.engine.modules.prereq.action.PrereqLauncher.initInstallInventory(PrereqLauncher.java:393)
        at oracle.as.install.engine.modules.prereq.action.PrereqLauncher.<init>(PrereqLauncher.java:128)
        at oracle.as.install.engine.modules.prereq.action.PrereqLauncher.getEnginePreReqLauncher(PrereqLauncher.java:119)
        at oracle.as.clone.util.PreReqUtil.prereqsetupAndLuncher(PreReqUtil.java:148)
        at oracle.as.clone.util.PreReqUtil.prereqcheck(PreReqUtil.java:433)
        at oracle.as.clone.mwhome.cloner.OracleHomeApplyCloner.preReqRun(OracleHomeApplyCloner.java:199)
        at oracle.as.clone.mwhome.cloner.OracleHomeApplyCloner.restoreOH(OracleHomeApplyCloner.java:154)
        at oracle.as.clone.mwhome.cloner.OracleHomeApplyCloner.restoreArchive(OracleHomeApplyCloner.java:122)
        at oracle.as.clone.cloner.ApplyCloner.doClone(ApplyCloner.java:50)
        at oracle.as.clone.request.ApplyCloneRequest.applyArchive(ApplyCloneRequest.java:70)
        at oracle.as.clone.request.ApplyCloneRequest._clone(ApplyCloneRequest.java:48)
        at oracle.as.clone.process.CloningExecutionProcess.execute(CloningExecutionProcess.java:110)
        at oracle.as.clone.process.CloningExecutionProcess.execute(CloningExecutionProcess.java:95)
        at oracle.as.clone.client.CloningClient.main(CloningClient.java:112)

Obviously the architecture word width mismatch is a dead giveaway: I need a 32-bit JRE to run the cloningclient, even though I created the golden image with a 64-bit JRE (the default one from OEL 4). If you happen to look for one, there’s one in the original middleware home. Just copy it to the new server and set the JAVA_HOME environment to the 32-bit JRE.  If you apply the golden image with the cloningclient.jar again, you will run into the next error:

2009-10-21_05-49-49PM : ERROR  : CLONE-20269   Setting Java Library path has failed.
2009-10-21_05-49-49PM : CAUSE  : CLONE-20269   There are following possible causes
 1. The oui library path /tmp/PREREQ20091021_054922/oui/lib was empty
 2. Unable to find oui lib directory name.
  3. The oraInstaller library path /tmp/PREREQ20091021_054922/oui/lib/linux64 was empty.

Again this is 64-bit trouble, only this time the fix is easier. Just call linux32 bash before you restart the clone and now the cloning process will run successfully.  The cloning process also creates an entry in inventory.xml (located in oraInventory/ContentsXML ). You might want to remove this entry if you replay the cloning process over and over again. 

Hope this helps.

Advertisements

Written by Jacco H. Landlust

October 21, 2009 at 5:59 pm

Posted in Installing, Weblogic

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: