Hello Frederic,

with this configuration you probably have some deadlocks in packetfence.log.

I did a setup with Haproxy and this is the config i used:

listen galera 172.20.135.3:3306
        balance source
        maxconn 2000
        mode tcp
        option tcplog
        option tcpka
        option mysql-check user haproxy
        server MySQL1 172.20.135.1:3306 check weight 1
        server MySQL2 172.20.135.2:3306 check weight 1 backup

listen galera-radius 172.20.135.3:3307
        #balance roundrobin
        balance source
        mode tcp
        maxconn 2000
        rate-limit sessions 2000
        option tcplog
        option tcpka
        option mysql-check user haproxy
        server MySQL1 172.20.135.1:3306 check weight 1 backup
        server MySQL2 172.20.135.2:3306 check weight 1

So port 3306 has been set in pf.conf and port 3307 in sql.conf (radius).
Also be carefull of pfdhcplistener process, only one instance can run on your 
cluster.

I am also working on actif/actif setup for packetfence.


Regards
Fabrice

Le Mardi 25 Novembre 2014 04:21 EST, Frederic Hermann <[email protected]> a 
écrit: 
 
> Hi List, 
> 
> 
> We are currently using packtfence (4.3.0) on debian 7, with a distinct mysql 
> server (actually, a percona mysql cluster). 
> 
> 
> We would like to setup haproxy on the pf server, to have dynamic failover, 
> and eventually load-balancing between the different nodes of the cluster. 
> 
> 
> For the moment we have the following issue : pf seems to loose the connection 
> to the DB very often, which leads to unexpected behavior. 
> The logs are full of 'ERRNO 2006' errors, in the different pf modules. 
> 
> 
> I suspect something is wrong in our haproxy configuration, as pf works well 
> fi connected directly to one of the cluster node. 
> 
> 
> So I would like to know if someone here is working with such a configuration, 
> and could share some configuration advices for packetfence and haproxy setup. 
> 
> 
> Our haproxy configuration is as follow: 
> 
> 
> * On each mysql node, a small xinetd service run on port 9200 to allow 
> haproxy to check the cluster status using HTTP 
> (This is to make sure that haproxy connect to a node actually connected to 
> the cluster, and not to a node where mysql is running, but not in cluster.) 
> 
> 
> * On pf, haproxy is configured as such: 
> 
> 
> 
> 
> 
> defaults 
> mode tcp 
> log global 
> option tcplog 
> option dontlognull 
> retries 3 
> option redispatch 
> # option http-server-close 
> # option forwardfor except 127.0.0.0/8 
> maxconn 2000 
> contimeout 5000 
> clitimeout 50000 
> srvtimeout 50000 
> 
> 
> # backend app 
> listen mysql-cluster 127.0.0.1:3306 
> mode tcp 
> balance source 
> option httpchk 
> server node1 192.168.4.11:3306 check port 9200 inter 3000 rise 2 fall 1 
> server node2 192.168.4.12:3306 check port 9200 inter 3000 rise 2 fall 1 
> server node3 192.168.4.13:3306 check port 9200 inter 3000 rise 2 fall 1 
> 
> 
> 
> 
> 
> 
> Cheers, 
> 
> 
> -- 
> Frederic Hermann 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
 
 
 
 



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to