0

I am using Glassfish v3.0.1 for my project. However, Glassfish seems to be down many times. Therefore, I want to develop a mechanism that notifies me whenever Glassfish is down. Is there any option in Glassfish? If not, how can I achieve this? Further, how can I understand why Glassfish goes down? I cannot find proper explanations in logs.

iso_9001_
  • 2,655
  • 6
  • 31
  • 47

1 Answers1

2

I'm not aware of any options in Glassfish itself and I doubt there are any (it's usually hard for a process to know when it's dead :-). Write a script that tries to connect to the service (for example, using wget or curl) or use a system monitoring tool that watches processes.

To find out why Glassfish terminates, you must debug the problem. Here are some tipps:

  • Add/enable more logging
  • Search the source code for System.exit(). This can terminate an Java app without any trace of why it happens. (this might help, too)
  • Check the standard output of the process
  • Look for crash dumps; see the documentation of the Java VM which you're using.
Community
  • 1
  • 1
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • Thank you Mr. Aaron. I will write a script to check whether the service is down. It seems the best and easier way. – iso_9001_ Jan 29 '13 at 08:50