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

Kev Pearce email.me at kevp.com
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
nasname=1.1.1.1,shortname=1.1.1.1,secret=testing111

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

rlm_sql (sql): Read entry
nasname=1.1.1.1,shortname=1.1.1.1,secret=testing222

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

Failed to add duplicate client 1.1.1.1

rlm_sql (sql): Released sql socket id: 4

rlm_sql (sql): Failed to add client 1.1.1.1 (1.1.1.1) 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 1.1.1.1 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,

 

Kev/.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140902/aa28d1fd/attachment-0001.html>


More information about the Freeradius-Users mailing list