Sunday, 3 July 2011

EPM 11.1.2.1 compact deployment update part 2

This week’s blog is a continuation from the last one on compact deployments, it is not essential that you have read the last blog but for this one to be of any benefit then you would have had to successfully completed a compact deployment.

In the original post on EPM compact deployments I left two open questions and this week it is time for the second question to be covered off which only relates to windows OS deployments.

Once a compact mode has completed successfully a batch script named startEPMSystem.bat is generated to start up the WebLogic managed server, no windows service is created like the other WebLogic deployed products so to make life a little bit easier I set myself a task to create a windows service that will start up the EPM managed server.

Now I know it is probably possible to try and use the Weblogic install service utility but I didn’t have much success with it and I also I wanted the service to function like the other products in the stack so here are the steps I carried out to set up the service.



In a standard deployment once the Weblogic web applications have been started and if you look in task manager you will see a process for each managed server, each process has the same description as in fact they are all the same executable just with a different name.



Each of these executables are called when the service is started and they all reside in <MIDDLEWARE_HOME>\user_projects\domains\<domain name>\bin



The executables originate from <MIDDLEWARE_HOME>\EPMSystem11R1\common\utilities\JavaService, there is a 32bit and 64bit version of the executable.

When a Weblogic managed service is deployed it copies the file from the above directory into <MIDDLEWARE_HOME>\user_projects\domains\<domain name>\bin and renames it depending on which web application is being deployed.



I copied HyslJavaServiceAMD64.exe into <MIDDLEWARE_HOME>\user_projects\domains\epmsystem1\bin and renamed it to EPMSystem.exe

Usually the default deployment domain name is EPMSystem but in my compact deployment I called it epmsystem1.



If you take a look at any of the start up commands for the windows services you will see/ServiceName= and /RegKey=
these define the registry keys used and are called upon when the windows service is started.



The keys are all stored under HKLM\SOFTWARE\Hyperion Solutions and contain important variables and various paths to pass into the WebLogic managed server for it to be able to function correctly.

For the windows service I am creating I would need to create a new registry key for the EPM Managed server.



When a compact deployment is run it creates a file called setManagedParamsEPMserver.bat in <MIDDLEWARE_HOME>\user_projects\domains\<domain name>\bin



This file contains all the necessary information for the registry key so the next step was to transfer this information into a .reg file.

Instead of creating the file from scratch I did use a registry key that had already been created from another EPM 11.1.2.1 instance, I used the foundation services registry key as a starting point and these keys can be found in <MIDDLEWARE_HOME>\user_projects\<instance_name>\bin\deploymentScripts\installServiceScripts

The registry file needed a clean up as some of the options are repeated two or three times.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Hyperion Solutions\EPMSystem0\EPM11]
"JVMOption1"="-Dweblogic.Name=EPMServer0"
"JVMOption2"="-Dweblogic.RootDirectory=E:\\Oracle\\Middleware\\user_projects\\domains\\epmsystem1"
"JVMOption3"="-Dweblogic.j2ee.application.tmpDir=E:\\Oracle\\Middleware\\user_projects\\domains\\epmsystem1\\servers\\EPMServer0\\tmp"
"JVMOption4"="-Dweblogic.management.server=http://localhost:7001"
"JVMOption5"="-Ddomain.home=E:\\Oracle\\Middleware\\user_projects\\domains\\epmsystem1"
"JVMOption6"="-Dplatform.home=E:\\Oracle\\MIDDLE~1\\WLSERV~1.3"
"JVMOption7"="-Dwls.home=E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server"
"JVMOption8"="-Dweblogic.home=E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server"
"JVMOption9"="-DEPM_ORACLE_HOME=E:\\Oracle\\Middleware\\EPMSystem11R1"
"JVMOption10"="-DEPM_ORACLE_INSTANCE=E:\\Oracle\\Middleware\\user_projects\\epmsystem1"
"JVMOption11"="Djava.library.path=E:\\Oracle\\Middleware\\EPMSystem11R1/products/Planning/lib64;E:\\Oracle\\Middleware\\EPMSystem11R1/common/ADM/11.1.2.0/bin-64;E:\\Oracle\\Middleware\\EPMSystem11R1/bin;E:\\Oracle\\Middleware\\EPMSystem11R1/common/EssbaseRTC-64/11.1.2.0/bin;E:\\Oracle\\Middleware\\EPMSystem11R1/products/Essbase/EssbaseServer/bin;E:\\Oracle\\Middleware\\user_projects\\epmsystem1/products/biplus/bin;E:\\Oracle\\Middleware\\EPMSystem11R1/common/ADM/11.1.2.0/ODBO/11.1.2.0;E:\\Oracle\\Middleware\\EPMSystem11R1/products/FinancialManagement/Common;E:\\Oracle\\Middleware\\EPMSystem11R1/products/FinancialManagement/Client;E:\\Oracle\\Middleware\\EPMSystem11R1/common/ADM-64/Planning/11.1.2.0/bin;E:\\Oracle\\Middleware\\EPMSystem11R1/products/Essbase/eas/server/bin; "
"JVMOption12"="-DESS_ES_HOME=E:\\\\Oracle\\\\Middleware\\\\EPMSystem11R1/products/Essbase/eas/server"
"JVMOption13"="-Dcom.hyperion.planning.datamodel=64 "
"JVMOption14"="-Dcommon.components.home=E:\\Oracle\\MIDDLE~1\\ORACLE~1"
"JVMOption15"="-Djrf.version=11.1.1"
"JVMOption16"="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger"
"JVMOption17"="-Djrockit.optfile=E:\\Oracle\\MIDDLE~1\\ORACLE~1\\modules\\oracle.jrf_11.1.1\\jrocket_optfile.txt"
"JVMOption18"="-Doracle.domain.config.dir=E:\\Oracle\\MIDDLE~1\\USER_P~1\\domains\\EPMSYS~1\\config\\FMWCON~1"
"JVMOption19"="-Doracle.server.config.dir=E:\\Oracle\\MIDDLE~1\\USER_P~1\\domains\\EPMSYS~1\\config\\FMWCON~1\\servers\\EPMServer0"
"JVMOption20"="-Doracle.security.jps.config=E:\\Oracle\\Middleware\\user_projects\\domains\\epmsystem1\\config\\fmwconfig\\jps-config.xml"
"JVMOption21"="-Djava.protocol.handler.pkgs=oracle.mds.net.protocol"
"JVMOption22"="-Digf.arisidbeans.carmlloc=E:\\Oracle\\MIDDLE~1\\USER_P~1\\domains\\EPMSYS~1\\config\\FMWCON~1\\carml"
"JVMOption23"="-Digf.arisidstack.home=E:\\Oracle\\MIDDLE~1\\USER_P~1\\domains\\EPMSYS~1\\config\\FMWCON~1\\arisidprovider"
"JVMOption24"="Dweblogic.alternateTypesDirectory=E:\\Oracle\\MIDDLE~1\\ORACLE~1\\modules\\oracle.ossoiap_11.1.1,E:\\Oracle\\MIDDLE~1\\ORACLE~1\\modules\\oracle.oamprovider_11.1.1"
"JVMOption25"="-Dweblogic.jdbc.remoteEnabled=false"
"JVMOption26"="-DEAS_HOME=E:\\\\Oracle\\\\Middleware\\\\EPMSystem11R1/products/Essbase/eas"
"JVMOption27"="-DDISCMAN_HOME=E:\\\\Oracle\\\\Middleware\\\\EPMSystem11R1/products/DisclosureManagement/DiscManHome "
"JVMOption28"="-DDISCMAN_INSTANCE=E:\\\\Oracle\\\\Middleware\\\\user_projects\\\\epmsystem1/DisclosureManagement/discman1"
"JVMOption29"="-Doracle.deployed.app.dir=E:\\Oracle\\Middleware\\user_projects\\domains\\epmsystem1\\servers\\EPMServer0\\tmp\\_WL_user"
"JVMOption30"="-Doracle.deployed.app.ext=\\-"
"JVMOption31"="-Dem.oracle.home=E:\\Oracle\\Middleware\\oracle_common"
"JVMOption32"="-Djava.awt.headless=true"
"JVMOption33"="-Dweblogic.management.discover=true"
"JVMOption34"="-Dhyperion.home=E:\\Oracle\\Middleware\\EPMSystem11R1"
"JVMOption35"="-DHYPERION_HOME=E:\\Oracle\\Middleware\\EPMSystem11R1"
"JVMOption36"="-Dlogging.folder=E:\\Oracle\\Middleware\\user_projects\\domains\\epmsystem1\\servers\\EPMServer0\\logs"
"JVMOption37"="-Dserver.name=EPMServer0"
"JVMOption38"="-Dsun.net.inetaddr.ttl=0"
"JVMOption39"="-Djava.io.tmpdir=E:\\Oracle\\Middleware\\user_projects\\epmsystem1/tmp"
"JVMOption40"="-Xrs"
"JVMOption41"="-XX:-FlightRecorder"
"JVMOption42"="-Xms512m"
"JVMOption43"="-Xmx1046m"
"JVMOption44"="Djava.class.path=E:\\Oracle\\MIDDLE~1\\ORACLE~1\\modules\\oracle.jdbc_11.1.1\\ojdbc6dms.jar;E:\\Oracle\\MIDDLE~1\\patch_wls1034\\profiles\\default\\sys_manifest_classpath\\weblogic_patch.jar;E:\\Oracle\\MIDDLE~1\\JROCKI~1\\lib\\tools.jar;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server\\lib\\weblogic_sp.jar;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server\\lib\\weblogic.jar;E:\\Oracle\\MIDDLE~1\\modules\\features\\weblogic.server.modules_10.3.4.0.jar;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server\\lib\\webservices.jar;E:\\Oracle\\MIDDLE~1\\modules\\ORGAPA~1.1/lib/ant-all.jar;E:\\Oracle\\MIDDLE~1\\modules\\NETSFA~1.0_1/lib/ant-contrib.jar;E:\\Oracle\\MIDDLE~1\\ORACLE~1\\modules\\oracle.jrf_11.1.1\\jrf.jar;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\common\\derby\\lib\\derbyclient.jar;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server\\lib\\xqrl.jar;E:\\Oracle\\Middleware\\user_projects\\epmsystem1/HPS/hpsfiles/config;E:\\Oracle\\Middleware\\user_projects\\epmsystem1/DisclosureManagement/discman1/lib;"
"JVMOptionCount"=dword:0000002c
"StartIn"="E:\\Oracle\\Middleware\\user_projects\\domains\\epmsystem1"
"StartupParamCount"=dword:00000000
"SysErrFile"="E:\\Oracle\\Middleware\\user_projects\\epmsystem1\\diagnostics\\logs\\services\\EPMSystem-syserr.log"
"SysOutFile"="E:\\Oracle\\Middleware\\user_projects\\epmsystem1\\diagnostics\\logs\\services\\EPMSystem-sysout.log"
"EnvCount"=dword:00000001
"JavaDll"="E:\\Oracle\\Middleware\\jrockit_160_20\\jre\\bin\\jrockit\\jvm.dll"
"Env1"="PATH=E:\\Oracle\\MIDDLE~1\\patch_wls1034\\profiles\\default\\native;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server\\native\\win\\x64;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server\\bin;E:\\Oracle\\MIDDLE~1\\modules\\ORGAPA~1.1\\bin;E:\\Oracle\\MIDDLE~1\\JROCKI~1\\jre\\bin;E:\\Oracle\\MIDDLE~1\\JROCKI~1\\bin;%PATH%;E:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\server\\native\\win\\x64\\oci920_8"
This is the registry file I came up with, it was saved as a .reg file and executing it updated the registry with the information. If you intend on using it then you will need to update the middle home directory and maybe the domain name if you use anything other than epmsystem1 as the usual domain name in an EPM deployment is EPMSystem.



One of the nice features of using this method is you get the option of generating logs like the other EPM products that use a windows service using the SysErrFile and SysOutFile options

The final step is to generate the windows service and this can be done by using the command line utility SC.



The command line used was
SC create “EPM Managed Server” binpath= E:\Oracle\Middleware\user_projects\domains\epmsystem1\bin\EPMSystem.exe” /StartClass=weblogic.Server /ServiceName=EPM11 /RegKey=EPMSystem0



When I started up the service I did notice some errors in the log relating a performance pack which stressed that performance could be degraded, this didn’t stop the managed server from starting up and working but it needed fixing, I went back to starting up the managed server by the standard batch file and the same error was being generated so it wasn’t down to the registry file I had created.

To fix this issue I just added an extra path to the –Djava.library.path option in the registry



The path added that was added was <MIDDLEWARE_HOME>\wlserver_10.3\server\native\win\x64

I did spot one more issue which only occurred if I set the JVM maximum size over 1.5GB then an out of memory error was generated in the log and the web application would terminate.



The issue seems to be common when using jrocket as the JVM, if the maximum size was set over 4GB then the error goes away but I found it was possible to also get around the issue without having to set the maximum size to 4GB by adding an extra option in the registry which is passed into the managed server.



An extra JVMOption was added with a value of –XXcompressedRefs:size=32GB (if you want to read in-depth details on why this option may have to be used then have a read here)

As an extra option was added the JVMOptionCount in the registry has to be incremented by 1.
I have not seen any other issues and the managed server is running well when started from a service.

2 comments:

Register website domain said...

Thanks for sharing the post..

Richard. said...

Hi John, great post. I had some when starting the service and I noticed your reg script (I used yours as a starting point) had some of the JVM options without the "-" hyphen in-front of them. Once I corrected those it was fine.