AnsweredAssumed Answered

LUA won't restart my web server running on Solaris x86 i.e. the restart is using putty and plink method

Question asked by hthai on Oct 9, 2008
Latest reply on Nov 20, 2008 by hthai
Hi,

I wrote a Restart-PWSDS1_2.bat file that lives on the hub.  This batch file contains a line

""D:\Program Files\Putty\plink.exe" -i D:\WIT\jobs\wit\.ssh2\nanimbus5-rsa-key-1024-20080513-x86.ppk -batch aiadm@ds6 /www/PWSDS1_2/BOUNCESERVER &"

This line is basically using plink to login into my remote server 'ds6' (an x86 host that runs on Solaris 10) then executes the bounceserver script to restart my web server. 

I could run Restart-PWSDS1_2.bat directly on the localhost where the hub resides.  My remote web server was restarted successfully.  Afterward, I added the below to my nas->Script->Restart-PWSDS1_2

ret = os.execute("D:\\WIT\\Commands\\Restart\\Restart-PWSDS1_2.bat")
if (ret == 0) then
nimbus.alarm (1,"Restarted server PWSDS1_2 ... SUCCESS")
print ("Success")
else
nimbus.alarm (5,"Restarted server PWSDS1_2 ... FAILURE!")
print ("Failed")
end

I ran the script via the nas->Scripts->Restart-PWSDS1_2->right click (Run).  A 'Success' message appeared after I ran it, but when I checked my remote web server, it did not get restarted and the timestamp of the WS pid also validated that.

I also send the output of the Restart-PWSDS1_2.bat to a log file.  This log got the latest info that running the script Restart-PWSDS1_2 in the nas did make the call to the Restart-PWSDS1_2.bat, but the remote web server was not restarted at all.

Let me know if you need more info to help me with this one. 

Thanks,
Hoang

Outcomes