|
From: Oded B. <Ode...@in...> - 2004-05-16 14:19:25
|
Leif, Because it looked like the service wrapper won't work, I turned to look = at weblogic documentation, for how to install weblogic as a NT Service. It seems that they have a solution that should work with the Service = Wrapper as well, and that is to create a simple Static Java Class that = will shutdown the server, connecting through JMX, more can be found at = http://e-docs.bea.com/wls/docs81/adminguide/winservice.html I haven't had the time to try that, but when I will do that, I will = write again to this mailing list. Thanks for your responses. Cheers, Oded -----Original Message----- From: wra...@li... [mailto:wra...@li...]On Behalf Of Leif Mortenson Sent: Thu, May 13, 2004 10:08 PM To: wra...@li... Subject: Re: [Wrapper-user] Graceful shutdown problem. Oded, Just got back from a week backpacking in the Grand Canyon, so sorry=20 for the slow response. (Not too sorry though. I needed the time away :-) Thanks for the debug log. It looks like everything is working=20 correctly as far as the Wrapper is concerned. The Wrapper process is sending a stop = command to the JVM which causes all registered shutdown hooks to be executed. The only place that that security error could be coming from is a=20 shutdown hook registered by your application or WebLogic. The Wrapper would not be calling it directly so I don't think the special permissions are even = necessary. There is a permission that make sure that only privileged code calls = System.exit. But the individual shutdown hooks are called by the JVM which is = privileged. That message does not look like a standard security exception=20 however so you may have to ask the WebLogic guys for some ideas. I am interested in=20 finding out the end solution as I am sure you are not the only one wanting to=20 use WebLogic with the Wrapper. Cheers, Leif Oded Blayer wrote: >Leif, >Thanks for your response. >I tried to grant the wrapper jar permissions, by simply granting all = permisions to everybody, my weblogic.policy file looks like that: >grant { > permission java.security.AllPermission; >}; > >The result was the same, and the wrapper log with DEBUG looks like = that: > >DEBUG | wrapperp | 2004/05/02 11:41:31 | send a packet PING : ping >INFO | jvm 1 | 2004/05/02 11:41:31 | Received a packet PING : ping >INFO | jvm 1 | 2004/05/02 11:41:31 | Send a packet PING : ok >DEBUG | wrapperp | 2004/05/02 11:41:31 | read a packet PING : ok >DEBUG | wrapper | 2004/05/02 11:41:31 | Got ping response from JVM >STATUS | wrapper | 2004/05/02 11:41:31 | CTRL-C trapped. Shutting = down. >DEBUG | wrapper | 2004/05/02 11:41:31 | wrapperStopProcess(0) called. >INFO | jvm 1 | 2004/05/02 11:41:31 | Got Control Signal 0->200 >INFO | jvm 1 | 2004/05/02 11:41:31 | Handled signal >INFO | jvm 1 | 2004/05/02 11:41:31 | Processing control = event(WRAPPER_CTRL_C_EVENT) >INFO | jvm 1 | 2004/05/02 11:41:31 | WrapperStartStopApp: = controlEvent(200) Stopping >INFO | jvm 1 | 2004/05/02 11:41:31 | WrapperManager.stop(0) called = by thread: Wrapper-Control-Event-Monitor >INFO | jvm 1 | 2004/05/02 11:41:31 | Send a packet STOP : 0 >DEBUG | wrapperp | 2004/05/02 11:41:31 | read a packet STOP : 0 >DEBUG | wrapper | 2004/05/02 11:41:31 | JVM requested a shutdown. (0) >DEBUG | wrapper | 2004/05/02 11:41:31 | wrapperStopProcess(0) called. = (IGNORED) >DEBUG | wrapper | 2004/05/02 11:41:31 | Sending stop signal to JVM >DEBUG | wrapperp | 2004/05/02 11:41:31 | send a packet STOP : NULL >INFO | jvm 1 | 2004/05/02 11:41:31 | Received a packet STOP :=20 >INFO | jvm 1 | 2004/05/02 11:41:32 | Thread, = Wrapper-Control-Event-Monitor, handling the shutdown process. >INFO | jvm 1 | 2004/05/02 11:41:32 | calling listener.stop() >INFO | jvm 1 | 2004/05/02 11:41:32 | WrapperStartStopApp: stop(0) >INFO | jvm 1 | 2004/05/02 11:41:32 | WrapperStartStopApp: invoking = stop main method >INFO | jvm 1 | 2004/05/02 11:41:32 |=20 >INFO | jvm 1 | 2004/05/02 11:41:32 | Graceful shutdown command = issued to the server "EMSServer". This command might take time since the = server waits for inflight work to finish before shutdown. If you wish to = ignore inflight work please use FORCESHUTDOWN command to override = inflight work and shutdown the server ... >INFO | jvm 1 | 2004/05/02 11:41:32 | Error: Access not allowed for = subject: principals=3D[], on ResourceType: ServerRuntime Action: = execute, Target: shutdown. >INFO | jvm 1 | 2004/05/02 11:41:32 | Wrapper Manager: ShutdownHook = started >INFO | jvm 1 | 2004/05/02 11:41:32 | WrapperManager.stop(0) called = by thread: Wrapper-Shutdown-Hook >ERROR | wrapper | 2004/05/02 11:41:34 | JVM exited unexpectedly while = stopping the application. >STATUS | wrapper | 2004/05/02 11:41:34 | <-- Wrapper Stopped > >About the weblogic calling halt, this is very possible, since weblogic = should wait for all of the resources to be closed. >Do the wrapper have problems with halt calls? >Do you have any other idea of what can be the problem? > >Thanks, >Oded. > >-----Original Message----- >From: wra...@li... >[mailto:wra...@li...]On Behalf Of Leif >Mortenson >Sent: Thu, April 29, 2004 7:04 PM >To: wra...@li... >Subject: Re: [Wrapper-user] Graceful shutdown problem. > > >Oded, >The access violation is probably being caused by a SecurityManager(??) = >If that is the >case then you will need to give wrapper.jar full privileges in your=20 >policy file. > >The only reason I could think why you would be getting the unexpected=20 >exit was if >the JVM called Runtime.halt(), or if you have the Wrapper's shutdown = hook >disabled. Is it possible that BEA is calling halt after that access=20 >violation? > >You can try turning on wrapper.debug, but I am not sure if that will=20 >give you >any more info in this case. > >Cheers, >Leif > >Oded Blayer wrote: > > =20 > >>Hi, I have a problem using the Service Wrapper version 3.1 to wrap BEA = >>Weblogic 8.1 on Windows 2K. >>When I hit ^C in order to test the shutdown I get the following lines=20 >>in the wrapper log: >>=20 >>STATUS | wrapper | 2004/04/29 16:42:15 | CTRL-C trapped. Shutting = down. >>INFO | jvm 1 | 2004/04/29 16:42:16 | >>INFO | jvm 1 | 2004/04/29 16:42:16 | Graceful shutdown command=20 >>issued to the server "EMSServer". This command might take time since=20 >>the server waits for inflight work to finish before shutdown. If you=20 >>wish to ignore inflight work please use FORCESHUTDOWN command to=20 >>override inflight work and shutdown the server ... >>INFO | jvm 1 | 2004/04/29 16:42:16 | Error: Access not allowed=20 >>for subject: principals=3D[], on ResourceType: ServerRuntime Action:=20 >>execute, Target: shutdown. >>ERROR | wrapper | 2004/04/29 16:42:18 | JVM exited unexpectedly=20 >>while stopping the application. >>STATUS | wrapper | 2004/04/29 16:42:18 | <-- Wrapper Stopped >>The shutdown part of the wrapper.conf is : >># The first application parameter is the name of the class whose main >># method is to be called when the application is launched. The class >># name is followed by the number of parameters to be passed to its = main >># method. Then comes the actual parameters. >>wrapper.app.parameter.1=3Dweblogic.Server >>wrapper.app.parameter.2=3D0 >>=20 >># The start parameters are followed by the name of the class whose = main >># method is to be called to stop the application. The stop class name >># is followed by a flag which controls whether or not the Wrapper = should >># wait for all non daemon threads to complete before exiting the JVM. >># The flag is followed by the number of parameters to be passed to the >># stop class's main method. Finally comes the actual parameters. >>wrapper.app.parameter.3=3Dweblogic.Admin >>wrapper.app.parameter.4=3Dtrue >>wrapper.app.parameter.5=3D7 >>wrapper.app.parameter.6=3D-url t3://localhost:80 >>wrapper.app.parameter.7=3D-username system >>wrapper.app.parameter.8=3D-password password >>wrapper.app.parameter.9=3DSHUTDOWN >>Have you any idea as to what causes this problem? >>Thanks >>=20 >>Oded Blayer >>od...@in... <mailto:od...@in...> >>=20 >> ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=3D2562&alloc_id=3D6184&op=3Dclick _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |