Load Balancing

Started by Gary C., March 30, 2023, 12:46:28 PM

Previous topic - Next topic

Gary C.

Hi

We are struggling to front end two GAS servers with a load balancer and I am hoping that someone else here has managed to get this working.

All three servers are running Ubuntu 22.04 LTS and using Apache. At the moment, we have been trying to get session bound connections working.

The GAS servers work as expected when accessed directly either via http or https.

When being accessed via the load balancer, the Genero Browser Client is being loaded, it pauses and then we get a "The Application Ended" message with a reason of "Server unreachable".

Here is the SSL virtual host configuration file we are using in the proxy server:

Code (#) Select

<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerName jean.alsico.co.uk
                ServerAdmin webadmin@alsico.co.uk

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                SSLEngine on
                SSLProtocol all -SSLv3 -SSLv2 -TLSv1 -TLSv1.1
                SSLCertificateFile      /etc/ssl/certs/alsico.crt
                SSLCertificateKeyFile   /etc/ssl/private/alsico.key

                ProxyPreserveHost Off

                RequestHeader set X-Forwarded-Proto https
                RequestHeader set X-Forwarded-Port 443

                SSLProxyEngine on

                Header add Set-Cookie "routeid=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
                <Proxy balancer://gasfarm>
                        BalancerMember https://annie.alsico.co.uk/gas/ route=1
                        BalancerMember https://hilda.alsico.co.uk/gas/ route=2
                        ProxySet stickysession=routeid
                </Proxy>

                <Location "/gas">
                        ProxyPass "balancer://gasfarm/"
                        ProxyPassReverse "balancer://gasfarm/"
                </Location>

                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>

        </VirtualHost>

</IfModule>


I'd be most grateful if any other user could share a working config file.

I have also set the GAS log to a category of ALL on both GAS servers and attached the output of one who handled a request.

Thanks

Gary


Gary C.

This nearly always happens when I post a question on this forum!

We had missed adding the element:

Code (#) Select

<ROOT_URL_PREFIX>https://jean.alsico.co.uk/gas</ROOT_URL_PREFIX>


To the main xcf file on the two GAS servers.

It is now working.

Sisavanh S.

Hi,

Indeed, you need <ROOT_URL_PREFIX> prefix for GAS version prior to 4.00.
I guess you are using GAS 3.20 ?

If you need details, please contact your local support center.

Best regards,
Sisa.

Gary C.

Hi Sisa

Yes, that's correct (3.20.18). I have just upgraded to GAS 4.01.01 and everything is working well.

Thanks

Gary