Virtual Server with Multiple Databases

Kelvin Chiang chiang_kelvin at
Thu Jan 22 07:52:36 CET 2009


I am currently using version 2.1.3-1. I was trying to create virtual servers accessing to different mysql databases. From some of the historical threads, I understood that the followings steps are needed:

1. Create an entry in /etc/raddb/dictionary. I had the line as:

ATTRIBUTE My-DB 3000 String

2. I edit the sql.conf with the following:

radius_db = %{control:My-DB}

3. In the virtual server section, I added the following at the top of the authorize and preacct sections:

update control {
    My-DB = "my_radiusdb_name"

With the above 3 changes, I run radiusd -X and I get the below errors. Can anyone help to identify what went wrong?

rad_recv: Access-Request packet from host port 57018, id=206, length=138
    NAS-IP-Address =
    NAS-Identifier = ""
    User-Name = "kelvincrypt"
    User-Password = "test"
    Service-Type = Login-User
    NAS-Port-Type = Ethernet
    NAS-Port = 3
    Framed-IP-Address =
    Called-Station-Id = "00:0d:48:36:2f:ff"
    Calling-Station-Id = "00:17:08:3e:a2:21"
server radius_test {
+- entering group authorize {...}
++[control] returns notfound
++[preprocess] returns ok
[auth_log]     expand: /var/log/radius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d -> /var/log/radius/radacct/
[auth_log] /var/log/radius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d expands to /var/log/radius/radacct/
[auth_log]     expand: %t -> Thu Jan 22 14:05:35 2009
++[auth_log] returns ok
++[chap] returns noop
[suffix] No '@' in User-Name = "kelvincrypt", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
[radius_test_sql]     expand: %{User-Name} -> kelvincrypt
[radius_test_sql] sql_set_user escaped user --> 'kelvincrypt'
rlm_sql (radius_test_sql): Ignoring unconnected handle 4..
rlm_sql (radius_test_sql): Ignoring unconnected handle 3..
rlm_sql (radius_test_sql): Ignoring unconnected handle 2..
rlm_sql (radius_test_sql): Ignoring unconnected handle 1..
rlm_sql (radius_test_sql): Ignoring unconnected handle 0..
rlm_sql (radius_test_sql): There are no DB handles to use! skipped 5, tried to connect 0
++[radius_test_sql] returns fail
} # server radius_test
Using Post-Auth-Type Reject
+- entering group Reject {...}
++[reply] returns noop
Delaying reject of request 0 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 0
Sending Access-Reject of id 206 to port 57018
    Reply-Message = "Authentication failed."
Waking up in 4.9 seconds.

See all the ways you can stay connected to friends and family
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Freeradius-Users mailing list