Skip to Main Content

SGD Gateway health check for SGD jserver component

Jan-OracleOct 3 2018 — edited May 3 2019

Problem Description

The SGD gateway uses the apache mod_proxy_balancer module to load balance requests between the members of an SGD array. The load balancer distributes HTTP requests equally across the configured servers, even with the ability to prioritize certain servers, and marks a server unavailable if the underlying httpd server goes down.

Unfortunately only the httpd is being monitored, so when other important server components on the SGD server fail, eg. the jserver process listening on 5307, then the load balancer on the gateway will be happy to continue sending requests to that Apache server, but a user trying to login to SGD will be presented with an error message.

Since the users browser has a cookie balanceid set, it will continue to be directed by the gateway to the server that is not functional 100%. Only administrator intervention will remedy this scenario by going into the balancer-manager of the SGD gateway and manually and temporarily disable the affected SGD server.


The SGD gateway relies on standard Apache components for load balancing. Fortunately the mod_proxy_balancer supports mod_proxy_hcheck, a module that allows to add a health check to every BalancerMember of the gateway. This health check has been added at /webapps/sgd/resources/jsp/ticker.jsp with SGD5.4p1 or tta-5.40.912.

SGD Server

Find the location of the ticker.jsp file

sgd-server# find /opt/tarantella/webservers/tomcat/$(cat /opt/tarantella/var/info/tomcatverstion)/webapps/sgd --name ticker.jsp

It can be either /sgd/ticker.jsp or /sgd/resources/jsp/ticker.jsp. Remember the location for when you have to edit the gateway configuration.

SGD Gateway

We need to instruct the SGD gateway to use the mod_proxy_hcheck module and configure our BalancerMembers to use the health check in the <VirtualHost> block.



# add server health check (requires watchdog_module) BEFOR the lines that define the balancers


# <Proxy Balancer://mysgdservers/>

# Include conf/extra/gateway/servers/*.conf

# </Proxy>

LoadModule watchdog_module modules/

LoadModule proxy_hcheck_module modules/

ProxyHCExpr jserverUP {%{REQUEST_STATUS} =~ /^[234]/}

ProxyHCExpr jserverDOWN {%{REQUEST_STATUS} =~ /^[5]/}

ProxyHCTemplate myHCtemplate hcmethod=GET hcexpr=jserverUP hcuri=/sgd/resources/jsp/ticker.jsp hcinterval=5

Now we modify the APACHE/conf/extra/gateway/server.domain.conf.template and all existing servers in APACHE/conf/extra/gateway/servers to use the new health check for the jserver. The following configuration will make sure that every 5 seconds the load balancer GETs /sgd/ticker.jsp on the BalancerMember and makes sure the return status is 200. In any other case the BalancerMember will be marked as disabled


BalancerMember %SGDWEBSERVERURL% route=%SGDROUTE% hctemplate=myHCtemplate

The following is the view of the SGD gateways balancer-manager with the BalancerMembers configured with a health check


Post Details
Added on Oct 3 2018