Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-886

Custom session-cookie breaks worker stickyness

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 1.4.0.Final
    • None

      Issue:
      If one use custom session-cookie in worker. Undertow balancer did not set this cookie as stickySessionCookie and still use default JSESSIONID.
      Reproducer

      1. Set up undertow(EAP7.DR7) balancer with 2 workers (EAP7.DR7)
      2. Set up custom cookie in both workers
        /subsystem=undertow/servlet-container=default/setting=session-cookie:add(http-only=true) 

        /subsystem=undertow/servlet-container=default/setting=session-cookie:write-attribute(name=name,value=VaLuE)
      3. Read undertow balancer info (cli command for balancer)
        /subsystem=undertow/configuration=filter/mod-cluster=modcluster:read-resource(include-runtime=true, recursive=true, recursive-depth=100)
      4. Look for "sticky-session-cookie" variable
        Expected: VaLuE Now: JSESSIONID
        You can even sent request to some app that will tell you what worker handled the request and you will see that it jumps from one to another
        Verbose:
        Workers correctly sent StickySessionCookie variable with value VaLuE. Apache httpd correctly handles this variable. Undertow ignores it.
        2016-11-02 11:16:15,304 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: JVMRoute, value: jboss-eap-7.1-1
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: Host, value: 192.168.122.88
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: Maxattempts, value: 1
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: Port, value: 8009
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: StickySessionCookie, value: VaLuE
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: StickySessionForce, value: No
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: StickySessionPath, value: value
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: Type, value: ajp
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005054: MCMP processing, key: ping, value: 10
        2016-11-02 11:16:15,305 DEBUG [io.undertow] (default task-17) UT005049: NodeConfig created: connectionURI: ajp://192.168.122.88:8009/?#, balancer: mycluster, load balancing group: null, jvmRoute: jboss-eap-7.1-1, flushPackets: false, flushwait: 10, ping: 10,ttl: 60, timeout: 0, maxConnections: 40, cacheConnections: 40, requestQueueSize: 1000, queueNewRequests: true
        

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              bsikora Bogdan Sikora (Inactive)
              Bogdan Sikora Bogdan Sikora (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: