Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run a Script on Windows from AIX

Status
Not open for further replies.

khalidaaa

Technical User
Jan 19, 2006
2,323
BH
Hi Guros,

I have an HACMP cluster that is accessed by an application on Windows 2003. There are services on Windows that crash when the Databases moves with the resource group on the HACMP cluster from the primary to the standby node! So with this it becomes useless to have a cluster for this application! There is a script on the windows to start the application's services and another script to stop them!

All i need is to link these scripts with the cluster's application server scripts to start and stop the application on the windows! Can i do that?

Regards,
Khalid
 
I haven't done it with a cluster, but I execute scripts on Windows using Cygwin's OpenSSH Server (using keys for password-less logins)
So all you have to do is
ssh -l administrator win_host '/path/to/a/script'



"If you always do what you've always done, you will always be where you've always been."
 
is it failing due to IP change or something? If that is the case, you may direct the app by DNS rather than IP? That way if the DNS automatically swaps over maybe it will be seamless to the win2k3 app?

Just a shot in the dark..
 
Thanks rzs0502 & ProbablyDown for your comments.

I just have the cygwin on my windows machine! Should I install this on the cluster nodes?

ProbablyDown, Your point is valid and we tried it but the problem is with the application services! one of them just crash even with the usage of the name instead of the IP on the application! it just doesn't like the outage of the IP swap and failover to the other node for some reason!

Regards,
Khalid
 
Salaam AbuBasim,

Nice to have you around in this forum :)

I rememeber we installed the openssh and the openssl together and it workds fine between the LPARs but now i need to connect the the Windows 2003 (LIMSPROD) in order to stop and start the services from the application start/stop scripts!

Would the comercial SSH do that? If so i would recommend that to the management :)

Regards,
Khalid
 
I just got this very nice link regarding setting the ssh to windows!

It is a must to go through:


Now I had the sshd running as indicated by the above link but i still can't access it because i believe that my (XP client) is on Active Directory so while i do that it is asking for the kerberos module or something! I think i'm not being able to be authenticated by the XP client. That's the error message i get:

Code:
# ssh -v khalid@khalidPC                                
OpenSSH_3.8.1p1, OpenSSL 0.9.6m 17 Mar 2004                                     
debug1: Reading configuration data /etc/ssh/ssh_config                          
debug1: Failed dlopen: /usr/krb5/lib/libkrb5.a(libkrb5.a.so): Could not load mod
ule /usr/krb5/lib/libkrb5.a(libkrb5.a.so).                                      
System error: No such file or directory                                         
                                                                                
debug1: Error loading Kerberos, disabling Kerberos auth.                        
debug1: Connecting to s4165 [128.5.3.71] port 22.                                
debug1: connect to address 128.5.3.71 port 22: Connection timed out              
ssh: connect to host khalidPC port 22: Connection timed out

Any idea how to go around that?

Regards,
Khalid
 
Khalid,

Another approach might be to write wrapper scripts for the "start" and "stop" scripts on the Windows box.

The "start" wrapper could touch a file to act as a "running" flag, then run the original "start" script. If the script returns but the flag file still exists, it can restart the script, pausing an appropriate period if necessary.

The "stop" wrapper would then just remove the flag file before calling the original "stop" script.

This could keep the application services running on Windows without the need to communicate with the AIX boxes.

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
Hi Rod,

Yeah i thought of this as well. I had an option to create a script that will continuously ping the windows server and if it didn't have a positive reply, it will wait for 5 mins (to finish the failover) and then it will try to start the services (or ping again and continue to wait).

But I just feel better to have the control from the AIX box in the start/stop application server! coz in the previous option the service on the windows will crash but if i have the control from the cluster then i would cleanly stop it!

Thanks for the comment Rod.

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top