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.

No comments:

Post a Comment