[Kea-users] problems enabling HA Hot-Standby setup (OPEN)

Weisteen Per per.weisteen at telenor.no
Thu Mar 24 09:13:59 UTC 2022


I believe I’ve discovered why my setup doesn’t play. Seems HA feature depends on using configuration backend (CB) which again requires use of MySQL.

I was hoping HA could have worked using memfile but I guess not.

./PerW

From: Kea-users <kea-users-bounces at lists.isc.org> On Behalf Of Weisteen Per
Sent: tirsdag 22. mars 2022 15:08
To: Dan Oachs <doachs at gac.edu>; Bohnenberger, Mark <mark.bohnenberger at bechtle.com>
Cc: kea-users at lists.isc.org
Subject: Re: [Kea-users] problems enabling HA Hot-Standby setup (OPEN)

I’ve changed ports so that kea-ctrl-agent is listening on 8000 and kea-dhcp4 on 8001. I’ve also verified firewall openings is ok using nc.
Both kea-ctrl-agent and kea-dhcp4 is running as non-root btw.

lsof –I :8000 is showing :
COMMAND      PID     USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
kea-ctrl- 305277   dhcpuser    7u  IPv4 99087541      0t0  TCP localhost:8000 (LISTEN)

but lsof –I :8001 shows nothing. Should kea-ctrl-agent be configured to use server IP instead of loopback?

./PerW

From: Dan Oachs <doachs at gac.edu<mailto:doachs at gac.edu>>
Sent: tirsdag 22. mars 2022 14:32
To: Bohnenberger, Mark <mark.bohnenberger at bechtle.com<mailto:mark.bohnenberger at bechtle.com>>
Cc: Weisteen Per <per.weisteen at telenor.no<mailto:per.weisteen at telenor.no>>; kea-users at lists.isc.org<mailto:kea-users at lists.isc.org>
Subject: Re: [Kea-users] problems enabling HA Hot-Standby setup (OPEN)

Good point.  I think the default for the kea-ctrl-agent is to use port 8000.  In that case you should change the kea control agent to use a different port such as 8001 since you can't have both trying to use the same port.  If you have not already, look at /etc/kea/kea-ctrl-agent.conf

--Dan


On Tue, Mar 22, 2022 at 8:28 AM Bohnenberger, Mark <mark.bohnenberger at bechtle.com<mailto:mark.bohnenberger at bechtle.com>> wrote:
Do have configured the kea-ctrl-agent, which is responsible for the activation / communication of the RESTful service?

Mark


Von: Kea-users <kea-users-bounces at lists.isc.org<mailto:kea-users-bounces at lists.isc.org>> Im Auftrag von Dan Oachs
Gesendet: Dienstag, 22. März 2022 14:08
An: Weisteen Per <per.weisteen at telenor.no<mailto:per.weisteen at telenor.no>>
Cc: kea-users at lists.isc.org<mailto:kea-users at lists.isc.org>
Betreff: Re: [Kea-users] problems enabling HA Hot-Standby setup (OPEN)

That looks very similar to my setup which is working.  Are you sure the kea service is not listening on port 8000? One way to check would be with "lsof -i -P| grep kea-dhcp" and look for a line showing the hostname:8000 (LISTEN).

If the service is listening, then perhaps there is a firewall blocking incoming traffic to port 8000?

--Dan


On Tue, Mar 22, 2022 at 6:53 AM Weisteen Per <per.weisteen at telenor.no<mailto:per.weisteen at telenor.no>> wrote:
Hi, I've set up a HA Hot-Standby config according to docs but I can't figure out why the servers doesn't listen on port 8000.
I thought that was the port configured for heartbeat. I'm a little confused and would be very happy if someone could explain how this is supposed to work ?

I'm running KEA on RHEL 8 servers installed from KEA 2.0 repo using yum install.

My HA config for primary server (pls ignore any missing parentheses ad this is just an extract:

"library": "/usr/lib64/kea/hooks/libdhcp_ha.so",
                "parameters": {
                        "high-availability": [{
                                "this-server-name": "tst-dhcp01",
                "mode": "hot-standby",
                "heartbeat-delay": 10000,
                "max-response-delay": 10000,
                "max-ack-delay": 5000,
                "max-unacked-clients": 5,
                                "multi-threading": {
                                        "enable-multi-threading": true,
                                        "http-dedicated-listener": true,
                                        "http-listener-threads": 4,
                                        "http-client-threads": 4
                },
                                "peers": [{
                        "name": "tst-dhcp01",
                                "url": "http://10.123.10.10:8000/<https://urldefense.com/v3/__http:/10.123.10.10:8000/__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjo1pyseY$>",
                        "role": "primary",
                            "auto-failover": true
                },{
                              "name": "tst-dhcp02",
                               "url": "http://10.123.20.20:8000/<https://urldefense.com/v3/__http:/10.123.20.20:8000/__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjTMMBPog$>",
                               "role": "standby",
                               "auto-failover": true
                }]

and for standby server:

"library": "/usr/lib64/kea/hooks/libdhcp_ha.so",
                "parameters": {
                "high-availability": [{
                                "this-server-name": "tst-dhcp02",
                                "mode": "hot-standby",
                                "heartbeat-delay": 10000,
                                "max-response-delay": 10000,
                                "max-ack-delay": 5000,
                                "max-unacked-clients": 5,
                                "multi-threading": {
                                        "enable-multi-threading": true,
                                        "http-dedicated-listener": true,
                                        "http-listener-threads": 4,
                                        "http-client-threads": 4
                                },
                        "peers": [{
                        "name": "tst-dhcp01",
                        "url": "http://10.123.10.10:8000/<https://urldefense.com/v3/__http:/10.123.10.10:8000/__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjo1pyseY$>",
                        "role": "primary",
                                        "auto-failover": true
                        },{
                        "name": "tst-dhcp02",
                        "url": "http://10.123.20.20:8000/<https://urldefense.com/v3/__http:/10.123.20.20:8000/__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjTMMBPog$>",
                        "role": "standby",
                                        "auto-failover": true
                                }] /* peers */
                        }] /* high-availability */
                }

Kea-debug.log shows :

HA_HEARTBEAT_COMMUNICATIONS_FAILED failed to send heartbeat to tst-dhcp02 (http://10.123.20.20:8000/<https://urldefense.com/v3/__http:/10.123.20.20:8000/__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjTMMBPog$>): Connection refused
HA_COMMUNICATION_INTERRUPTED communication with tst-dhcp02 is interrupted

And similar on the standby server but differet IP-address and name of course.

./PerW

--
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/<https://urldefense.com/v3/__https:/www.isc.org/contact/__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjSjV9ppY$> for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users<https://urldefense.com/v3/__https:/lists.isc.org/mailman/listinfo/kea-users__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjivlq3WM$>.

Kea-users mailing list
Kea-users at lists.isc.org<mailto:Kea-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/kea-users<https://urldefense.com/v3/__https:/lists.isc.org/mailman/listinfo/kea-users__;!!J748QdifiTU!yBWK0nZy5mHL2PL9-6HyJxFlHKds79HoSewLccSsq7Jo2-Btrw22dfTb6nrGDbdjivlq3WM$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220324/77bb6ce7/attachment-0001.htm>


More information about the Kea-users mailing list