ActiveMQ
  1. ActiveMQ
  2. AMQ-3747

Syntax errors are not showing up in the log when the broker is started in the background

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.6.0
    • Component/s: Broker
    • Labels:
      None

      Description

      Issue:
      When there is a simple syntax error in the configuration file, e.g.:

      <policyEntry queue="MY.INPUTQ" producerFlowControl="true" memoryLimit="50mb">
                 <pendingQueuePolicy>
                       <vmQueueCursor/>
                 </pendingQueuePolicy>
      </policyEntry>
                 <pendingQueuePolicy>     <=== This is incorrect as it isn't associated with policy entry
                        <vmQueueCursor/>
                 </pendingQueuePolicy>
                      </policyEntry>

      When I start the broker in the foreground, broker console, I see loads of SAX parser errors. None of these are in the log. If I start the broker in the background, broker start, nothing shows up in the log. Can we fix this up so syntax errors go to the log?

      Problem:
      The background start script redirects to dev/null so console output is lost intentionally. Otherwise the default console logging would fill up system logs.
      However there is no other indication of a parse error of the xml configuration apart from the exception printed to the console.

      Solution:
      The error should also go to the default log so it needs to be trapped at source and logged there before being propagated back to the command line caller.

        Issue Links

          Activity

          Gary Tully created issue -
          Timothy Bish made changes -
          Field Original Value New Value
          Link This issue is duplicated by AMQ-2920 [ AMQ-2920 ]
          Hide
          Timothy Bish added a comment -

          Thought I had seen something like this before, looks like the same issue.

          Show
          Timothy Bish added a comment - Thought I had seen something like this before, looks like the same issue.
          Gary Tully committed 1295138 (1 file)
          Reviews: none

          https://issues.apache.org/jira/browse/AMQ-3747 - Syntax errors are not showing up in the log when the broker is started in the background. fix by logging a fatalbeanexception on context creation before rethrow

          Hide
          Gary Tully added a comment -

          fatalbean exceptions are now trapped and logged before being rethrown

          Show
          Gary Tully added a comment - fatalbean exceptions are now trapped and logged before being rethrown
          Gary Tully made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Gary Tully
              Reporter:
              Gary Tully
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development