PDA

View Full Version : How to stop webmethods manually


B Gudi (Unregistered Guest)
05-09-2003, 11:07
how to stop webmethods maually using a script

snanda
05-09-2003, 11:37
If you have started it as a windows service then you can stop the service. If you have started from command prompt in windows use CTRL+c, if you ahve started it from unix use kill -9 with the service ID. You have alway the option open for you to do it from WebMethod admin console if you have access to it.

fredh666
05-09-2003, 21:49
See http://www.wmusers.com/shared/browse.shtml?keys=shutdown&SUBMIT.x=0&SUBMIT.y=0

Steve Grody (Unregistered Guest)
05-12-2003, 12:36
Below is a sample script you could use, such as we do in our backups preservices to shut things down before the backups begin.
The startup script is similar.
The sendmail utility is available on the internet. (Linux comes with it of course)

@echo off
REM #################################################
REM # Name : StopWebMethods.BAT
REM # Purpose: This Script is used to bring various webMethods components for backups.
REM # Run just before backups (Place in Veritas preservices).
REM # Once the backups complete, the StartWebMethods.BAT script needs to run.
REM # Services display names should be consistently named.
REM # Author : Steve Grody 2003-01-30
REM # Maint :
REM #################################################


REM >>>>>>>>>>>>>> Edit these as appropriate <<<<<<<<<<<<<<<
SET wM_DIR=E:\webMethods
SET IS_DIR=%wM_DIR%\IntegrationServer46
SET IS_Svc="webMethods Integration Server"
SET Broker_DIR=%wM_DIR%\Enterprise Server5
SET Broker_Svc="webMethods Enterprise Server Monitor"
SET MIS_DIR=%wM_DIR%\MIS46
SET MIS_Svc="webMethods Mainframe Integration Server"
SET MGR_DIR=%wM_DIR%\ManagerServer
SET MGR_Svc="webMethods Manager Server x.x"

REM >>>>>>>>>>>>>> Please don't edit below <<<<<<<<<<<<<<<<<

REM If an IS exists on this machine, then stop it
if exist "%IS_DIR%\bin\server.exe" (
NET STOP /y %IS_Svc%
IF errorlevel 1 (
echo Error stopping webMethods Integration Server.
sendmail /FROM=Steve_Grody@accessbusinessgroup.com /TO=SendMailEddress.txt /REF=Error Stoping IS service /MESSAGE=SendMailError.txt /HOST=Mail.MailRouter.net
) else (
rem echo Stopped service webMethods Integration Server
)
) else (
echo webMethods Integration Server not found on this machine
)


REM If a Broker Monitor exists on this machine, then stop it (stops brokers)
if exist "%Broker_DIR%\bin\awbrokermon.exe" (
REM %Broker_DIR%\bin\broker_stop -y localhost:9003
NET STOP /y %Broker_Svc%
IF errorlevel 1 (
echo Error stopping webMethods Broker Monitor.
sendmail /FROM=Steve_Grody@accessbusinessgroup.com /TO=SendMailEddress.txt /REF=Error Stoping Broker service /MESSAGE=SendMailError.txt /HOST=Mail.MailRouter.net
) else (
rem echo Stopped service webMethods Broker Monitor
)
) else (
echo webMethods Broker Monitor not found on this machine
)

REM If a Mainframe Server exists on this machine, then stop it
if exist "%MIS_DIR%\mis.exe" (
NET STOP /y %MIS_Svc%
IF errorlevel 1 (
echo Error stopping webMethods Mainframe Server.
sendmail /FROM=Steve_Grody@accessbusinessgroup.com /TO=SendMailEddress.txt /REF=Error Stoping Mainframe service /MESSAGE=SendMailError.txt /HOST=Mail.MailRouter.net
) else (
rem echo Stopped service webMethods Mainframe Server
)
) else (
echo webMethods Mainframe Server not found on this machine
)

REM If a Manager Server exists on this machine, then stop it
if exist "%MGR_DIR%\bin\server.exe" (
NET STOP /y %MGR_Svc%
IF errorlevel 1 (
echo Error stopping webMethods Manager Server. <

dgreen
05-12-2003, 21:53
Steve, this is great. Thanks for sharing.

iandrosov
05-13-2003, 04:15
Just keep in mind that IS is a Java program not C/C++ native NT service! When you Stop native NT service from NT admin Tools Service API gets called and trying to clean up the process best it can! It still depends on programmer implementation how the service interface been programmed but in most case it is ok. IS Java program is simply wraped around NT service shell to run on windows and I think executing Stop service on NT is = to Unix kill -9. This means that your IS server will terminate abroptly without executing a correct shutdown process sequence! The broker (awbroker and awbrokermon) is C program and most likely ok to stop from NT services tool. IS however should be stoped using Admin UI and NT Stop services should be used if IS cannto shutdown correctly to avoid losing data in middle of transactions. Or for admin purpose you can use IS client to call the service similar to wmshutdown package provided in shareware.

thomasmorineaux
07-07-2003, 09:57
Hi,

I have a wM IS running on a windows machine as an application.

I would like to know how to stop the IS using dos scripting. I expected some ./server.bat -stop or something equivalent but I could not find out.

Has anyone had the problem before ?

Thx,

Thomas