Using GRID Infrastructure to control third party applicaitons?

From: Mark J. Bobak <mark_at_bobak.net>
Date: Mon, 25 Jan 2016 11:28:08 -0500
Message-ID: <CAFQ5ACJcx9o_Kw0iCNfQRFppoYrvw7Yj-WxRNLdfXxSF2Sn4aQ_at_mail.gmail.com>



Hi all,

Has anyone sucessfully done this? In my case, I've managed to figure out how to create teh necessary resource, but it doesn't actually work.

What I'm tying to do, is start up a Glassfish server (running on the DB server, single instance, in my case), with a dependency on the database. I have ORDS (formerly known as APEX Liostener) deployed in Glassfish, and if I just start Glassfish via init.d, it will start before the database, and gets stuck reporting 404, even after the db starts, until I bounce Glassfish. So, I want to start if from GI home, using crs/has, and have a dependency on the db, to solve the startup sequence issues. (Also, to make it (presumably?) stop and stat automatically whenever the DB is bounced.)

So, I created the resource, like so:
 crsctl add resource glassfish -type generic_application -attr "START_PROGRAM='/etc/init.d/glassfish_domain1 start',STOP_PROGRAM='/etc/init.d/glassfish_domain1 stop',START_DEPENDENCIES='hard(ora.orcl.db)',STOP_DEPENDENCIES='hard(ora.orcl.db)',PID_FILES=/var/run/glassfish.pid"

This seems to have worked, no error is returned, and one can query the resource and see it exists:
crsctl status res glassfish
NAME=glassfish
TYPE=generic_application
TARGET=OFFLINE
STATE=OFFLINE But, when I try to start it, I get this:  crsctl start res glassfish

CRS-2672: Attempting to start 'glassfish' on 'my_new_test'
CRS-2674: Start of 'glassfish' on 'my_new_test' failed
CRS-2679: Attempting to clean 'glassfish' on 'my_new_test'
CRS-2681: Clean of 'glassfish' on 'my_new_test' succeeded
CRS-4000: Command Start failed, or completed with errors.

And, at the end, the glassfish server is, in fact, running. So, it thinks it failed to start, but it starts, then it does the clean, and it thinks it cleaned everything up (remove logifle and pid file and kill process) but it in fact remains running.

I suspect that there is a 'tamplate' for the startup/shutdown script? I found a doc on MOS, that says my script must accept 'start','stop','clean, and 'check' as parameters. When I run my sript from the command line, it works beautifully, and those parameters all work as expected.

So, my next guess is return values? Not sure what to try next...

Has anyone gotten this to work? Any idea what I'm missing from my script?

Thanks,

-Mark

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 25 2016 - 17:28:08 CET

Original text of this message