[Kea-users] [EXTERNAL] Kea fail start after power outage, mysql connect problem
Darren Ankney
darren.ankney at gmail.com
Thu Oct 31 08:39:48 UTC 2024
Hi,
Kea could have a solution in 2.6.1, but I'm not sure it would work
because you are using a name rather than an IP for the database. So
the name resolution is failing. But there is a retry-on-startup
parameter: https://kea.readthedocs.io/en/kea-2.6.1/arm/database-connectivity.html
Since Kea was never able to actually try to connect, it may not retry.
This would have to be tested.
Thank you,
Darren Ankney
On Wed, Oct 30, 2024 at 2:50 AM Wagner Vlastimil - HZS Ústeckého kraje
<Vlastimil.Wagner at hzscr.cz> wrote:
>
> I made in systemd service:
>
> ExecStartPre=/bin/bash -c "until host db.example.com; do sleep 1; done"
>
> but i thought that Kea have solution
>
> VW
>
> On Út, 2024-10-29 at 12:23 +0000, Geist, Dan (CCI-Atlanta) via Kea-users wrote:
> >
> >
> >
> > Have you considered putting in a “watchdog” timer at the operating system level to restart the OS after a number of minutes (if network link is down) to allow your network gear more time to recover?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > From:Kea-users <kea-users-bounces at lists.isc.org> on behalf of Wagner Vlastimil - HZS Ústeckého kraje <Vlastimil.Wagner at hzscr.cz>
> > Date: Tuesday, October 29, 2024 at 8:00 AM
> > To: kea-users at lists.isc.org <kea-users at lists.isc.org>
> > Subject: [EXTERNAL] [Kea-users] Kea fail start after power outage, mysql connect problem
> >
> >
> > Hi
> >
> > I have Kea servers on places where sometimes doesnt work power (longer than UPS)
> > I have config, leases and hosts in database MySQL
> > When power is back server get up faster than switches and routers so interface is down and Kea doesnt start
> >
> > říj 29 12:42:15 dhcp-01.hzsulk.cz kea-dhcp4[8647]: ERROR [kea-dhcp4.dhcp4.140105088432256] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /etc/kea/kea-dhcp4.conf, reason: during update from
> > config backend database: Unknown server host 'db.example.com' (-2)
> > říj 29 12:42:15 dhcp-01.hzsulk.cz kea-dhcp4[8647]: ERROR [kea-dhcp4.dhcp4.140105088432256] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/etc/kea/kea-dhcp4.conf':
> > during update from config backend database: Unknown server host 'db.example.com' >
> > říj 29 12:42:15 dhcp-01.hzsulk.cz kea-dhcp4[8647]: ERROR [kea-dhcp4.dhcp4.140105088432256] DHCP4_PARSER_COMMIT_FAIL parser failed to commit changes: during update from config backend database:
> > Unknown server host 'db.example.com' (-2)
> >
> >
> > Config is:
> >
> >
> > "Dhcp4": {
> > "server-tag": "DHCP-01",
> > "interfaces-config": {
> > "interfaces": ["ens33"],
> > "service-sockets-max-retries": 100,
> > "service-sockets-retry-wait-time": 5000
> > },
> > "config-control": {
> > "config-databases": [{
> > "type": "mysql",
> > "name": "kea",
> > "user": "kea",
> > "password": "fhgfethfgthtfeg",
> > "host": "db.example.com",
> > "port": 3306,
> > # "retry-on-startup": "true",
> > "max-reconnect-tries" : 30000,
> > "reconnect-wait-time": 3000
> > }],
> > "config-fetch-wait-time": 20
> > },
> >
> > No setting work to try connect again
> >
> >
> > VW
>
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
More information about the Kea-users
mailing list