glassfish
  1. glassfish
  2. GLASSFISH-5301

Web Access logger vs.id returns NULL-VIRTUAL-SERVER

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.1peur2
    • Fix Version/s: 9.1.1_dev
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: Linux
      Platform: Linux

    • Issuezilla Id:
      5,301
    • Status Whiteboard:
      Hide

      911Approved

      Show
      911Approved

      Description

      After install GFv2ur2 and activation of httpservice.access adding to log format
      %vs.id%, the log is correct.

      If I set jvm option -Dcom.sun.entreprise.server.ss.ASQuickStartup=false, the log
      string corresponding to %vs.id% becames NULL-VIRTUAL-SERVER for all requests to
      all virtual servers.

      If that option is taken off, the logs never show again the real virtual server
      name. But the virtual-server selection based on host header is right, only the
      log is not right. Even if no more than one virtual-server is available fro each
      http-listener.

      It happend on RedHat Enterprise Linux 5, x86.

        Activity

        Hide
        jfarcand added a comment -

        Re-assign to Jan.

        Show
        jfarcand added a comment - Re-assign to Jan.
        Hide
        jluehe added a comment -

        aperezymadrid, please include exact sequence of steps that you are executing
        so that I can try to reproduce on my end. For example, after adding %vs.id% to
        the access log format, do you restart the server or do you rely on dynamic
        reconfiguration?

        Show
        jluehe added a comment - aperezymadrid, please include exact sequence of steps that you are executing so that I can try to reproduce on my end. For example, after adding %vs.id% to the access log format, do you restart the server or do you rely on dynamic reconfiguration?
        Hide
        jluehe added a comment -

        Submitter has sent me steps to reproduce in a separate email. Pasting them here:

        ---------------------------------------------------------------------------
        I restart manually the server. I have repeated the proccess from scratch three
        times

        1. create domain asadmin create-domain --user admin --portbase 4800 --savelogin=true
        2. using the admin console: enable http access log
        3. using the admin console: add %vs.id% %header.host% to access log format
        4. check the virtual server log: OK
        5. using the admin console add -Dcom.sun.enterprise.ss.ASQuickStartup=false
        6. asadmin stop-domain domainn
        7. asadmin start-domain domainn
        8. check now the %vs.id% text: NULL-VIRTUAL-SERVER

        Show
        jluehe added a comment - Submitter has sent me steps to reproduce in a separate email. Pasting them here: --------------------------------------------------------------------------- I restart manually the server. I have repeated the proccess from scratch three times 1. create domain asadmin create-domain --user admin --portbase 4800 --savelogin=true 2. using the admin console: enable http access log 3. using the admin console: add %vs.id% %header.host% to access log format 4. check the virtual server log: OK 5. using the admin console add -Dcom.sun.enterprise.ss.ASQuickStartup=false 6. asadmin stop-domain domainn 7. asadmin start-domain domainn 8. check now the %vs.id% text: NULL-VIRTUAL-SERVER
        Hide
        harpreet added a comment -

        approving for v2.1

        Show
        harpreet added a comment - approving for v2.1
        Hide
        jluehe added a comment -

        I was able to verify that %vs.id% was being resolved to NULL-VIRTUAL-SERVER no
        matter the setting of ASQuickStartup (true or false).

        Fixed by making sure that PEAccessLogValve always has "owning" VirtualServer set
        as its container (even before it has been added to the pipeline of the "owning"
        VirtualServer), so that this VirtualServer container may be passed to any of the
        accesslog pattern formatters, which require access to the VirtualServer
        container in order to be able to resolve %vs.id% to the virtual server id (by
        calling container.getName()).

        Fixed in 9.1.1:

        Checking in VirtualServer.java;
        /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/web/VirtualServer.java,v
        <-- VirtualServer.java
        new revision: 1.37.2.6; previous revision: 1.37.2.5
        done

        Ported fix to v3:

        Sending web/web-glue/src/main/java/com/sun/enterprise/web/VirtualServer.java
        Transmitting file data .
        Committed revision 22324.

        Show
        jluehe added a comment - I was able to verify that %vs.id% was being resolved to NULL-VIRTUAL-SERVER no matter the setting of ASQuickStartup (true or false). Fixed by making sure that PEAccessLogValve always has "owning" VirtualServer set as its container (even before it has been added to the pipeline of the "owning" VirtualServer), so that this VirtualServer container may be passed to any of the accesslog pattern formatters, which require access to the VirtualServer container in order to be able to resolve %vs.id% to the virtual server id (by calling container.getName()). Fixed in 9.1.1: Checking in VirtualServer.java; /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/web/VirtualServer.java,v <-- VirtualServer.java new revision: 1.37.2.6; previous revision: 1.37.2.5 done Ported fix to v3: Sending web/web-glue/src/main/java/com/sun/enterprise/web/VirtualServer.java Transmitting file data . Committed revision 22324.

          People

          • Assignee:
            jluehe
            Reporter:
            aperezymadrid
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: