Menu

#47 Error message on JVM exit.

v3.1.0
closed
5
2004-07-21
2004-05-01
No

I am not sure if this is a wrapper's bug, but looks that
way. I have JOnAS app server (3.3.1) configured with
the Wrapper. It works generally fine. On exit it actually
does everything right, but after the server finished I see
the following messages in the wrapper log file:

DEBUG | wrapper | 2004/04/29 20:23:57 | JVM process
exited with a code of 0, leaving the wrapper exit code
set to 0.
ERROR | wrapper | 2004/04/29 20:23:57 | JVM exited
unexpectedly while stopping the application.

I checked, that the exit command is right, and JOnAS
exists without problems, but Wrapper still logs it. Can it
be because JOnAS calls System.exit(0) when stopping?

Discussion

  • Leif Mortenson

    Leif Mortenson - 2004-05-15
    • assigned_to: nobody --> mortenson
     
  • Leif Mortenson

    Leif Mortenson - 2004-05-15

    Logged In: YES
    user_id=228081

    Alexei,
    That will happen if the JVM exit using halt or if shutdown
    hooks are disabled. Could you please attach a full
    wrapper.log file with debug enabled. I would like to see
    this is in a little more context.

    Thanks,
    Leif

     
  • Leif Mortenson

    Leif Mortenson - 2004-06-17

    Logged In: YES
    user_id=228081

    Alexi,
    I just thought, what integration method are you using? If
    you are using method #3, then the call to
    WrapperListener.stop is expected to return. If it does not
    then you will get that exact message. As it mentions in the
    javadocs for that method, if you call
    WrapperManager.stopped() before calling System.exit, you can
    avoid this message.

    It would be clear whether or not this is the problem if I
    could see the debug output.

    Cheers,
    Leif

     
  • Alexei Novakov

    Alexei Novakov - 2004-06-17

    Logged In: YES
    user_id=618032

    Sorry, I missed your questions. I'll attach wrapper configuration file
    and debug output so that you could see my configuration. I am using
    WrapperStartStopApp as integration method. I have not tried your
    new app jars yet - will report as soon as done.

     
  • Alexei Novakov

    Alexei Novakov - 2004-06-17

    Wrapper Configuration file

     
  • Alexei Novakov

    Alexei Novakov - 2004-06-17

    DEBUG loag output

     
  • Leif Mortenson

    Leif Mortenson - 2004-07-21

    Logged In: YES
    user_id=228081

    Alexei,
    Sorry, I missed you last post. From your log file, it does
    indeed look like you are probably calling System.exit from
    within the WrapperListener.stop method. The javadocs for
    that method specifically say that it is expected to return
    and what to do if it is not possible to return. You can
    resolve this problem by making a call to
    WrapperManager.stopped() within that method. This tells the
    Wrapper that the JVM has completed its shutdown. The
    Wrapper will still wait for the wrapper.exit.timeout period
    for the JVM process to exit.

    Please reopen this issue if you are still experiencing problems.

    Cheers,
    Leif

     
  • Leif Mortenson

    Leif Mortenson - 2004-07-21
    • status: open --> closed
     
  • Nobody/Anonymous

    Logged In: NO

    I still see this issue with wrapper version 3.1.2

     
  • Nobody/Anonymous

    Logged In: NO

    Here is the log information:

    INFO | jvm 1 | 2006/02/14 18:37:46 |
    WrapperManager.stop(0) called by thread:
    WrapperStartStopAppMain
    INFO | jvm 1 | 2006/02/14 18:37:46 | Thread,
    WrapperStartStopAppMain, waiting for the JVM to exit.
    INFO | jvm 1 | 2006/02/14 18:37:46 | Wrapper Manager:
    ShutdownHook started
    INFO | jvm 1 | 2006/02/14 18:37:46 |
    WrapperManager.stop(0) called by thread: Wrapper-Shutdown-
    Hook
    INFO | jvm 1 | 2006/02/14 18:37:46 | Thread, Wrapper-
    Shutdown-Hook, waiting for the JVM to exit.
    INFO | jvm 1 | 2006/02/14 18:37:47 |
    WrapperStartStopApp: stopping. Waiting for 3 threads to
    complete.
    INFO | jvm 1 | 2006/02/14 18:37:48 |
    WrapperStartStopApp: stopping. Waiting for 3 threads to
    complete.
    INFO | jvm 1 | 2006/02/14 18:37:49 |
    WrapperStartStopApp: stopping. Waiting for 3 threads to
    complete.
    INFO | jvm 1 | 2006/02/14 18:37:50 |
    WrapperStartStopApp: stopping. Waiting for 3 threads to
    complete.
    INFO | jvm 1 | 2006/02/14 18:37:51 |
    WrapperStartStopApp: stopping. Waiting for 3 threads to
    complete.
    INFO | jvm 1 | 2006/02/14 18:37:52 |
    WrapperStartStopApp: stopping. Waiting for 3 threads to
    complete.
    INFO | jvm 1 | 2006/02/14 18:37:52 | Thread, Wrapper-
    Shutdown-Hook, continuing after 5 seconds.
    INFO | jvm 1 | 2006/02/14 18:37:52 | Wrapper Manager:
    ShutdownHook complete
    DEBUG | wrapperp | 2006/02/14 18:37:52 | socket read no
    code (closed?).
    DEBUG | wrapper | 2006/02/14 18:37:52 | JVM process
    exited with a code of 0, leaving the wrapper exit code set
    to 0.
    ERROR | wrapper | 2006/02/14 18:37:52 | JVM exited
    unexpectedly while stopping the application.
    STATUS | wrapper | 2006/02/14 18:37:52 | <-- Wrapper
    Stopped

     
  • Nobody/Anonymous

    Logged In: NO

    I saw this bug get closed, does anyone know which version
    of wrapper fixed this problem?

     
  • Leif Mortenson

    Leif Mortenson - 2006-02-15

    Logged In: YES
    user_id=228081

    The issue you are seeing is a little different than the
    problem that Alexei was originally asking about. The
    Wrapper will get into the state you are seeing if the user
    code calls System.exit from within the WrapperListener.stop
    method. Ie, from within your stop class's main method.
    That method should simply be returning when it is complete.
    If the System.exit is being called within binary code, this
    can not always be controlled.

    To resolve this for you, I made some changes to the Wrapper
    for the 3.2.0 release so the wrapper will now shut down
    cleanly in this case.

    Cheers,
    Leif

     
  • Nobody/Anonymous

    Logged In: NO

    Thank you so much for the response.
    I will fix my stop class's main method and try it again to
    see if it works. By the way, where can I get the latest
    release 3.2.0?

    Jiming

     
  • Johannes Nicolai

    Could you also do not display this error message if another thread calls System.exit in this time frame? I have as situation where my stopping class has to run its clean up code in various threads where one of these threads eventually calls System.exit and I get this error message.

     
  • Leif Mortenson

    Leif Mortenson - 2008-12-16

    Jonico,
    Which version of the Wrapper are you using? We tried to clean this up in 3.2.0. If you are using 3.2.0 or newer, could you please enable wrapper.debug=true and then upload the resulting wrapper.log file showing this problem?

    Thanks,
    Leif

     

Log in to post a comment.

MongoDB Logo MongoDB