Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logging
    • Labels:
      None

      Description

      Note: I'm not sure if this should be assigned to GUI or Logger. Let's start with GUI...

      Setup:
      DAS, one cluster with one instance in it.

      DAS running
      instance running

      In GUI – go to configuration/c1-config/logger settings

      Change the name of the logfile:
      $

      {com.sun.aas.instanceRoot}

      /logs/serverXXXX.log
      Hit Save and watch the fireworks!

      ===============
      DAS has a huge stack trace – this part looks interesting:
      Caused by: java.lang.RuntimeException: An error occurred during replication FAILURE: Command set-log-attributes failed on server instance i1: remote failure: ja
      va.lang.NullPointerException
      at org.glassfish.admingui.common.util.RestUtil.parseResponse(RestUtil.java:341)
      at org.glassfish.admingui.common.util.RestUtil.restRequest(RestUtil.java:181)
      at org.glassfish.admingui.common.util.RestUtil.restRequest(RestUtil.java:136)
      at org.glassfish.admingui.common.handlers.LoggingHandlers.saveLoggingAttributes(LoggingHandlers.java:158)
      ... 49 more
      Caused by: java.lang.RuntimeException: An error occurred during replication FAILURE: Command set-log-attributes failed on server instance i1: remote failure: ja
      va.lang.NullPointerException
      at org.glassfish.admingui.common.util.RestUtil.parseResponse(RestUtil.java:308)
      ... 52 more

      #]
      ==========================================================

      On the instance:

      [#|2011-01-10T11:26:28.093-0800|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=126;_ThreadName=http-thread-pool-2
      4848(2);|Exception in command execution : java.lang.NullPointerException
      java.lang.NullPointerException
      at com.sun.enterprise.server.logging.commands.SetLogAttributes.execute(SetLogAttributes.java:172)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:354)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:369)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1061)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1260)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1248)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:453)
      at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:220)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
      at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:818)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1008)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)

        Activity

        Hide
        sirajg added a comment -

        Same error seen when attempting

        set-log-attributes --name=s1-config com.sun.enterprise.server.logging.GFFileHandler.file="somefilename"

        where s1-config is the config of a non-DAS instance. Transferring to logging.

        Show
        sirajg added a comment - Same error seen when attempting set-log-attributes --name=s1-config com.sun.enterprise.server.logging.GFFileHandler.file="somefilename" where s1-config is the config of a non-DAS instance. Transferring to logging.
        Hide
        naman_mehta added a comment -

        How bad is its impact? (Severity)

        • Likely to generate a customer support call
        • An in-your-face issue that will touch the majority of users

        How often does it happen? (Frequency)

        • Regular

        How much effort is required to fix it? (Cost)

        • Attached File diff for the same

        What is the risk of fixing it? (Risk)

        • Low

        Does a work around for the issue exist? Can the workaround be reasonably employed by the end user?

        • No

        If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes?

        • It should be fixed by below check-ins

        Index: src/main/java/com/sun/enterprise/server/logging/commands/SetLogAttributes.java
        ===================================================================
        — src/main/java/com/sun/enterprise/server/logging/commands/SetLogAttributes.java (revision 44384)
        +++ src/main/java/com/sun/enterprise/server/logging/commands/SetLogAttributes.java (working copy)
        @@ -47,10 +47,9 @@
        import org.glassfish.api.ActionReport;
        import org.glassfish.api.I18n;
        import org.glassfish.api.Param;
        -import org.glassfish.api.admin.AdminCommand;
        -import org.glassfish.api.admin.AdminCommandContext;
        -import org.glassfish.api.admin.ExecuteOn;
        -import org.glassfish.api.admin.RuntimeType;
        +import org.glassfish.api.admin.*;
        +import org.glassfish.config.support.CommandTarget;
        +import org.glassfish.config.support.TargetType;
        import org.jvnet.hk2.annotations.Inject;
        import org.jvnet.hk2.annotations.Scoped;
        import org.jvnet.hk2.annotations.Service;
        @@ -78,6 +77,8 @@
        *
        */
        @ExecuteOn(

        {RuntimeType.DAS, RuntimeType.INSTANCE}

        )
        +@TargetType(

        {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CONFIG}

        )
        +@CommandLock(CommandLock.LockType.NONE)
        @Service(name = "set-log-attributes")
        @Scoped(PerLookup.class)
        @I18n("set.log.attributes")
        @@ -169,9 +170,10 @@
        isConfig = true;

        • if (targetServer.getConfigRef().equals(target))
          Unknown macro: {+ if (targetServer!=null && targetServer.getConfigRef().equals(target)) { isDas = true; } }

          else {
          Server targetServer = domain.getServerNamed(target);

        Show
        naman_mehta added a comment - How bad is its impact? (Severity) Likely to generate a customer support call An in-your-face issue that will touch the majority of users How often does it happen? (Frequency) Regular How much effort is required to fix it? (Cost) Attached File diff for the same What is the risk of fixing it? (Risk) Low Does a work around for the issue exist? Can the workaround be reasonably employed by the end user? No If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes? It should be fixed by below check-ins Index: src/main/java/com/sun/enterprise/server/logging/commands/SetLogAttributes.java =================================================================== — src/main/java/com/sun/enterprise/server/logging/commands/SetLogAttributes.java (revision 44384) +++ src/main/java/com/sun/enterprise/server/logging/commands/SetLogAttributes.java (working copy) @@ -47,10 +47,9 @@ import org.glassfish.api.ActionReport; import org.glassfish.api.I18n; import org.glassfish.api.Param; -import org.glassfish.api.admin.AdminCommand; -import org.glassfish.api.admin.AdminCommandContext; -import org.glassfish.api.admin.ExecuteOn; -import org.glassfish.api.admin.RuntimeType; +import org.glassfish.api.admin.*; +import org.glassfish.config.support.CommandTarget; +import org.glassfish.config.support.TargetType; import org.jvnet.hk2.annotations.Inject; import org.jvnet.hk2.annotations.Scoped; import org.jvnet.hk2.annotations.Service; @@ -78,6 +77,8 @@ * */ @ExecuteOn( {RuntimeType.DAS, RuntimeType.INSTANCE} ) +@TargetType( {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CONFIG} ) +@CommandLock(CommandLock.LockType.NONE) @Service(name = "set-log-attributes") @Scoped(PerLookup.class) @I18n("set.log.attributes") @@ -169,9 +170,10 @@ isConfig = true; if (targetServer.getConfigRef().equals(target)) Unknown macro: {+ if (targetServer!=null && targetServer.getConfigRef().equals(target)) { isDas = true; } } else { Server targetServer = domain.getServerNamed(target);
        Hide
        naman_mehta added a comment -

        Committed revision 44389.

        Show
        naman_mehta added a comment - Committed revision 44389.

          People

          • Assignee:
            naman_mehta
            Reporter:
            Byron Nevins
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: