Forum Discussion

D_T's avatar
D_T
Icon for Cirrus rankCirrus
Jun 18, 2020

Persistence Profile Issues

I am having an interesting issue with a persistence profile. It works wonderful in QA but is not working in production.

 

I've created a persistence profile with the following attributes:

 

Parent Profile Universal

Mirror Persistence Enabled

iRule Enabled and pointed

Timeout Enabled and set to 28800 seconds

 

The iRule:

 

when HTTP_RESPONSE {

 if { [HTTP::cookie exists "ASP.NET_SessionId"] } {

   persist add uie [HTTP::cookie "ASP.NET_SessionId"]

   pool po-server-https

   }

}

when HTTP_REQUEST {

 if { [HTTP::cookie exists "ASP.NET_SessionId"] } {

   persist uie [HTTP::cookie "ASP.NET_SessionId"]

   pool po-server-https

   }

}

 

In the virtual server instance I then set Default Persistence Profile to this new created profile. This all works wonderfully in QA and the client is persisted to one server based on their cookie value for ASP.NET. The pool names are correct, the cookie exists in both environments etc. but in production, the persistence is not taking place and the client is jumping between servers in the pool.

 

Does anyone have ideas on this one or a path forward to troubleshoot this via clean logging that doesn't inundate the server?

 

5 Replies

  • Couldn't try it on the lab but it must work.

    You can also check the logs for trouble shooting

     

    when HTTP_REQUEST {

    set SessionId [HTTP::cookie ASP.NET_SessionId]

    log local0. "[IP::client_addr]:[TCP::client_port]: Request SessionId is: $SessionId"

    if { $SessionId != "" } { persist uie $SessionId 28800 }

    pool po-server-https

    }

     

    when HTTP_RESPONSE {

    set SessionId [findstr [HTTP::cookie "ASP.NET_SessionId"] 18 24]

    log local0. "[IP::client_addr]:[TCP::client_port]: Response SessionId is: $SessionId from Set-Cookies: [HTTP::header values Set-Cookie]"

    if { $SessionId != "" }{

    persist add uie $SessionId 28800

    log local0. "[IP::client_addr]:[TCP::client_port]: Persist record [persist lookup uie $SessionId]"

    }

    }

     

    • D_T's avatar
      D_T
      Icon for Cirrus rankCirrus

      Hmmm that seems to result in:

       

      01070151:3: Rule [/application/ir_server_uie_persistence_v2] error: /application/ir_server_uie_persistence_v2:17: error: ["invalid 'local0.'; expected:-noname"][log local0. "[IP::client_addr]:[TCP::client_port]: "Response SessionId is: $SessionId from Set-Cookies: [HTTP::header values Set-Cookie]"]

       

      • crodriguez's avatar
        crodriguez
        Ret. Employee

        On the first log statement in the HTTP_RESPONSE event, remove the double quite that appears before the words "Response SessionID..." It should read:

        log local0. "[IP::client_addr]:[TCP::client_port]: Response SessionId is: $SessionId from Set-Cookies: [HTTP::header values Set-Cookie]"
  • Hmm still seeing the session on multiple servers with that suggested iRule.