Web Page Does Not Load When Load Balanced Through NetScaler

Web Page Does Not Load When Load Balanced Through NetScaler

book

Article ID: CTX205113

calendar_today

Updated On:

Description

Web server is load balanced through NetScaler. When accessing the web server root page (for example http://test.com), we see the error "Page cannot be displayed".

In the response back end server has sent the page to the NetScaler, but NetScaler did not transfer any data to the browser and user sees the error "Page cannot be displayed". Other pages (for example http://test.com/test1) on the same web server are accessible without problems. Accessing the root page directly (without NetScaler) works as well.

Resolution

Below troubleshooting steps were taken to further troubleshoot and fix the issue:

In the  NetScaler trace file we could see that the GET request for the root page is being received from client and NetScaler sent it back to the backend server as well. Then backend server starts sending the data which NetScaler starts Ack’ing but in the end we see NetScaler resetting the frontend and backend connection as shown below with RST code 9205 (Follow the frontend and backend stream in WireShark) :

User-added image

At the same time we see NetScaler is incrementing following http counters:

    75    7001        1527735          8        1 http_err_noreuse_link_server  Thu Nov 19 08:27:25 2015
     76    7002        1527743          8        1 http_err_noreuse_link_server  Thu Nov 19 08:27:32 2015
     77       0          34905          2        0 http_err_noreuse_morethanCtLen  Thu Nov 19 08:27:32 2015
     78    7001        1527748          5        0 http_err_noreuse_link_server  Thu Nov 19 08:27:39 2015
     79       0          34907          2        0 http_err_noreuse_morethanCtLen  Thu Nov 19 08:27:39 2015

Counter Information: http_err_noreuse_morethanCtLen

Number of connections that are not reused because Netscaler received more than content-length amount of data from server.

- From nstrace we see that when backend sends NETSCALER 200 OK for the GET request the Content Length is as below highlighted:

GET / HTTP/1.1
Host: www.XXX-domain.com
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
 
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2015 08:27:27 GMT
Server: Apache/2.4.10 (Linux/SUSE)
Set-Cookie: fe_typo_user=f5b877eabc219343b8412f88b3389b89; path=/; httponly
Set-Cookie: PHPSESSID=2r1iv4qf27c3vrqs48ujemn4u6grbavr9v9na7joune97sju2l41; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 38753
X-UA-Compatible: IE=Edge,chrome=1
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
 
From the  NetScaler nstrace we can see that the problem is with the server sending more than “Content-Length” bytes (There is 2 bytes of more data sent by backend as compared to what is specified in Content-Length header) in the all the responses where the RST is being triggered by NetScaler (Below is the TCP header of the last 200 OK response received from backend):

User-added image

Recommendation that fixed the issue

Create a new HTTP profile  (Under System > Profiles > HTTP Profiles) with following option enabled “Drop extra data from server” and bind it to the service and that should fix the issue. It can be globally applied by modifying the default HTTP profile.
 
User-added image

Problem Cause

The HTTP response is sent by the backed server to the NetScaler, but NetScaler did not transfer any data to the browser and users see the error "Page cannot be displayed". Other pages (for example http://test.com/test1) on the same webserver are accessible without any problem. Accessing the root page directly (without NetScaler) works as well.

The problem is with the backend server sending more than “Content-Length” bytes (There is 2 bytes of more data sent by backend as compared to what is specified in Content-Length header) in the response in all cases where the RST is being sent by NS.

Issue/Introduction

Users getting an error "Page cannot be displayed" while accessing the root page of the web server through the NetScaler load balancing VIP.