Friday 16 December 2011

Where's my log file?

When a GlassFish user reports a problem when using JMS, my first response is usually to ask them to check the log files for errors. However it may not be immediately apparent to a GlassFish user that there are two distinct places they need to check.

The GlassFish "server log" is where normal Glassfish logging is written. In a simple, unclustered, GlassFish installation this can be found in the directory glassfish3/glassfish/domains/domain1/logs under your GlassFish 3 installation, where domain1 is the default "domain name". If you've chosen a domain name other than the default then you'll need to adjust the place you look accordingly.

However there's also a GlassFish Message Queue "broker log". This is a completely separate log which is created by the Glassfish instance's JMS broker. This broker by default runs in the same JVM as the broker instance. However it still creates a separate logfile. This can be found in the directory glassfish3/glassfish/domains/domain1/imq/instances/imqbroker/log. Again you'll need to adjust this if you're using a non-default domain name.

If you're using a GlassFish cluster the situation is a little more complicated. The logfiles described above will still exist but will relate only to the GlassFish server known as the "DAS" or domain admin server. This is typically used for administration purposes and not for deploying applications, so if you have a JMS problem these files are unlikely to be of interest.

Of more interest in a Glassfish cluster are the logfiles of the individual cluster instances. The exact location of these depends on how you've configured your cluster but there'll be separate server logs and broker logs, and once you've found the server log it should be fairly easy to find the corresponding broker log.

2 comments:

  1. Hello Nigel
    I have an issue, I have to see what went wrong with my JMS queue that was connecting two applications on the same machine in two different domains. the server log for the msging server does not log much it only logs when it connects and disconnects. I have a time when the message was sent from one app and the time when the second app received it (in one instance it took 6 seconds and in the other it took like 14 secs) I want to know what went wrong and why was it not delivered in time and what delayed. in between that the JMS perfomed ok and mostly everything went through fine. Is there any way (through broker logs) that I can see if there was an issue.

    Thanks
    Syed

    ReplyDelete
  2. oh this is a very old post and you dont really have any posts.. lol...

    ReplyDelete