2 Replies Latest reply on Jul 29, 2011 6:52 PM by hibernal

    virtual-server access-log directory configuration

    hibernal Newbie

      I'd like to set up access logging in a virtual host and I'd like to to log to a specific path.   In the schema, it looks like

      access-logType can include a directory element of directoryType, but when I add one, standalone.xml is not longer parsed correctly

      though I do not get an xml error.

       

      To reproduce:

      1)  to a working virtual, add an vanilla access-log element:

       

       

      [root@localhost default-host]# tail access_log.2011-07-28 192.168.100.6 - - [28/Jul/2011:10:19:52 -0700] "GET / HTTP/1.1" 200 2348
      4) Add a directory element

       

      5) expect: access log in /var/log/jboss

      6) get: configuration items in standalone.xml after the directory element are no longer processed.  e.g., boot log suddenly says:

       

      10:26:04,480 INFO  [org.jboss.as.controller] (Controller Boot Thread) Service status report

         New missing/unsatisfied dependencies:

            service jboss.binding.http (missing)

            service jboss.binding.jmx-connector-registry (missing)

            service jboss.binding.jmx-connector-server (missing)

            service jboss.binding.osgi-http (missing)

            service jboss.binding.txn-recovery-environment (missing)

            service jboss.binding.txn-status-manager (missing)

            service jboss.network.management (missing)

       

      But there are no XML proccessing/schema validation errors.

       

      Where have I gone sideways?

        • 1. Re: virtual-server access-log directory configuration
          jaikiran pai Master

          With this configuration:

          <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
              <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>
               <virtual-server name="default-host" enable-welcome-root="true">
                <alias name="localhost" />
                <alias name="example.com" />
                <access-log>
                  <directory></directory>
                </access-log>
              </virtual-server>
          </subsystem>
          <subsystem xmlns="urn:jboss:domain:weld:1.0" />
          </profile>
          

           

           

           

          I get a parsing error at startup:

           

          20:14:29,198 ERROR [stderr] Exception in thread "Controller Boot Thread" java.lang.RuntimeException: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration
          20:14:29,199 ERROR [stderr]     at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:89)
          20:14:29,199 ERROR [stderr]     at java.lang.Thread.run(Thread.java:619)
          20:14:29,199 ERROR [stderr] Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration
          20:14:29,199 ERROR [stderr]     at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:115)
          20:14:29,199 ERROR [stderr]     at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:104)
          20:14:29,199 ERROR [stderr]     at org.jboss.as.server.ServerService.boot(ServerService.java:193)
          20:14:29,200 ERROR [stderr]     at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:83)
          20:14:29,200 ERROR [stderr]     ... 1 more
          20:14:29,200 ERROR [stderr] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[257,9]
          20:14:29,200 ERROR [stderr] Message: Unexpected element '{urn:jboss:domain:weld:1.0}subsystem' encountered
          20:14:29,200 ERROR [stderr]     at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:65)
          20:14:29,200 ERROR [stderr]     at org.jboss.as.controller.parsing.ParseUtils.nextElement(ParseUtils.java:54)
          20:14:29,201 ERROR [stderr]     at org.jboss.as.controller.parsing.StandaloneXml.readServerElement(StandaloneXml.java:164)
          20:14:29,201 ERROR [stderr]     at org.jboss.as.controller.parsing.StandaloneXml.readElement(StandaloneXml.java:91)
          20:14:29,201 ERROR [stderr]     at org.jboss.as.controller.parsing.StandaloneXml.readElement(StandaloneXml.java:79)
          20:14:29,201 ERROR [stderr]     at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:100)
          20:14:29,201 ERROR [stderr]     at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59)
          20:14:29,201 ERROR [stderr]     at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:107)
          20:14:29,202 ERROR [stderr]     ... 4 more
          

           

          So it's a bug. Please create a JIRA here https://issues.jboss.org/browse/AS7

          1 of 1 people found this helpful