|
From: Leif M. <le...@ta...> - 2006-02-23 14:28:36
|
Anat,
Sorry for the delay. wrapper.log.service_normal and wrapper.log.console
are the runs that work correctly right? They both appear to be running and
shutting down correctly.
Both wrapper.log.service_local_logout and wrapper.log.service_vnc_logout
Contain output like the following:
DEBUG | wrapper | 2006/02/14 16:20:45 | Signal trapped. Details:
DEBUG | wrapper | 2006/02/14 16:20:45 | signal number=17 (SIGCHLD),
source="unknown"
DEBUG | wrapper | 2006/02/14 16:20:45 | Received SIGCHLD, calling wait().
DEBUG | wrapper | 2006/02/14 16:20:45 | wait() returned, child process
should be gone.
DEBUG | wrapper | 2006/02/14 16:20:45 | Signal trapped. Details:
DEBUG | wrapper | 2006/02/14 16:20:45 | signal number=17 (SIGCHLD),
source="unknown"
DEBUG | wrapper | 2006/02/14 16:20:45 | Received SIGCHLD, calling wait().
DEBUG | wrapper | 2006/02/14 16:20:45 | wait() returned, child process
should be gone.
DEBUG | wrapperp | 2006/02/14 16:20:45 | socket read no code (closed?).
DEBUG | wrapper | 2006/02/14 16:20:45 | JVM process is gone.
ERROR | wrapper | 2006/02/14 16:20:45 | JVM exited unexpectedly.
The JVM appears to be running along perfectly normally then its process
suddenly terminates. The Wrapper is not shutting it down. It just dies
as if
it crashed or its process was killed with 'kill -9'. The Wrapper is
viewing this
as a crash and attempts to restart the application.
It restarts the Java process successfully, but the application is
throwing
an exception because it is not able to display a window because a display
no longer exists:
INFO | jvm 2 | 2006/02/14 16:20:57 | Caused by:
java.lang.InternalError: Can't connect to X11 window server using
'jupiter.eng.tau.ac.il:8.0' as the value of the DISPLAY variable.
INFO | jvm 2 | 2006/02/14 16:20:57 | at
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
Since this is happening on a restart, I assume that this means that the
original invocation also had a window up? It may be that the window is
system is sending a kill -9 to all processes with windows that do not
shutdown on their own when the Window manager shuts down the display.
I will have to play around with trying to reproduce this. But it
may depend
on the window manager you are using.
I mentioned this before, but add code like the following in your code to
make sure that your application never shows a gui when it is being run as
a daemon / service process:
if ( WrapperManager.isLaunchedAsService() )
{
// Windowless mode
}
else
{
// Show GUI.
}
Cheers,
Leif
Anat Halpern wrote:
> Apparently, sourceforge is blocking zip file attachments, ans also attachment size is
> limited to 40K. So I'll try the zip again (just change the extension).
> --
> Open WebMail Project (http://openwebmail.org)
>
>
> ---------- Original Message -----------
> From: Leif Mortenson <le...@ta...>
> To: wra...@li...
> Sent: Wed, 15 Feb 2006 15:41:45 +0900
> Subject: Re: [Wrapper-user] Linux daemon question
>
>
>> Anat,
>> You forgot to attach the 4 log files. I'll need to see them to
>> give you more help.
>> I was expecting this to be working with 3.2.0.
>>
>> Also see my comments below.
>>
>> Anat Halpern wrote:
>>
>>> Hi Leif,
>>>
>>> Thanks for your response. However, it doesn't seem to be working for
>>> me :'(
>>>
>>> Leif Mortenson wrote:
>>>
>>>> Anat,
>>>> Looking at your log file, this is the cause of the application
>>>> being shut down:
>>>> INFO | jvm 1 | 2006/02/07 16:42:51 | Processing control
>>>> event(WRAPPER_CTRL_SHUTDOWN_EVENT)
>>>>
>>>> There is a bug in 3.1.2 where the JVM is not correctly ignoring
>>>> TERM signals
>>>> even if the IGNORE_SIGNALS flag is set in the sh script. This has
>>>> been fixed
>>>> for the unreleased 3.2.0. Could you please download and try out the
>>>> latest
>>>> snapshot build and verify that this fixes the problem for you?
>>>>
>>>>
>>>> http://wrapper.tanukisoftware.org/tmp/3.1.2-d/wrapper-linux-x86-32-3.2.0-d.tar.gz
>>>>
>>>>
>>>> You will want to use the new sh script and set the IGNORE_SIGNALS
>>>> variable to true in the script.
>>>>
>>> I've tried the new files, with the property set to true, but it still
>>> shutting down when I logout. Attached are 4 logs - for a console run,
>>> and service run which I stopped using <app> stop - those have normal
>>> behavior. The other 2 logs are of service runs during which I logout -
>>> one running remote through VNC, and the other is run locally.
>>>
>>>> Also, from your logs, it looks like there is a GUI being
>>>> displayed? That may
>>>> why your JVM is getting the TERM signals in the first place.
>>>>
>>> Could you explain about that?
>>>
>> I saw references to the "AgentFrame" class in your wrapper.log. I assumed
>> that this was referring to a GUI Frame.
>>
>>>> In general, daemon
>>>> processes don't have GUIs. You should add a call to
>>>> WrapperManager.isLaunchedAsService() This method will return true if
>>>> the
>>>> Wrapper is running as a daemon process. Only show your GUI if it is
>>>> false.
>>>> If you don't want to add a dependency to the wrapper API, look for the
>>>> "wrapper.service" system property.
>>>>
>>> I'm not actually showing the GUI, it's hidden when in service mode -
>>> it's just a temporary (messy) solution before I remove the GUI. Is
>>> there a problem with that?
>>>
>> If it is not being shown, that should be fine. I was thinking that that
>> might be
>> the reason why you were getting the TERM signal.
>>
> It's hidden. I just don't understand should be the reason for the signal - sorry for the
> ignorance...
>
>> Cheers,
>> Leif
>>
>>
> ------- End of Original Message -------
>
> Thanks,
> Anat
>
>
|