Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24524

[GSS](7.4.z) improve logging subsystem error logging when invalid configuration

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • 7.4.9.GA
    • Logging
    • None
    • False
    • None
    • False

    Description

      If the logging subsystem has some invalid configuration leading to a validation error of the standalone.xml, the root error is hidden because of the logging.properties:

      Example, server had valid configuration and thus a valid logging.properties had been created.

      Then max-backup-index which is invalid as such:

              <subsystem xmlns="urn:jboss:domain:logging:8.0">
      ...
                      <suffix value=".yyyy-MM-dd"/>
      <max-backup-index value="30"></max-backup-index>
                      <append value="true"/>
                  </periodic-rotating-file-handler> 

      server-test-1.log:

      If this configuration is copied to a new location and you try to start, you get:

      Caused by: java.io.FileNotFoundException: /foo/bar/invalid/log/server.log (No such file or directory) 

      Test 2, remove the logging.properties , so that it can be recreated:

      server-test-2.log

      Unable to read the logging configuration from 'file:/tmp/jboss-eap-7.4/standalone/configuration/logging.properties' (java.io.FileNotFoundException: /tmp/jboss-eap-7.4/standalone/configuration/logging.properties (No such file or directory)) 

      Get a valid logging.properties, by starting a different valid standalone*.xml

      server-test-3.log

      Unable to read the logging configuration from 'file:/tmp/jboss-eap-7.4/standalone/configuration/logging.properties' (java.io.FileNotFoundException: /tmp/jboss-eap-7.4/standalone/configuration/logging.properties (No such file or directory))
      ...
      13:41:30,193 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.4.0.GA (WildFly Core 15.0.2.Final-redhat-00001) started in 1651ms - Started 357 of 597 services (359 services are lazy, passive or on-demand)

      Then try to start the invalid standalone.xml again and now we are able to see the real issue:

      OPVDX001: Validation error in standalone.xml -----------------------------------
      |
      |  106:                 <file relative-to="jboss.server.log.dir" path="server.log"/>
      |  107:                 <suffix value=".yyyy-MM-dd"/>
      |  108: <max-backup-index value="30"></max-backup-index>
      |       ^^^^ 'max-backup-index' isn't an allowed element here 

       

      Is there a way to instead of erroring out on the logging.properties, have it error out with the validation issue?

      Attachments

        1. standalone.xml
          29 kB
          Brad Maxwell

        Activity

          People

            chaowan@redhat.com Chao Wang
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: