Clients not tied to a virtual server when loaded from a MySQL database

Kev Pearce at
Tue Sep 2 21:39:13 CEST 2014

Hi all,


I'm trying to load my clients from a MySQL database and wish to 'tie' them
to specific virtual servers.

Using the default SQL nas table query, I get the following:


rlm_sql (sql): Processing generate_sql_clients

rlm_sql (sql) in generate_sql_clients: query is SELECT id, nasname,
shortname, type, secret, server FROM nas

rlm_sql (sql): Reserving sql socket id: 4

rlm_sql_mysql: query:  SELECT id, nasname, shortname, type, secret, server
FROM nas

rlm_sql (sql): Read entry

rlm_sql (sql): Adding client (, server=vs1) to clients list

rlm_sql (sql): Read entry

rlm_sql (sql): Adding client (, server=vs2) to clients list

Failed to add duplicate client

rlm_sql (sql): Released sql socket id: 4

rlm_sql (sql): Failed to add client ( to clients list.
Maybe there's a duplicate?

Failed to load clients from SQL.


FR is clearly seeing the separate virtual server names (vs1 and ns2) but it
says there's a duplicate.

Now yes they do have the same IP address but they are tied to different
virtual servers, making them different client definitions.


If I manually place a client inside my server vs1 block and the same
in my server vs2 block, it loads them separately just fine, which is great
and exactly what I'm after but I wish to load them from sql.


Is it possible to have clients 'tied' into separate virtual servers like
this from sql on start up?


I'm also using a dynamic_clients definition inside the virtual server and
this is loading 'duplicate' entries into separate virtual servers perfectly,
but I guess that's because the dynamic_clients client definition is actually
already inside the virtual server block. This works great but I can't get
the loading on start up working from the nas table query as well. (I did
notice the dynamic _clients sql query for the server is not even called, I'm
presuming because it is already inside a virtual server block, it doesn't
need to fire at all.)


I'm running FR v2.2.5.


Cheers very much all,




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Freeradius-Users mailing list