|
From: Leif M. <le...@ta...> - 2004-05-13 19:08:45
|
Oded,
Just got back from a week backpacking in the Grand Canyon, so sorry
for the
slow response. (Not too sorry though. I needed the time away :-)
Thanks for the debug log. It looks like everything is working
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
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
however so you
may have to ask the WebLogic guys for some ideas. I am interested in
finding
out the end solution as I am sure you are not the only one wanting to
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 :
>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 |
>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=[], 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
>policy file.
>
>The only reason I could think why you would be getting the unexpected
>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
>violation?
>
>You can try turning on wrapper.debug, but I am not sure if that will
>give you
>any more info in this case.
>
>Cheers,
>Leif
>
>Oded Blayer wrote:
>
>
>
>>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
>>in the wrapper log:
>>
>>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
>>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/04/29 16:42:16 | Error: Access not allowed
>>for subject: principals=[], on ResourceType: ServerRuntime Action:
>>execute, Target: shutdown.
>>ERROR | wrapper | 2004/04/29 16:42:18 | JVM exited unexpectedly
>>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=weblogic.Server
>>wrapper.app.parameter.2=0
>>
>># 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=weblogic.Admin
>>wrapper.app.parameter.4=true
>>wrapper.app.parameter.5=7
>>wrapper.app.parameter.6=-url t3://localhost:80
>>wrapper.app.parameter.7=-username system
>>wrapper.app.parameter.8=-password password
>>wrapper.app.parameter.9=SHUTDOWN
>>Have you any idea as to what causes this problem?
>>Thanks
>>
>>Oded Blayer
>>od...@in... <mailto:od...@in...>
>>
>>
|