sqlippool querries

Bill Schoolfield bill at billmax.com
Mon Dec 2 20:31:07 CET 2013


Hello,

I have a couple of things going on.

(1) My mysql based ippool is out of sync with the ips actually in use. 
This is leading to ip conflicts and immediate drops after successful login.

(2) take a look at the sql errors. It apparently doesn't like 
"expiry_time IS NULL" in the update.

For (1) how can I get the ippool in sync? Is the only way to reset the 
radippool table and drop all the connections from the NAS?

For (2) is this an error a by product of the immediate disconnect? Is 
the mysql version of sqlippool known to work.

Also for number (2) one problem I see is the schema doesn't account for 
callingstationid  that are this large. I assume I''ll need to change the 
schema for this.

Happy to send config file setup and/or radiusd -X output if it will 
help. Though the setup is very basic.


Bill

> tail -f /var/log/radius/radius.log
> Mon Dec  2 14:21:40 2013 : Info: rlm_sql_mysql: Starting connect to MySQL server for #4
> Mon Dec  2 14:21:40 2013 : Info: rlm_sql (sql): Connected new DB handle, #4
> Mon Dec  2 14:21:40 2013 : Info: Loaded virtual server <default>
> Mon Dec  2 14:21:40 2013 : Info: Ready to process requests.
> Mon Dec  2 14:28:24 2013 : Auth: Login OK: [abraham1078 at epsiton.com] (from client ERX2 port 21068 cli GigabitEthernet 3/0/6.3220146:322-146#587449101#801 GE1 TOROON4415W-TOROON4425W##pppoe 68:15:90:3e:0b:81#)
> Mon Dec  2 14:28:24 2013 : Error: sqlippool_command: database query error in: 'UPDATE radippool   SET nasipaddress = '', pool_key = 0,   callingstationid = '', username = '',   expiry_time IS NULL   WHERE expiry_time <= NOW() - INTERVAL 1 SECOND   AND nasipaddress = '204.101.13.1''
> Mon Dec  2 14:28:24 2013 : Error: rlm_radutmp: Logout for NAS ERX2 port 21068, but no Login record
> Mon Dec  2 14:28:24 2013 : Error: sqlippool_command: database query error in: 'UPDATE radippool  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '',  expiry_time IS NULL  WHERE nasipaddress = '204.101.13.1' AND pool_key = '21068'  AND username = 'abraham1078 at epsiton.com'  AND callingstationid = 'GigabitEthernet 3/0/6.3220146:322-146=23587449101=23801 GE1 TOROON4415W-TOROON4425W=23=23pppoe 68:15:90:3e:0b:81=23'  AND framedipaddress = '''
> Mon Dec  2 14:28:24 2013 : Info: Released IP  (did  cli GigabitEthernet 3/0/6.3220146:322-146#587449101#801 GE1 TOROON4415W-TOROON4425W##pppoe 68:15:90:3e:0b:81# user abraham1078 at epsiton.com)
> Mon Dec  2 14:28:24 2013 : Info: [sql] stop packet with zero session length. [user 'abraham1078 at epsiton.com', nas '204.101.13.1']
> Mon Dec  2 14:40:57 2013 : Auth: Login OK: [abraham1078 at epsiton.com] (from client ERX2 port 21070 cli GigabitEthernet 3/0/6.3220146:322-146#587449101#801 GE1 TOROON4415W-TOROON4425W##pppoe 68:15:90:3e:0b:81#)
query error here:
> Mon Dec  2 14:40:57 2013 : Error: sqlippool_command: database query error in: 'UPDATE radippool   SET nasipaddress = '', pool_key = 0,   callingstationid = '', username = '',   expiry_time IS NULL   WHERE expiry_time <= NOW() - INTERVAL 1 SECOND   AND nasipaddress = '204.101.13.1''
> Mon Dec  2 14:40:57 2013 : Error: rlm_radutmp: Logout for NAS ERX2 port 21070, but no Login record
> Mon Dec  2 14:40:57 2013 : Error: sqlippool_command: database query error in: 'UPDATE radippool  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '',  expiry_time IS NULL  WHERE nasipaddress = '204.101.13.1' AND pool_key = '21070'  AND username = 'abraham1078 at epsiton.com'  AND callingstationid = 'GigabitEthernet 3/0/6.3220146:322-146=23587449101=23801 GE1 TOROON4415W-TOROON4425W=23=23pppoe 68:15:90:3e:0b:81=23'  AND framedipaddress = '''
> Mon Dec  2 14:40:57 2013 : Info: Released IP  (did  cli GigabitEthernet 3/0/6.3220146:322-146#587449101#801 GE1 TOROON4415W-TOROON4425W##pppoe 68:15:90:3e:0b:81# user abraham1078 at epsiton.com)
> Mon Dec  2 14:40:57 2013 : Info: [sql] stop packet with zero session length. [user 'abraham1078 at epsiton.com', nas '204.101.13.1']


More information about the Freeradius-Users mailing list