reading hosts from NAS table not working on 2.2.6?
Alan DeKok
aland at deployingradius.com
Sun May 3 16:15:22 CEST 2015
On May 3, 2015, at 1:41 AM, Alexander Silveröhrt <Alexander.Silverohrt at itux.se> wrote:
> I don't have any duplicates and i posted my config earlier.
It was a small piece of the config, and nothing from the SQL table.
> And its the same result when i only add one single host to the nas table(and i only have localhost in clients.conf and i only have one installed freeradius instance on the machine.). As soon as i add a VR server to the config with just the most basic setup i can think of then requests starts getting rejected.
Do you have a patch from the default config, so I can test it?
> I guess it becomes duplicate clients because? Each VR server uses "readclients = yes" and nas_table = "nas" and they all use same NAS table and then the logic somehow checks each VR servers client readings with the already processed VR servers client list.
The SQL module has "readdlients = yes". The virtual server doesn't have that.
If the same module is used in multiple virtual servers, then the module is only initialized once. So there's no way it can read the NAS table multiple times.
So I don't know what you mean by "they all use same NAS table".
The debug log you posted shows that the NAS table lists clients, and has a defined virtual server. You only posted a small piece of the debug output (again, NOT recommended), so it's impossible to tell what's going on.
> As i tried to say earlier i tried to do a workaround and let each VR server use its own NAS table and then it stopped complaining about duplicates.
I have no idea what that means. A virtual server doesn't use a NAS table. An SQL module uses a NAS table.
> But to add a NAS table for each VR server kind of makes it a bit annoying? But if that is how its suppose to be working now with 2.2.6 then i guess thats the way one have to do.
> Anyway it still doesn't work to let any VR server read clients from each own NAS table..
>
> I Don't know what the server should do..Maybe an easy fix is to only read the NAS table once at start and don't let the VR servers readings re-read the NAS table again unless the VR server actually is using another NAS table of course.
I think you're not clear on what the server does.
a) clients are read by the SQL module, not by a virtual server
b) each SQL module is initialized once, and reads the NAS table once
c) an SQL module can be used in multiple virtual servers
d) if the virtual servers don't have a "listen" section, the clients read from the NAS table become global clients
I *think* what you've done is configured multiple SQL modules, and then set "read_clients = yes" for all of them, and pointed all of them to the same NAS table. That doesn't make any sense. Don't do that. Be sure that the clients are read ONCE, so that there are no duplicates.
And post the FULL debug log from v3. The tiny pieces you've posted mean it's impossible to tell exactly what's going on. That makes it MUCH harder to help you.
Alan DeKok.
More information about the Freeradius-Users
mailing list