[Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Ismael Suarez Maldonado
Getting the following message:

2020-07-03 16:58:22.354 WARN  [kea-dhcp4.alloc-engine/3131] ALLOC_ENGINE_V4_ALLOC_FAIL [hwtype=1 aa:bb:cc:dd:ee:ff], cid=[aa:bb:cc:dd:ee:ff], tid=0xa5d749bc: failed to allocate an IPv4 address after 0 attempt(s)


In the documentation I see it reads:



ALLOC_ENGINE_V4_ALLOC_FAIL

%1: failed to allocate an IPv4 address after %2 attempt(s)

The DHCP allocation engine gave up trying to allocate an IPv4 address after the specified number of attempts. This probably means that the address pool from which the allocation is being attempted is either empty, or very nearly empty. As a result, the client will have been refused a lease. The first argument includes the client identification information. This message may indicate that your address pool is too small for the number of clients you are trying to service and should be expanded. Alternatively, if the you know that the number of concurrently active clients is less than the addresses you have available, you may want to consider reducing the lease lifetime. In this way, addresses allocated to clients that are no longer active on the network will become available sooner.


But the leases DB (MySQL) is empty. How can I force kea to reload / reset leases to start fresh?

It was working all good, until I added a few more subnets for further testing, then moved a client to another network/subnet and started seeing the message. Maybe the subnet_id's got mixed or something down that line?


Thanks again everyone!



--

Ism
_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Conor Mullen
Hey Ismael,

I saw a similar error message when I'd broken my ipv4 host reservations in the mysql hosts table. I had subnets with required client classes and when I broke the host reservation for a specific mac address (I had passed in a malformed user-context value) it spit out that same error since it didn't register the mac in question as having a valid reservation. Are you using client classes to gate your subnets? How are you defining reservations?

On Fri, Jul 3, 2020, 5:08 PM Ismael Suarez <[hidden email]> wrote:
Getting the following message:

2020-07-03 16:58:22.354 WARN  [kea-dhcp4.alloc-engine/3131] ALLOC_ENGINE_V4_ALLOC_FAIL [hwtype=1 aa:bb:cc:dd:ee:ff], cid=[aa:bb:cc:dd:ee:ff], tid=0xa5d749bc: failed to allocate an IPv4 address after 0 attempt(s)


In the documentation I see it reads:



ALLOC_ENGINE_V4_ALLOC_FAIL

%1: failed to allocate an IPv4 address after %2 attempt(s)

The DHCP allocation engine gave up trying to allocate an IPv4 address after the specified number of attempts. This probably means that the address pool from which the allocation is being attempted is either empty, or very nearly empty. As a result, the client will have been refused a lease. The first argument includes the client identification information. This message may indicate that your address pool is too small for the number of clients you are trying to service and should be expanded. Alternatively, if the you know that the number of concurrently active clients is less than the addresses you have available, you may want to consider reducing the lease lifetime. In this way, addresses allocated to clients that are no longer active on the network will become available sooner.


But the leases DB (MySQL) is empty. How can I force kea to reload / reset leases to start fresh?

It was working all good, until I added a few more subnets for further testing, then moved a client to another network/subnet and started seeing the message. Maybe the subnet_id's got mixed or something down that line?


Thanks again everyone!



--

Ism
_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Ismael Suarez Maldonado
Dont have ‘client-classes’ in my config. Not using reservations. Just simple subnets.

Used to have it setup in HA but now don’t. Still have de HA_server1 for each subnet. Think that may be bothering somehow?


—-
Ism

________________________________
From: Conor Mullen <[hidden email]>
Sent: Friday, July 3, 2020 6:32 PM
To: Ismael Suarez
Cc: [hidden email]
Subject: Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Hey Ismael,

I saw a similar error message when I'd broken my ipv4 host reservations in the mysql hosts table. I had subnets with required client classes and when I broke the host reservation for a specific mac address (I had passed in a malformed user-context value) it spit out that same error since it didn't register the mac in question as having a valid reservation. Are you using client classes to gate your subnets? How are you defining reservations?

On Fri, Jul 3, 2020, 5:08 PM Ismael Suarez <[hidden email]<mailto:[hidden email]>> wrote:
Getting the following message:

2020-07-03 16:58:22.354 WARN  [kea-dhcp4.alloc-engine/3131] ALLOC_ENGINE_V4_ALLOC_FAIL [hwtype=1 aa:bb:cc:dd:ee:ff], cid=[aa:bb:cc:dd:ee:ff], tid=0xa5d749bc: failed to allocate an IPv4 address after 0 attempt(s)


In the documentation I see it reads:



ALLOC_ENGINE_V4_ALLOC_FAIL

%1: failed to allocate an IPv4 address after %2 attempt(s)

The DHCP allocation engine gave up trying to allocate an IPv4 address after the specified number of attempts. This probably means that the address pool from which the allocation is being attempted is either empty, or very nearly empty. As a result, the client will have been refused a lease. The first argument includes the client identification information. This message may indicate that your address pool is too small for the number of clients you are trying to service and should be expanded. Alternatively, if the you know that the number of concurrently active clients is less than the addresses you have available, you may want to consider reducing the lease lifetime. In this way, addresses allocated to clients that are no longer active on the network will become available sooner.


But the leases DB (MySQL) is empty. How can I force kea to reload / reset leases to start fresh?

It was working all good, until I added a few more subnets for further testing, then moved a client to another network/subnet and started seeing the message. Maybe the subnet_id's got mixed or something down that line?


Thanks again everyone!



--

Ism
_______________________________________________
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
[hidden email]<mailto:[hidden email]>
https://lists.isc.org/mailman/listinfo/kea-users
_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Joshua Schaeffer
On 7/3/20 4:48 PM, Ismael Suarez wrote:
Dont have ‘client-classes’ in my config. Not using reservations. Just simple subnets.

Used to have it setup in HA but now don’t. Still have de HA_server1 for each subnet. Think that may be bothering somehow?
I would recommend turning on DEBUG. You will get far more information as to why the allocation failed, or at least be able to rule out certain situations.
-- 
Thanks,
Joshua Schaeffer

_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Ismael Suarez Maldonado
Turns out, one I removed the following from each subnet (just did them all at once) it started giving out leases.
"client-class": "HA_server1"
This will not be used in cluster for now, so I can manage. But really don't understat why it was not working before. Any setting I am missing where it was hitting a default threshold?

Kind of bumbed out not finding the culprit of my problem.

The setting I am testing out has over 130 subnets looking like the following (not real IPs here)


NOT WORKING
        {
            "subnet": "1.2.3.4/18",
            "id": 1008,
            "pools": [ { "pool": "1.2.3.2 - 1.2.3.254", "client-class": "HA_server1" } ],
            "option-data": [ { "name": "routers", "data": "1.2.3.1" } ]
        },


WORKING
        {
            "subnet": "1.2.3.0/18",
            "id": 1008,
            "pools": [ { "pool": "1.2.3.2 - 1.2.3.254" } ],
            "option-data": [ { "name": "routers", "data": "1.2.3.1" } ]
        },


NOTE: HA hook is not in use (commented).

--

Ism


-----Original Message-----
From: Joshua Schaeffer <[hidden email]<mailto:Joshua%20Schaeffer%20%[hidden email]%3e>>
To: [hidden email]<mailto:[hidden email]>
Subject: Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL
Date: Fri, 03 Jul 2020 17:25:15 -0600

On 7/3/20 4:48 PM, Ismael Suarez wrote:

Dont have ‘client-classes’ in my config. Not using reservations. Just simple subnets.


Used to have it setup in HA but now don’t. Still have de HA_server1 for each subnet. Think that may be bothering somehow?


I would recommend turning on DEBUG. You will get far more information as to why the allocation failed, or at least be able to rule out certain situations.

--

Thanks,

Joshua Schaeffer

_______________________________________________

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

[hidden email]<mailto:[hidden email]>

https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Sten Carlsen

Thanks

Sten

On 6 Jul 2020, at 14.33, Ismael Suarez <[hidden email]> wrote:

Turns out, one I removed the following from each subnet (just did them all at once) it started giving out leases.
"client-class": "HA_server1"
This will not be used in cluster for now, so I can manage. But really don't understat why it was not working before. Any setting I am missing where it was hitting a default threshold?

Kind of bumbed out not finding the culprit of my problem.

The setting I am testing out has over 130 subnets looking like the following (not real IPs here)


NOT WORKING
       {
           "subnet": "1.2.3.4/18",
           "id": 1008,
           "pools": [ { "pool": "1.2.3.2 - 1.2.3.254", "client-class": "HA_server1" } ],
           "option-data": [ { "name": "routers", "data": "1.2.3.1" } ]
       },


The example in the manuallooks like this:

The client-class is defined outside the pool, so syntax seems to be incorrect.


WORKING
       {
           "subnet": "1.2.3.0/18",
           "id": 1008,
           "pools": [ { "pool": "1.2.3.2 - 1.2.3.254" } ],
           "option-data": [ { "name": "routers", "data": "1.2.3.1" } ]
       },


NOTE: HA hook is not in use (commented).

--

Ism


-----Original Message-----
From: Joshua Schaeffer <[hidden email]<[hidden email]%3e>>
To: [hidden email]<[hidden email]>
Subject: Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL
Date: Fri, 03 Jul 2020 17:25:15 -0600

On 7/3/20 4:48 PM, Ismael Suarez wrote:

Dont have ‘client-classes’ in my config. Not using reservations. Just simple subnets.


Used to have it setup in HA but now don’t. Still have de HA_server1 for each subnet. Think that may be bothering somehow?


I would recommend turning on DEBUG. You will get far more information as to why the allocation failed, or at least be able to rule out certain situations.

--

Thanks,

Joshua Schaeffer

_______________________________________________

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

[hidden email]<[hidden email]>

https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users


_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL

Conor Mullen
In reply to this post by Ismael Suarez Maldonado
Hey Ismael, 

So what you are seeing here is the subnet is being defined as only available for a specific client-class:

"pools": [ { "pool": "1.2.3.2 - 1.2.3.254", "client-class": "HA_server1" } ],

This means (as far as I understand) that specific pool in that subnet will only be offered to dhcp requests that are tagged with that HA_server1 client-class. So unless you have a host-reservation defined somewhere that associates your dhcp request with that "HA_server1" client-class that pool you've set up will not be available for your request. 

Client classes are great for allowing you better access control to your subnet pools, but with your original config they'll block your requests unless you are setting those classes in a host reservation:

Here's the ISC provided example I ended up using to set up reservations for my subnets:

Hope that helps shed some light on how that works. Nice work troubleshooting your way down to the issue. 

All the best,
Conor Mullen 



On Mon, Jul 6, 2020 at 8:34 AM Ismael Suarez <[hidden email]> wrote:
Turns out, one I removed the following from each subnet (just did them all at once) it started giving out leases.
"client-class": "HA_server1"
This will not be used in cluster for now, so I can manage. But really don't understat why it was not working before. Any setting I am missing where it was hitting a default threshold?

Kind of bumbed out not finding the culprit of my problem.

The setting I am testing out has over 130 subnets looking like the following (not real IPs here)


NOT WORKING
        {
            "subnet": "1.2.3.4/18",
            "id": 1008,
            "pools": [ { "pool": "1.2.3.2 - 1.2.3.254", "client-class": "HA_server1" } ],
            "option-data": [ { "name": "routers", "data": "1.2.3.1" } ]
        },


WORKING
        {
            "subnet": "1.2.3.0/18",
            "id": 1008,
            "pools": [ { "pool": "1.2.3.2 - 1.2.3.254" } ],
            "option-data": [ { "name": "routers", "data": "1.2.3.1" } ]
        },


NOTE: HA hook is not in use (commented).

--

Ism


-----Original Message-----
From: Joshua Schaeffer <[hidden email]<mailto:[hidden email]%3e>>
To: [hidden email]<mailto:[hidden email]>
Subject: Re: [Kea-users] ALLOC_ENGINE_V4_ALLOC_FAIL
Date: Fri, 03 Jul 2020 17:25:15 -0600

On 7/3/20 4:48 PM, Ismael Suarez wrote:

Dont have ‘client-classes’ in my config. Not using reservations. Just simple subnets.


Used to have it setup in HA but now don’t. Still have de HA_server1 for each subnet. Think that may be bothering somehow?


I would recommend turning on DEBUG. You will get far more information as to why the allocation failed, or at least be able to rule out certain situations.

--

Thanks,

Joshua Schaeffer

_______________________________________________

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

[hidden email]<mailto:[hidden email]>

https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users