- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shutdown script spanning more than one server
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
05-02-2006 10:22 AM
05-02-2006 10:22 AM
Re: Shutdown script spanning more than one server
Check to see if the server.pl is actually running on your "boss" server.
RSLT=$(client.pl -P 7777 Resource_1 SET 0)
This will only work is server.pl and client.pl are running on the same host otherwise a "-h boss" argument is required.
Another "gotcha" is that if Test and Production backups ever run simultaneously then you need to choose different ports (e.g. -P 7777 and -P 7778) for Production and Test respectively so that "Resource_1" for Production doesn't interfere with "Resource_1" for Test. If server.pl is run of different hosts then this doesn't matter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 09:32 AM
05-08-2006 09:32 AM
Re: Shutdown script spanning more than one server
Also, the server.pl and client.pl(s) ARE running on the application server with the client.pl(s) also running on the DB server. To ensure which server the client.pl is pointed to I explictly use the -h parameter each time for client.pl.
I am continuing to test this in PRD. Instead of actually issuing the Starts and Stops of the Apps and DBs (bad thing during work hours), I am issuing echos to label where in the scripts the process is at any given time. I am now getting the following series of errors:
titan01:/usr/contrib/bin# control1.sh
control1.sh BEFORE
Socket could not be created. Connection refused
Socket could not be created. Connection refused
LSPRD DATABASE BACKUP complete
CBSPRD DATABASE BACKUP complete
Socket could not be created. Connection refused
Socket could not be created. Connection refused
control1.sh AFTER
titan01:/usr/contrib/bin#
Again, I am wondering if the semaphores are getting set to 0 properly and also HOW I ensure that they are indeed getting set back.
Please indulge me a take a look at my scripts I have uploaded. I the zip file I have my control script, the two application scripts and the two DB scripts.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 10:07 AM
05-08-2006 10:07 AM
Re: Shutdown script spanning more than one server
You should do something like this:
typeset SYNCPORT="omnisync"
typeset SYNCHOST="boss"
typeset -i SSTAT=0
server.pl -h ${SYNCHOST} -p ${SYNCPORT}
SSTAT=${?}
if [[ ${SSTAT} -ne 0 ]]
then
echo "Sema4 server failed to start; status ${SSTAT}" >72
exit ${SSTAT}
fi
I used 7777 merely as an example; you must find an unused port for each instance of server.pl running on a given host. If both your production and test versions are running server.pl on the same host then they must use different port number.
You should also note that both server.pl and client.pl can also use the /etc/services file so that you could use -p omnisync rather than -P 7777 assuming that you have added an "omnisync tcp/7777" entry in /etc/services.
The good news if you successfully start server.pl, you are assured that all the sema4 values and limits are initialized at zero.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 10:17 AM
05-08-2006 10:17 AM
Re: Shutdown script spanning more than one server
titan01:/usr/contrib/bin# netstat -an | grep 7777
titan01:/usr/contrib/bin#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 10:42 AM
05-08-2006 10:42 AM
Re: Shutdown script spanning more than one server
Please, if you would, check my "Resource_x" specifications. Do you see any incompatibities between the control1.sh and applx.sh scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 11:53 AM
05-08-2006 11:53 AM
Re: Shutdown script spanning more than one server
This all works fine in my TST environment. The only thing that's really changed is what am passing in "-h" in various places AND the fact that I split up the DB stops and starts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 05:34 AM
05-10-2006 05:34 AM
Re: Shutdown script spanning more than one server
RSLT1=$(client.pl -h titan01 -P 7777 Resource_1 GET 0)
while [[ ${RSLT1} -lt 2 ]]
echo "CBS STAT1: ${STAT1} RSLT1: ${RSLT1} "
do
sleep 10
echo CBSPRDbackup.sh WAIT
RSLT1=$(client.pl -h titan01 -P 7777 Resource_1 GET 0)
STAT1=${?}
done
CBSPRDbackup.sh WAIT
LSPRDbackup.sh WAIT
LS STAT1: 0 RSLT1: 2
CBS STAT1: 0 RSLT1: 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 08:27 AM
05-10-2006 08:27 AM
Re: Shutdown script spanning more than one server
RSLT1=$(client.pl -h titan01 -P 7777 Resource_1 GET 0)
while [[ ${RSLT1} -lt 2 ]]
echo "CBS STAT1: ${STAT1} RSLT1: ${RSLT1} "
do
sleep 10
echo CBSPRDbackup.sh WAIT
RSLT1=$(client.pl -h titan01 -P 7777 Resource_1 GET 0)
STAT1=${?}
done
should be something like this:
RSLT1=$(client.pl -h titan01 -P 7777 Resource_1 GET 0)
while [[ ${RSLT1} -lt 2 ]]
do
echo "CBS STAT1: ${STAT1} RSLT1: ${RSLT1} "sleep 10
echo CBSPRDbackup.sh WAIT
RSLT1=$(client.pl -h titan01 -P 7777 Resource_1 GET 0)
STAT1=${?}
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 08:39 AM
05-10-2006 08:39 AM
Re: Shutdown script spanning more than one server
Usuauly I got in situation like this & oracle DBA folks provide apps/DB stop scripts which usually stop apps or DB on clustered or application nodes etc..
Ideas here can be many, but surely need to confine to your need..
I had a EMC snap backup in my setup, wherein we used to run a kshell script, which used to do all stuff like, look for apps is running, db is running on particular host, if yes, call DB /apps script to stop it, then export the snap VG's, do a sync, import it back.. activate VG's. Once backup is done, call same script and start DB etc..it was possible to get the status looking at pmon / or using wget for oracle apps application..
just tried putting as thought it can help somewhere
thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2006 08:49 AM
05-10-2006 08:49 AM
Re: Shutdown script spanning more than one server
I will be testing PRD tonight and let you know how it turns out.
Thank you again for your many excellent replies to my post.
- « Previous
- Next »