[Kea-users] Kea and mysql disconnection

Jan Schermer jan at schermer.cz
Mon Jan 2 09:41:16 UTC 2017


Just FYI I hit this problem too in the past when trying to set up HA (with some 0.9 beta version).
I solved it by setting up a mysql master on every kea node and pointing kea to 127.0.0.1, not optimal but good enough. With high traffic it wouldn't work, though, because of deadlocks and collisions.

Kea should probably support some sort of connection pool with reconnect and keepalive (SELECT 1;), no idea how that works now...

Jan


> On 2 Jan 2017, at 10:27, Samuel Hameau <samuel.hameau at withings.com> wrote:
> 
> Hi,
> 
> I am using Kea with a mysql cluster of 2 master/master nodes using mysql replication (not a nbd cluster) for leases and hosts reservation.
> 
> For mysql failover, I am using  a virtual IP balanced between the 2 mysql nodes.
> Everytime the virtual IP moves to the other host, i got a fatal error, and kea stops running with that kind of error :
> 
> DHCPSRV_MYSQL_FATAL_ERROR Unrecoverable MySQL error occurred: unable to execute for <DELETE FROM lease4 WHERE state = ? AND expire < ?>, reason: Lost connection to MySQL server during query (error code: 2013). Server exiting now!
> 
> Would it be possible to modify this behavior to make kea retry to connect to the mysql server a few times before dying ?
> 
> Previously, i have also tried tu use haproxy with one mysql server being active, and the 2nd one being in backup : I had the same problem when restarting haproxy/ or changing the active mysql server in haproxy.
> 
> Best regards,
> Samuel
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20170102/31819a94/attachment.htm>


More information about the Kea-users mailing list