The following assumes your OHS is hosted in MS Windows. An equivalent bash shell script may be easily created to do the same in Linux/Exalytics. The below assumes you have already executed the OHS storeUserConfig process previously documented on this blog.
SET CWD=%~dp0
REM This script sets up our environment variables.
CALL %CWD%ScriptEnv.bat
sc start "Oracle Weblogic ohs NodeManager (F_Oracle_Middleware_ohs_wlserver)"
start "StartOHS" /wait /i cmd /c %EPM_INSTANCE_HOME%\httpConfig\ohs\bin\startComponent.cmd ohs_component
You're welcome.
Change the "F" in red above to be your EPM system's drive letter. The variable EPM_INSTANCE_HOME is the path to the instance, such as F:\Oracle\Middleware\user_projects\epmsystem1 and I define it in my custom ScriptEnv.bat.
You may want to check in on the lastinvocation.log (it's really scripts). Using that (with a "little" fixing), you can get rid of the nodemanager completely =)
ReplyDeleteHi Deezel, would mind explaining it more. I was to setup my environment like when we use main start script provided by Oracle it should start OHS as well.
DeleteThanks.
This is really helpful. Both the tips from Dave and Deezel.
ReplyDeleteUsing the lastinvocation I created a start and stop script (with shutdownconsole parameter)
So now running without nodemanager.
Something in return,
in case you use the main 'start & stop EPM system' scripts for the complete EPM stack:
add a new properties file to the config starter folder
type=script
start.script=
stop.script=
checker=j2ee
wait=true
interval=5000
timeout=500000
host=
server.port=19000
validation.context=/index.html
I guess oracle forgot they can not only start services but also scripts with starter functionality
I guess in above some text was not posted.
ReplyDeleteSpecify your server and filename incl path to your start and stop scripts. Make sure they are escaped similar as in the other starter properties files
Hey Dave, Great post as usual. Using above script I setup a windows service suing nssm tool however not sure how to setup stop service when we fire stop command in Windows services.
ReplyDeleteAlso, I was targeting if we create a windows script and adjust Node Manager as dependent for newly create OHS service (using nssm.cc tool) then we start gracefully start and stop OHS and node manager services.
Any thoughts.
Thanks,
Vikram