Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-816

Boot log writer ignores -Djboss.server.base.dir

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • Logging, Management

      When on OS/X you start a server with -Djboss.server.base.dir this directory is used for configuration and also server.log, but not to populate the boot.log, which is still written to standalone/logs/boot.log.

      This is bad, as it will overwrite a boot.log for a server configuration that is running in parallel without -Djboss.server.base.dir= flag.
      Actually the logging config also seems to point at the old place

      hrupp 78046 0,0 1,1 1537296 96228 s005 S+ 10:55am 0:03.70 /usr/bin/java -D[Standalone] -d32 -client -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml -Dorg.jboss.boot.log.file=/devel/jboss-as-7.1.1.Final/standalone/log/boot.log -Dlogging.configuration=file:/devel/jboss-as-7.1.1.Final/standalone/configuration/logging.properties -jar /devel/jboss-as-7.1.1.Final/jboss-modules.jar -mp /devel/jboss-as-7.1.1.Final/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/devel/jboss-as-7.1.1.Final -Djboss.server.base.dir=/devel/jboss-as-7.1.1.Final/standalone2

      Turns out that the magic to detect -Djboss.server.base.dir in standalone.sh only works for linux:

      if $linux; then

      1. consolidate the server and command line opts
        SERVER_OPTS="$JAVA_OPTS $@"
      2. process the standalone options
        for var in $SERVER_OPTS

      as readlink is using '-m' flag that does not exist on OS/X.
      That dependency on linux and readlink -m will probably render this -Djboss.server.base.dir feature invalid for AIX/HP-UX/Solaris etc.

              jperkins-rhn James Perkins
              pilhuhn Heiko Rupp
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: