sqlippool error

igalatoczki at contactnet.hu igalatoczki at contactnet.hu
Wed Oct 4 09:48:27 CEST 2006


Hi All!

I use freeradius 1.1.3 with sqlippool but not work the ippool.
The radius -X give netx message:

Module: Loaded SQL IP Pool
 sqlippool: sql-instance-name = "sql"
 sqlippool: lease-duration = 3600
 sqlippool: pool-name = ""
 sqlippool: allocate-begin = "BEGIN"
 sqlippool: allocate-clear = "UPDATE radippool   SET nas_ip_address = '',
pool_k                                              ey = 0,
calling_station_id = '',   expiry_time = 'now'::timestamp(0) - '1 second 
                                            '::interval   WHERE pool_key
= '%{Calling-Station-Id}'"
 sqlippool: allocate-find = "SELECT ip_address FROM radippool   WHERE
pool_name                                               =
'%{reply:Pool-Name}' AND expiry_time < 'now'::timestamp(0)   ORDER BY
pool_nam                                              e, (username <>
'%{User-Name}'), (calling_station_id <> '%{Calling-Station-Id}')         
                                    , expiry_time   LIMIT 1   FOR UPDATE"
 sqlippool: allocate-update = "UPDATE radippool   SET nas_ip_address =
'%{NAS-IP                                              -Address}',
pool_key = '%{Calling-Station-Id}',   calling_station_id = '%{Callin     
                                        g-Station-Id}', username =
'%{User-Name}',   expiry_time = 'now'::timestamp(0) +                    
                          '3600 second'::interval   WHERE ip_address =
'%I'"
 sqlippool: allocate-commit = "COMMIT"
 sqlippool: allocate-rollback = "ROLLBACK"
 sqlippool: start-begin = "BEGIN"
 sqlippool: start-update = "UPDATE radippool   SET expiry_time =
'now'::timestam                                              p(0) + '%J
second'::interval   WHERE nas_ip_address = '%n' AND nas_port = '%p' A    
                                         ND pool_name = '%P'"
 sqlippool: start-commit = "COMMIT"
 sqlippool: start-rollback = "ROLLBACK"
 sqlippool: alive-begin = "BEGIN"
 sqlippool: alive-update = "UPDATE radippool   SET expiry_time =
'now'::timestam                                              p(0) + '3600
seconds'::interval   WHERE nas_ip_address = '%{Nas-IP-Address}' AND      
                                        pool_key = '%{NAS-Port}' AND
username = '%{User-Name}'   AND calling_station_id                       
                       = '%{Calling-Station-Id}' AND ip_address =
'%{Framed-IP-Address}'"
 sqlippool: alive-commit = "COMMIT"
 sqlippool: alive-rollback = "ROLLBACK"
 sqlippool: stop-begin = "BEGIN"
 sqlippool: stop-clear = "UPDATE radippool   SET nas_ip_address = '',
pool_key =                                               0,
calling_station_id = '',   expiry_time = 'now'::timestamp(0) - '1
second'::i                                              nterval   WHERE
nas_ip_address = '%{Nas-IP-Address}' AND pool_key = '%{NAS-Port}         
                                    ' AND username = '%{User-Name}'   AND
calling_station_id = '%{Calling-Station-Id                               
              }' AND ip_address = '%{Framed-IP-Address}'"
 sqlippool: stop-commit = "COMMIT"
 sqlippool: stop-rollback = "ROLLBACK"
 sqlippool: on-begin = "BEGIN"
 sqlippool: on-clear = "UPDATE radippool   SET nas_ip_address = '',
pool_key = 0                                              ,
calling_station_id = '',   expiry_time = 'now'::timestamp(0) - '1
second'::int                                              erval   WHERE
nas_ip_address = '%{Nas-IP-Address}' AND username = '%{User-Name}'       
                                         AND calling_station_id =
'%{Calling-Station-Id}' AND ip_address = '%{Framed-I                     
                        P-Address}'"
 sqlippool: on-commit = "COMMIT"
 sqlippool: on-rollback = "ROLLBACK"
 sqlippool: off-begin = "BEGIN"
 sqlippool: off-clear = "UPDATE radippool   SET nas_ip_address = '',
pool_key =                                               0,
calling_station_id = '',   expiry_time = 'now'::timestamp(0) - '1
second'::in                                              terval   WHERE
nas_ip_address = '%{Nas-IP-Address}' AND username = '%{User-Name}        
                                     '   AND calling_station_id =
'%{Calling-Station-Id}' AND ip_address = '%{Framed-                      
                       IP-Address}'"
 sqlippool: off-commit = "COMMIT"
 sqlippool: off-rollback = "ROLLBACK"
rlm_sql (sql): Reserving sql socket id: 4
Module: Instantiated sqlippool (sqlippool)
Listening on authentication *:1812
Listening on accounting *:1813
Ready to process requests.

The Radcheck table in sql database:

ID  USERNAME       ATTRIBUTE       OP    VALUE
1     test       User-Password     :=    1234
2     test       Simultaneous-Use  :=    1
3     test       Pool-Name         :=    testpool

The Radippool table in sql database:

ID   POOLNAME        IPADDRESS       .......   USERNAME
1    testpool        192.168.1.0/24              test

i use pppoe-server and if user connecting the radius.log :

Wed Oct  4 11:35:49 2006 : Error: sqlippool_command: database query error
Wed Oct  4 11:35:49 2006 : Error: sqlippool_query1: database query error
Wed Oct  4 11:35:49 2006 : Info: rlm_sqlippool: ip=[] len=0
Wed Oct  4 11:35:49 2006 : Error: sqlippool_command: database query error
Wed Oct  4 11:35:50 2006 : Error: sqlippool_command: database query error

any ideas?

ps: sorry my poor english

steve




More information about the Freeradius-Users mailing list