|
From: art a <art...@ya...> - 2005-04-15 02:34:37
|
Hello.
I am trying to use the Wrapper to run my AdventNet
WebNMS application as service on Windows machines. I
am using integration method 2 for this.
Starting and stopping the service from a batch file or
from Windows Services manager works correctly but I am
having problem stopping the service when the machine
is shutdown.
Advennet is using com.adventnet.nms.startnms.NmsMainBE
class to start the server and
com.adventnet.nms.util.StandAloneShutDown to stop.
It looks like that these two classes are merely
invoking other components of the WebNMS server and
when the machine is shutdown the class
StandAloneShutDown returns immediately without waiting
for the invoked processes to completely terminate.
Are there any configuration properties to set to tell
the wrapper to sleep for a few seconds while waiting
for other processes to stop to avoid windows from
rebooting right away?
Also when starting the server, the service is already
marked "Started" eventhough the server is not yet
ready to take client connections. Is there a way to
make wrapper wait a little longer, until the all
server components are properly initialized, before
reporting the STARTED status?
Can this be resolved if i implement integration method
3 and use a classloader to manually load NmsMainBE and
StandAloneShutDown classes?
Below is the log data when machine is shutdown;
===================
DEBUG | wrapperp | 2005/04/14 18:08:38 | send a
packet PING : ping
INFO | jvm 1 | 2005/04/14 18:08:39 | Received a
packet PING : ping
INFO | jvm 1 | 2005/04/14 18:08:39 | Send a
packet PING : ok
DEBUG | wrapperp | 2005/04/14 18:08:39 | read a
packet PING : ok
DEBUG | wrapper | 2005/04/14 18:08:39 | Got ping
response from JVM
INFO | wrapper | 2005/04/14 18:08:39 | User logged
out. Ignored.
INFO | jvm 1 | 2005/04/14 18:08:39 | Got Control
Signal 5->202
INFO | jvm 1 | 2005/04/14 18:08:39 | Handled
signal
INFO | jvm 1 | 2005/04/14 18:08:39 | Processing
control event(WRAPPER_CTRL_LOGOFF_EVENT)
DEBUG | wrapperp | 2005/04/14 18:08:43 | send a
packet PING : ping
INFO | jvm 1 | 2005/04/14 18:08:43 | Received a
packet PING : ping
INFO | jvm 1 | 2005/04/14 18:08:43 | Send a
packet PING : ok
DEBUG | wrapperp | 2005/04/14 18:08:43 | read a
packet PING : ok
DEBUG | wrapper | 2005/04/14 18:08:43 | Got ping
response from JVM
INFO | wrapper | 2005/04/14 18:08:44 | User logged
out. Ignored.
INFO | jvm 1 | 2005/04/14 18:08:44 | Got Control
Signal 5->202
INFO | jvm 1 | 2005/04/14 18:08:44 | Handled
signal
INFO | jvm 1 | 2005/04/14 18:08:44 | Processing
control event(WRAPPER_CTRL_LOGOFF_EVENT)
STATUS | wrapper | 2005/04/14 18:08:46 | Machine is
shutting down.
DEBUG | wrapper | 2005/04/14 18:08:46 |
wrapperStopProcess(0) called.
INFO | jvm 1 | 2005/04/14 18:08:46 | Got Control
Signal 6->203
INFO | jvm 1 | 2005/04/14 18:08:46 | Handled
signal
INFO | jvm 1 | 2005/04/14 18:08:46 | Processing
control event(WRAPPER_CTRL_SHUTDOWN_EVENT)
INFO | jvm 1 | 2005/04/14 18:08:46 |
WrapperManager.stop(0) called by thread:
Wrapper-Control-Event-Monitor
INFO | jvm 1 | 2005/04/14 18:08:46 | Send a
packet STOP : 0
DEBUG | wrapperp | 2005/04/14 18:08:46 | read a
packet STOP : 0
DEBUG | wrapper | 2005/04/14 18:08:46 | JVM
requested a shutdown. (0)
DEBUG | wrapper | 2005/04/14 18:08:46 |
wrapperStopProcess(0) called. (IGNORED)
DEBUG | wrapper | 2005/04/14 18:08:46 | Sending stop
signal to JVM
DEBUG | wrapperp | 2005/04/14 18:08:46 | send a
packet STOP : NULL
INFO | jvm 1 | 2005/04/14 18:08:47 | Received a
packet STOP :
INFO | jvm 1 | 2005/04/14 18:08:47 | Thread,
Wrapper-Control-Event-Monitor, handling the shutdown
process.
INFO | jvm 1 | 2005/04/14 18:08:47 | calling
listener.stop()
INFO | jvm 1 | 2005/04/14 18:08:48 |
INFO | jvm 1 | 2005/04/14 18:08:48 |
INFO | jvm 1 | 2005/04/14 18:08:48 | Trying to
shut down KM-NET VIEWER Web Edition Server
================================
At this point other processes didn't get a chance to
stop their tasks gracefully.
This is how a successful shutdown looks like:
================================
INFO | jvm 1 | 2005/04/14 18:01:08 | Received a
packet PING : ping
INFO | jvm 1 | 2005/04/14 18:01:08 | Send a
packet PING : ok
DEBUG | wrapperp | 2005/04/14 18:01:08 | read a
packet PING : ok
DEBUG | wrapper | 2005/04/14 18:01:08 | Got ping
response from JVM
DEBUG | wrapper | 2005/04/14 18:01:09 | Working
directory set to: ../
STATUS | wrapper | 2005/04/14 18:01:09 | Stopping the
KM-NET VIEWER Web Edition 2 service...
DEBUG | wrapper | 2005/04/14 18:01:09 |
ServiceControlHandler(1)
DEBUG | wrapper | 2005/04/14 18:01:09 |
SERVICE_CONTROL_STOP
DEBUG | wrapper | 2005/04/14 18:01:09 |
wrapperStopProcess(0) called.
DEBUG | wrapper | 2005/04/14 18:01:09 | Sending stop
signal to JVM
DEBUG | wrapperp | 2005/04/14 18:01:09 | send a
packet STOP : NULL
INFO | jvm 1 | 2005/04/14 18:01:09 | Received a
packet STOP :
INFO | jvm 1 | 2005/04/14 18:01:09 | Thread,
Wrapper-Connection, handling the shutdown process.
INFO | jvm 1 | 2005/04/14 18:01:09 | calling
listener.stop()
INFO | jvm 1 | 2005/04/14 18:01:09 |
INFO | jvm 1 | 2005/04/14 18:01:09 |
INFO | jvm 1 | 2005/04/14 18:01:09 | Trying to
shut down KM-NET VIEWER Web Edition Server
INFO | wrapper | 2005/04/14 18:01:14 | Waiting to
stop...
INFO | wrapper | 2005/04/14 18:01:19 | Waiting to
stop...
INFO | wrapper | 2005/04/14 18:01:24 | Waiting to
stop...
INFO | jvm 1 | 2005/04/14 18:01:24 |
INFO | jvm 1 | 2005/04/14 18:01:24 | Schedulers
Stopped successfully
INFO | jvm 1 | 2005/04/14 18:01:24 |
INFO | jvm 1 | 2005/04/14 18:01:24 | All Shut
Down Observers Notified
INFO | jvm 1 | 2005/04/14 18:01:24 |
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
NmsSAServerFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
ExampleFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
UserConfigProcessFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
PolicyFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
ConfigFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
TopoFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
PollFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
AlertFE
INFO | jvm 1 | 2005/04/14 18:01:24 |
[ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
EventFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
MapFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
AuthorizationManagerFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
AuthenticationManagerFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
MServerFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
SAServerFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
AutoStartPolicy [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
LoadEmailSettings [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
CommunicationProcess [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
AdminModuleInit [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
NmsSUM [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
UserConfigProcess [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
DBUserStorageServer [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
NmsConfigurationServer [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
ProcessTest [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
WebNMSBackUp [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
NmsMainFE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
NmsPolicyMgr [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:24 | Process :
EventMgr
INFO | jvm 1 | 2005/04/14 18:01:25 |
[ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:25 | Process :
Collector [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:25 | Process :
MapServerBE [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:25 | Process :
NmsAuthenticationManager [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:25 | Process :
NmsAuthManager [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:25 | Process :
NMSMServer
INFO | jvm 1 | 2005/04/14 18:01:26 |
[ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:26 | Process :
NMSSAServer [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:26 | Process :
DBServer [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:26 | Process :
RunJSPModule [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:26 | Process :
RunApacheExeModule [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:26 | Process :
RunRmiRegistry [ Stopped ]
INFO | jvm 1 | 2005/04/14 18:01:26 |
INFO | jvm 1 | 2005/04/14 18:01:26 | All Database
connections disconnected
INFO | jvm 1 | 2005/04/14 18:01:26 |
INFO | jvm 1 | 2005/04/14 18:01:26 | KM-NET
VIEWER Web Edition Server Successfully Shut Down
INFO | jvm 1 | 2005/04/14 18:01:26 | Wrapper
Manager: ShutdownHook started
INFO | jvm 1 | 2005/04/14 18:01:26 |
WrapperManager.stop(0) called by thread:
Wrapper-Shutdown-Hook
INFO | jvm 1 | 2005/04/14 18:01:26 | Thread,
Wrapper-Shutdown-Hook, waiting for the JVM to exit.
INFO | wrapper | 2005/04/14 18:01:29 | Waiting to
stop...
INFO | jvm 1 | 2005/04/14 18:01:31 | Thread,
Wrapper-Shutdown-Hook, continuing after 5 seconds.
INFO | jvm 1 | 2005/04/14 18:01:31 | Wrapper
Manager: ShutdownHook complete
DEBUG | wrapper | 2005/04/14 18:01:31 | JVM process
exited with a code of 0, leaving the wrapper exit code
set to 0.
ERROR | wrapper | 2005/04/14 18:01:31 | JVM exited
unexpectedly while stopping the application.
STATUS | wrapper | 2005/04/14 18:01:32 | <-- Wrapper
Stopped
STATUS | wrapper | 2005/04/14 18:01:33 | KM-NET
VIEWER Web Edition 2 stopped.
================================
Thank you.
Art
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
|