- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cmrunserv under Service Guard
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2003 11:29 AM
08-19-2003 11:29 AM
cmrunserv under Service Guard
Inside a package run script, I start up an application thru "cmrunserv -R my_app /my_app_full_path". This application cannot boot up - because of an incorrect SHLIB_PATH for example. The package is stated running as the run script goes thru. And although MC/SG keeps restarting it, the package status stays running. Normal feature ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2003 03:44 PM
08-19-2003 03:44 PM
Re: cmrunserv under Service Guard
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2003 11:00 PM
08-19-2003 11:00 PM
Re: cmrunserv under Service Guard
I would revisit how you activate your application and also ensure it has the correct SHLIB_PATH environment variable passed to it upon start up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2003 03:43 AM
08-20-2003 03:43 AM
Re: cmrunserv under Service Guard
means "restart service an infinite number of times *without* halting the package"
maybe you want to use
cmrunserv -r 3 to stop that after the third attempt and initiate failover....
interestingly, and in addition to what Melvyn said, the current man pages *no longer* include the sentence "cmrunserv is not intended for use in the shell ..."
Regards
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2003 04:48 AM
08-20-2003 04:48 AM
Re: cmrunserv under Service Guard
Generally, SERVICEs are non-terminating scripts or commands which are most often used to monitor the health of an application which is started via the "customer_defined_run_cmds" function in the script.
A package SERVICE is comprised of 3 components:
SERVICE_NAME
SERVICE_CMD
SERVICE_RESTARTS
cmrunserv uses all 3 customer_defined parameters to implement the service. ServiceGuard will monitor the PID of the service, restarting or terminating/failing-over the package if the service command terminates.
I have never seen an admin add another cmrunnserv command in a package control script to launch an application. As previously stated, use the customer_defined_run_cmds to start the application, and use the SERVICE_* parameters to monitor the application health by way of a monitor script.
-StephenD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2003 07:15 AM
08-20-2003 07:15 AM
Re: cmrunserv under Service Guard
OK: I have to revisit my design again then.
Basically, you're saying that a package has one and only one service and that service only monitors that the actual application processes are up. These processes are to be started in customer_defined_run_cmds.
But suppose I want to use the -r or -R feature. The monitoring script is then restarted by SG if I decide to exit when one process of the application goes down.
But I guess customer_defined_run_cmds is not rerun. So, don't I have both to start and then monitor in the monitoring script itself ?
More generally, this is the behavior I'm trying to implement:
- try to start the application. If it doesn't start right away (only one attempt), then fail the package without even trying on the alternate node.
- once the application is up and running, keep it up on that machine unless the machine goes down.
It's OK if I need to manually reset the RESTART counter sometimes. But I hope I won't have to code that logic in my monitoring script.
Thanks again,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2003 12:03 PM
08-20-2003 12:03 PM
Re: cmrunserv under Service Guard
Almost correct, you can have multiple services to monitor your application's vital processes.
>But suppose I want to use the -r or -R feature.>
Yes you can.
>The monitoring script is then restarted by SG if I decide to exit when one process of the application goes down.>
Correct, if you find a process you are monitoring dies, you can attempt ro restart the p[roces and monitor again.
>But I guess customer_defined_run_cmds is not rerun.>
Correct
> So, don't I have both to start and then monitor in the monitoring script itself ?>
Not sure what you mean here, but you can call a separate monitor script from in the package control file, or put some logic in the control script for a monitor section, as is done in the newest Oracle Toolkit script, for example.
>More generally, this is the behavior I'm trying to implement:
- try to start the application. If it doesn't start right away (only one attempt), then fail the package without even trying on the alternate node.
- once the application is up and running, keep it up on that machine unless the machine goes down.>
Well that is something completely out of the ordinary, as normally you expect to be able to have the package switch if it fails on startup, as this could be due to many reasons. I believe you will have to writ eand play with your own loic to get that to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2003 01:54 PM
08-20-2003 01:54 PM
Re: cmrunserv under Service Guard
1/
What I mean by "both start and then monitor in the monitoring script itself":
My application is started by customer_defined_run_cmds. Then it's monitored by my monitoring service. Ok, now one of its processes goes down. The monitoring script detects it. And exits... As I use a -r or -R, the monitoring script gets restarted by SG. But what restarts the application ?
Thus my question: do I need to restart the application in the monitoring script ? Just before I exit ? The logic would then be:
while 1 do
if "one process missing" then
start application
exit 1
fi
...
done
Well, maybe I can drop the customer_defined_run_cmds then. And have everything in the monitoring script. Like:
start application
while 1 do
if "one process missing" then
exit 1
done
I don't control exactly how much time I need to bring the application back up though. So multiple starts may step over one another...
2/
Why that behavior:
Well, because the environment around the application keeps changing, we are not that sure that is going to start up well... We don't want to wait for 3 - for example - attemps before SG states it can't run on that node.
On the other hand, once it's up and running, we have processes that can die on us often. It's usually fine to restart them invidually on the same box without disturbing the whole behavior of the app. Moving the app on an alternate node may cause a longer overall downtime - to other client apps. I'd say we need SG for the machine fail over feature only...
Maybe I'll end up coding something like:
start application
if one process missing
exit 1
count=0
while 1
if "one process missing" then
if count > 2 exit 1
else
count++
start application
fi
fi
done
Ugly ? Of course I'd drop -r or -R.
Yes, I'll have a closer look at the Oracle SG scripts.
Thanks everyone again.