HTTP 404 Error Appears on Macintosh Computer When You Log on Again to Access NetScaler Gateway Page

HTTP 404 Error Appears on Macintosh Computer When You Log on Again to Access NetScaler Gateway Page

book

Article ID: CTX133946

calendar_today

Updated On:

Description

When a user closes the Web browser on a Macintosh computer using the red X on the Window instead of logging out from the NetScaler Gateway page, the user cannot log on to NetScaler Gateway page again and the HTTP 404 error page appears.

The alternative to use the logout option is to close the Web browser with Command + Q keys on the Macintosh computer.

Resolution

To resolve this issue, run the following commands from the command line interface of the appliance:
add rewrite action close_conn_act insert_http_header Connection "\"close\""
add rewrite action retry_setclient_act insert_after_all "HTTP.RES.BODY(10000)" q{"<script language=\"javascript\" type=\"text/javascript\">location.replace('/cgi/setclient\?wica');</script>"} -search "text(\"</head>\")"
add rewrite policy conn_close_pol "HTTP.REQ.URL.CONTAINS(\"setclient\?wica\") && HTTP.RES.STATUS.EQ(404)" close_conn_act
add rewrite policy retry_setclient_pol "HTTP.REQ.URL.CONTAINS(\"setclient\?wica\") && HTTP.RES.STATUS.EQ(404)" retry_setclient_act
bind rewrite global conn_close_pol 1 NEXT -type RES_DEFAULT
bind rewrite global retry_setclient_pol 2 end -type RES_DEFAULT

With the preceding configuration, each time an HTTP request is sent to the appliance which contains "setclient?wica" in the URL to which the Web Interface responds with an HTTP 404 error and the appliance adds the "Connection: Close" header to the response before sending it to the client. The appliance also adds some Java script which makes the client immediately reload the same page.

The client browser then opens a new TCP connection for this request because it cannot reuse the old TCP connection with the new cookie because of the “Connection: Close” header.


Problem Cause

The following is the list of events that occur in the scenario when the error appears:

  • Chrome Web browser opens multiple TCP sessions to the Access Gateway Enterprise Edition site, when the user logs on for the first time. Access Gateway Enterprise Edition appliance sets a cookie.
  • When the User clicks the red box on the Chrome Web browser, the browser still leaves three connections open with the appliance.
  • When the user tries to log on again, Chrome Web browser opens new TCP sessions to Access Gateway Enterprise Edition site, and the appliance sets a new cookie.
  • Chrome Web browser tries to reuse the three old connections, but with the new cookie.
  • The appliance responds with HTTP 404 error for the new connections. The first request using the new cookie in the reused connection is for /cgi/setclient?wica.

    Issue/Introduction

    When a user closes the Web browser on a Macintosh computer using the red X on the Window instead of logging out from the Access Gateway Enterprise Edition page, the user cannot log on the Access Gateway Enterprise Edition page again and the HTTP 404 error page appears.