Operating System - HP-UX
1823064 Members
3079 Online
109645 Solutions
New Discussion юеВ

Starting 3 tier application servers in particular order

 
SOLVED
Go to solution
Susan Pellerito
Advisor

Starting 3 tier application servers in particular order

Has anyone come up with a way to have servers come up in a particular order, say, the dbase server before the application server? All running on HP-UX. Even better would be a way to determine if a particular process is running on server A prior to starting a particular process on servers B or C.
4 REPLIES 4
James George_1
Trusted Contributor

Re: Starting 3 tier application servers in particular order

Hi

when you shut down, first shutdown the app servers and then the DB servers. when you bring it up, bring up the the DB servers first so that the app servers can connect to the DB servers when they come up .

rgds/ James
forum is for techies .....heaven is for those who are born again !!
Steven E. Protter
Exalted Contributor
Solution

Re: Starting 3 tier application servers in particular order

Shalom Susan,

Yes.

First I set up password free ssh access using HP-UX Secure Shell (port of openssh) so that the root user on all systems can do this:

ssh systemname command

Without a password.

In the /sbin/init.d/startupscript

For the critical application the following loop needs to be there(incomplete code)

while true
do
ssh systemname command
#command gets information that proves the application is running on the other server. command example $runing=$(ps -ef | grep oraapp |wc -1) if the number returned is 1 we're go mission.
if (condition is met)
then
exit;
else
sleep 60
fi

done

# start the application here

Crude, likely to introduce slower startup, but brutally effective when tested.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Susan Pellerito
Advisor

Re: Starting 3 tier application servers in particular order

Thank you Steven. That is an excellent idea. You are correct that it may slow up some startup but at least it will brought up with the apps ready for end users.
Raj D.
Honored Contributor

Re: Starting 3 tier application servers in particular order

Also make sure you have same ssh client installed in all the server, that is either FSecure ssh or Hp Secure Shell. Check # man ssh-keygen to setup ssh key,

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "