Forum Discussion

Nick_Palmer_f5's avatar
Nick_Palmer_f5
Icon for Nimbostratus rankNimbostratus
Sep 24, 2014

Sever Open Requests and Display Maint Page

Hello!

 

Is there a way to kill all established/future connections to VS and display a maintenance page via iRule? I tried using Reject, but it resets all connections including the maintenance page, and the browser shows 'This page can’t be displayed' or 'Connection was reset.'

 

Your help is much appreciated!

 

4 Replies

  • You need to disable the VS or display a sorry page?

    1. If you disable de VS, new connections will be rejected.

    2. (I do this way) Did you posted your sorry page on bigip iFile and the VS is in standard L7?

      a. Import an iFile in the menu System >> File Management >> iFile List

      b. Provide an iFile name with previous imported file in then menu Local Traffic >> iRules >> iFile List

    The iRule in standard L7 VS:

    when HTTP_REQUEST {
        HTTP::respond 200 content [ifile get "sorryPageName"] "Content-Type" "text/html"
    }
    

    The new connections will not follow to the backend servers; Regards.

  • Hi cjunior and thanks for your reply!

     

    Your solution will only apply to the new connections to the VS. I need to kill all established connections/sessions (like, file downloads) and then display the maint/sorry page.

     

  • Perhaps add a connection close header to the HTTP respond command:

    HTTP::respond 200 content [ifile get "sorryPageName"] "Content-Type" "text/html" Connection "Close"
    

    For any existing connections (which might not trigger new HTTP_REQUEST or _RESPONSE events) not really sure what you can do I'm afraid.

  • Thanks, What Lies Beneath. Is there a way to issue a command to reset the web nodes from within an iRule based on condition? The condition may be a sorry/maint page or a certain web request/URL.