Forum Discussion

Gazzu's avatar
Gazzu
Icon for Nimbostratus rankNimbostratus
May 23, 2017

redirection to the sorry server

Hi All,

 

It's regarding "redirection to the sorry server".I have configured two pool i.e. pool_https and pool_http.Each pool having three members.Port direction from http to https has been also configured under VS_http.

 

One of our requester would like to temporary redirect the traffic in the loadbalancer from the servers to a “maintenance in progress” page on another server i.e. 172.23.XX.YY:8080.

 

To accomplish this, I created another pool i.e. sorry-pool_https and add the member 172.23.XX.YY on port 8080.

 

Below is the i-rule i have configured on VS_https but its not working.

 

when CLIENT_ACCEPTED { if {[active_members p-]<1}{ pool pool_https

 

} else { pool sorry-pool_https } }

 

But it's not working.Please help to correct it.

 

  • Gazzu's avatar
    Gazzu
    Icon for Nimbostratus rankNimbostratus

    correction on i-rule but still not working.

     

    when CLIENT_ACCEPTED { if {[active_members pool_https]<1}{ pool sorry-pool_https

     

    } else { pool pool_https } }

     

  • Hello,

     

    You have to use the when LB_FAILED event. Not sure if the CLIENT_ACCEPTED or HTTP_REQUEST event will work with the [active_members pool_https] command.

     

    Could you print the /var/log/ltm TCL error your are getting ?

     

    Thanks

     

  • Snl's avatar
    Snl
    Icon for Cirrostratus rankCirrostratus

    try this

     

    code
    
    when CLIENT_ACCEPTED {
      if { [active_members pool_https] < 1 } { 
           node sorry-pool_https  } 
          else {
      pool pool_https
        }  
        }   
  • Anesh's avatar
    Anesh
    Icon for Cirrostratus rankCirrostratus
    • Are you using a clientssl and serverssl profile on your VS?
    • Can you list the pool and virtual config
  • Anesh's avatar
    Anesh
    Icon for Cirrostratus rankCirrostratus

    Try

    when CLIENT_ACCEPTED {
        if { [active_members [LB::server pool]] < 1} {
            pool sorry-pool_https
        }
    }