6 Replies Latest reply on Feb 22, 2012 11:44 AM by Peter Johnson

    JBoss 6.1 is unable to write to boot.log

    Biswajit Sinha Newbie

      JBoss Experts,

       

      I have just started using JBoss 6.1 (final) on a 64 bit linux host but not without too much success, initially it wont boot up so had to include few java options and include the logging jar which eventually got JBoss up however it is still unable to write boot.log. Here is the snippet of the startup errors I get:-

        JBoss Bootstrap Environment

        JBOSS_HOME: /opt/jboss/jboss-6.1

        JAVA: /usr/java/jdk1.6.0_24/bin/java

        JAVA_OPTS: -Xms460m -Xmx512m -Dsun.net.inetaddr.ttl=600 -Dsun.net.inetaddr.negative.ttl=1 -XX:MaxPermSize=128m -server -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -verbose:memory,gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12026 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Dlogging.configuration=file:/opt/jboss/jboss-6.1/bin/logging.properties -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl -Djava.library.path=/opt/jboss/jboss-6.1/bin/native/lib

      CLASSPATH: /opt/jboss/jboss-6.1/bin/run.jar:/usr/java/jdk1.6.0_24/lib/tools.jar:/opt/jboss/jboss-6.1/lib/jboss-logmanager.jar

      =========================================================================

      Unable to set property fileName on class org.jboss.logmanager.handlers.FileHandler: java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.logmanager.PropertyConfigurator.configureProperties(PropertyConfigurator.java:187)
              at org.jboss.logmanager.PropertyConfigurator.configureHandler(PropertyConfigurator.java:312)
              at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:128)
              at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:86)
              at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:246)
              at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:231)
              at java.util.logging.LogManager$2.run(LogManager.java:266)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:264)
              at java.util.logging.LogManager.getLogManager(LogManager.java:247)
              at java.util.logging.Logger.<init>(Logger.java:225)
              at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:969)
              at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:966)
              at java.util.logging.LogManager$1.run(LogManager.java:179)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.util.logging.LogManager.<clinit>(LogManager.java:156)
              at java.util.logging.Logger.getLogger(Logger.java:287)
              at sun.management.snmp.util.MibLogger.<init>(MibLogger.java:57)
              at sun.management.snmp.util.MibLogger.<init>(MibLogger.java:42)
              at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:760)
              at sun.management.Agent.startAgent(Agent.java:127)
              at sun.management.Agent.startAgent(Agent.java:239)
      Caused by: java.io.FileNotFoundException: ${jboss.server.log.dir}/boot.log (No such file or directory)
              at java.io.FileOutputStream.open(Native Method)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
              at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:152)
              at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:183)
              ... 26 more

       

      I even changed the logging.properties from $JBOSS_HOME/bin/logging.properties to handler.FILE.fileName=${jboss.server.log.dir}/boot.log as I am running JBoss as a non root user. Can anyone please advise?

       

      Regards,

      Bis