Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I cannot seems to access the glassfish admin console if it's behind HAproxy, the request goes into a endless re-direct loop.

Our setup is as follow :

Pound - listens on 443 and pass traffic to HAproxy on port 80. Haproxy checks acl lists and routes accordingly. Works perfectly, except now for the glassfish admin interface.

HAproxy conf for the glassfish admin service looks like this :

# glassfishadmin1.ha.example.com
acl is_glassfishadmin1_ha_example_com hdr_end(host) -i glassfishadmin1.ha.example.com
use_backend glassfishadmin1_ha_example_com if is_glassfishadmin1_ha_example_com

# glassfishadmin1.ha.example.com
backend glassfishadmin1_example_com
cookie SERVERID insert nocache indirect
option httpchk HEAD /check.txt HTTP/1.0
option httpclose
option forwardfor
server node1 cookie node1

Anyone have any ideas? Can it be that glassfishadmin listens on HTTPS, so request goes back out, hits pound, and then goes in, and out she goes again? Any ideas on how to fix it?

share|improve this question
Can you get a HTTP trace of what's going on (Firefox had a Live HTTP capture plugin that's useful for this sort of thing)? It sounds like Glassfish is indeed issuing a redirect which is confusing matters. Have you configured the glassfish admin port to use SSL? If so, you probably want to turn that off if you're offloading the SSL in pound. –  growse Mar 9 '12 at 11:01
I use firebug to view the headers, just goes on and on, in a endless loop. Have done no configuration on glassfish yet, so it's all default. How would I turn SSL of for the admin interface? Had a look in domain.xml and don't see a way to make it non-ssl –  daemonza Mar 12 '12 at 8:05
Seems secure-admin have been enabled on the Glassfish server. Which enabled SSL, which causes the re-direct loop. Looks like you cannot use the interface without secure-admin enabled :( –  daemonza Mar 12 '12 at 9:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.