JBoss Specific Logging Is Showing Up In Garbage Collection Logging.

Solution Verified - Updated -

Environment

JBoss Enterprise Application Platform

  • 6.0

Issue

  • Logging from JBoss boot and server logs is showing up in garbage collection (GC) logging.

Resolution

  • Resolution varies. See diagnostic steps. In this particular case customer was inadvertently redirecting output to GC logging.

Root Cause

  • See diagnostic steps. In this particular case, customer was inadvertently redirecting output to GC logging.
./standalone.sh "$PROPERTIES" >&- 2>&- &

The standalone.sh stdin/stdout/stderr file descriptors are inherited by the JVM process it runs. The first file to be opened by the process is assigned the first empty file descriptor, which happens to be the same # used by stdout. So anything written to stdout will go into that file instead (gc.log in this case, if gc.log wasn't enabled it would be something else). So >&- or 2>&- should definitely not be used by any process that actually writes anything to stdout or stderr. Customer switched to the following, which resolved their particular issue:

./standalone.sh "$PROPERTIES" >/dev/null 2>&1 &

Diagnostic Steps

Obtain the following:

  • .conf file (i.e., standalone.conf, domain.conf): check JVM options.
  • server configuration file (i.e., standalone*.xml, domain.xml): check logging subsystem configuration
  • logging.properties: check logging configuration (this file controls boot.log)
  • startup command: see how customer is starting jboss instance

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments