Forum Discussion

BM_27231's avatar
BM_27231
Icon for Nimbostratus rankNimbostratus
Jul 19, 2011

Irule based uri rdirection and Session issue

Hi,

 

 

I have requirements to redirect the request to two pools based on the request URI.

 

 

 

first rule is if any thing /ABC/test goes to web_POW_pool, rest of them goes to default pool where web server controls the weblogic servers.

 

 

 

the irule used is

 

 

 

when HTTP_REQUEST {

 

if { ([HTTP::uri] contains "/ABC/test/")}{

 

pool web_POW_pool_port_9001

 

}

 

else {

 

pool Development_Web_pool_port_7789

 

}

 

the redirection is working fine when users click the link http://abc.com/ABC/test, it redirect the users to the different infrastructure of weblogic servers, the redirection works perfectly. but when user click any next pages after login, the users are kicked back to the home page of the application.

 

we have enabled the cookie persistence, still it failing to continue other pages after login.What i have foudn using the httpwatch is the jsession is not being carried by the F5 for each clicks, so weblogic server side is thinking it a new session and bouncing the user back to the home page.

 

Any idea is there any special configuration required in the persistence and stickiness? Appreciate your help.

 

 

 

-- BM

 

 

 

 

 

 

 

 

 

 

 

 

  • Hi BM,

     

     

    Take a look at this post and the iRule posted by Hoolio.

     

     

    http://devcentral.f5.com/Forums/tabid/53/aft/1171255/Default.aspx

     

     

    The BIG-IP does not keep track of the JSESSIONID by default, it uses other means (most commonly used in my experience is Cookie Persistence) to persist a client to a specific server. It is up to the application (normally) take take care of session information.

     

     

    The iRule in this post made by Hoolio should get you well on your way if you want to use JSESSIONID Persistence. This will however require some changes in your Weblogic settings (the links to Oracle are also in that post and I found that the "set static::j_cookie "jsessionid" is case-sensitive, so you may need to put it in all caps), Hoolio really out did himself with that one.
  • If you use the default cookie insert persistence profile this should work. Or you can use a custom cookie per pool with the persist command in the iRule:

     

     

    http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/52/aft/17531/showtab/groupforums/Default.aspx17547

     

     

    You'll also need a OneConnect profile on the virtual server. If you're using SNAT on the virtual server, you can use the default /0 source mask OneConnect profile. If you're not using SNAT then create a custom /32 source mask OneConnect profile.

     

     

    Aaron