0

I am trying to set an Openfire cluster of 2 nodes by using the hazelcast plugin (Both using 3.9.3 version of openfire).

one of them running on 192.168.1.2 and other on 192.168.1.22 and both uses the common Mysql DB which is running on 192.168.1.2 .

I have installed Haproxy on machine with ip 192.168.1.13 using apt -get install haproxy and configured it for load balancing.

I am stuck when i try to login at admin console of openfire using haproxy at 192.168.1.13:9090 , it doesn't allow me to login. i am unable to recognize what's happened as i am a beginner for clustering so please advise me if i am doing something wrong. below is my haproxy.cnf file

global
        log /dev/log   local0
        log 127.0.0.1   local1 notice
        maxconn 4096
        user haproxy
        group haproxy
        daemon

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        option redispatch
        maxconn 2000
        contimeout     5000
        clitimeout     50000
        srvtimeout     50000

listen openfire 
    bind 192.168.1.13:9090
    mode http
    stats enable
    stats uri /haproxy
    balance roundrobin
    option httpclose
    option forwardfor
    server openfire_rahul 192.168.1.22:9090 check
    server openfire_girish 192.168.1.2:9090 check

"Thanks in advance"

Greesh Kumar
  • 119
  • 9

1 Answers1

2

Now i understand what exactly was going on. because i have used mode http , so http is a stateless protocol and server closes the connection after every response to dedicated request.

by using the tcp mode i got rid off this problem.

Greesh Kumar
  • 119
  • 9