7 Replies Latest reply on May 16, 2008 9:32 AM by Roel VZ

    JBoss restarts without shutting down

    Roel VZ Newbie

      I am using Jboss 4.0.5 GA

      I have a very strange behavior of JBoss which I can see in my logfiles:

      First, JBoss is running fine. No exceptions, no problems. Suddenly (only a few miliseoncs after everything was still fine) I see logging that the server is starting. There is no logging whatsoever that the server is shutting down. I just get the exact same logging as when the server starts up.

      Does anyone have an idea what could cause this strange behaviour?

        • 1. Re: JBoss restarts without shutting down
          jaikiran pai Master

          Please post the logs. Which Operating system do you use and how do you start JBoss?

          • 2. Re: JBoss restarts without shutting down
            Roel VZ Newbie

            The operating system is Windows XP Professional. I just start jboss using the run.bat with a -c option with the name of our application. The database is SQL Server 2005 and is on a different machine.

            Here are the log files:
            INFO logging: http://www.tronk.be/server.log
            DEBUG logging: http://www.tronk.be/server-debug.log

            In the INFO logging, the moment at which the server 'restarts' is 19:53:08,051
            In the DEBUG logging, this is at 2008-05-14 19:52:57,238

            Thanks for your help!

            • 3. Re: JBoss restarts without shutting down
              jaikiran pai Master

              This is what i see in the debug logs. I have just pasted the relevant logs which show the sequence of events.

              ............ Application specific messages (including the next few lines), indicates that the system has been up for some time.
               ............ The next few log messages show some application specific errors which probably kills and restarts the JBoss server
              2008-05-14 19:52:01,594 WARN [be.tinc.bkw.core.tasks.NTPDaemonCheckSchedulableTask] (be.tinc.bkw.core.tasks.NTPDaemonCheckSchedulableTask.perform(NTPDaemonCheckSchedulableTask.java:62))
              Connection with NTP Daemon dropped
              2008-05-14 19:52:01,594 INFO [be.tinc.bkw.com.ApplicationEventSender] (be.tinc.bkw.com.ApplicationEventSender.send(ApplicationEventSender.java:117))
              Sending Event: ERROR_MESSAGE
              2008-05-14 19:52:01,594 INFO [be.tinc.bkw.com.ApplicationEventSender] (be.tinc.bkw.com.ApplicationEventSender.send(ApplicationEventSender.java:119))
              Connection with NTP Daemon is dropped. Contact a responsible.
              2008-05-14 19:52:57,238 DEBUG [org.jboss.logging.Log4jService] (org.jboss.logging.Log4jService.installSystemAdapters(Log4jService.java:411))
              Installed System.out adapter
              ........................ Server startup logs and finally the server startup completion message
              2008-05-14 19:53:11,395 INFO [org.apache.catalina.startup.Catalina] (org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:94))
              Server startup in 94 ms

              Going by this, looks like there's some application specific error that happens at around 2008-05-14 19:52:01,594 and some code in the application (be.tinc.bkw.com.ApplicationEventSender) probably restarts the server. You might have to look into what's going on in the application that has been deployed on JBoss.

              • 4. Re: JBoss restarts without shutting down
                Roel VZ Newbie

                Thank you, but that does not cause problem. These are indeed application specific log messages but they don't cause a problem. I know because I wrote the code myself. It's just some logging. In fact it happens every minute (system checks NTP deamon every minute and cannot find it, simply because it is not configured). I'm 99% sure that it's not our code that restarts JBoss.

                Is it possible that a shortage of memory causes the 'restart'? Or do you know of any other event that may cause this symptom: no shutdown logging, just startup logging.

                • 5. Re: JBoss restarts without shutting down
                  Roel VZ Newbie

                  I just noticed that, 20 minutes after this happened, I start getting database connection errors. I don't know if that could have anything to do with this problem.

                  • 6. Re: JBoss restarts without shutting down
                    jaikiran pai Master


                    Based on the logs, i can't say what exactly is happening. I have seen posts which complained of JBoss shutting down unexpectedly (because of the way users started the server), but this is probably the first time that i am seeing the server "restarts" silently.

                    Does this happen consistently? Is there a consistent time period after which this happens? I mean after the server has started, does it stay up for X number of minutes before restarting? Is that X minutes, the same always? What application has been deployed on the server? Do you still see the same behaviour with the server, if that application is not deployed?

                    • 7. Re: JBoss restarts without shutting down
                      Roel VZ Newbie

                      All I can say is that it happens very rarely. We've been using JBoss for about 5 months now on 9 pcs and I've seen this happen 4 or 5 times (there may be some that I have missed, but still it doesn't happen very much). So it does not always happen after the same amount of time.

                      I've never seen it happen when the application is not deployed, but off course the application is deployed most of the time.

                      Upgrading to a newer JBoss version is not really an option so I guess I'll just wait and hope it does'nt happen at crucial moments and that people don't complain too much.

                      Thanks for looking at my problem. And if you (or someone else) has some other thoughts, please post it here.