Redundant SQLIPPOOL > NOK
Breuer Nicolas
Nicolas.Breuer at Belcenter.biz
Wed Jun 11 15:40:36 CEST 2008
Dear,
Redundant config seems not working.
Conf :
LIVE-SYSTEM-01 {
fail=1
}
if (!ok) {
LIVE-SYSTEM-02
}
>> LIVE SYSTEM = SQLIPPOOL
When database was down it works
but when radius received a 1017 error, it doesn't go to the second
module.
I checked the same thing with the accounting (sql module) > OK.
Receive an Alive packet so Start the SQLIPPOOL module
(in our config - not very standart)
++? if (!ok)
? Evaluating !(ok) -> TRUE
++? if (!ok) -> FALSE
rlm_sql (ACCOUNTING-01): Reserving sql socket id: 1
expand: %{User-Name} -> BCnico at XXX
rlm_sql (ACCOUNTING-01): sql_set_user escaped user --> 'BCnico at XXX'
expand: BEGIN -> BEGIN
expand: %{User-Name} -> BCnico at XXX
rlm_sql (ACCOUNTING-01): sql_set_user escaped user --> 'BCnico at XXX'
expand: UPDATE radippool SET nas_ip_address = '%{NAS-IP-Address}',
rb_path='%{Calling-Station-Id}', calling_station_id = '%{User-Name}', expiry_time =
DATE_ADD(NOW(), INTERVAL 86400 SECOND) WHERE ip_address = '%{Framed-IP-
Address}' -> UPDATE radippool SET nas_ip_address = '217.112.179.1',
rb_path='*xxx*14/1*35*272', calling_station_id = 'BCnico at XXX', expiry_time =
DATE_ADD(NOW(), INTERVAL 86400 SECOND) WHERE ip_address = '217.112.179.x'
> ERROR RECEIVED rlm_sql_mysql: MYSQL check_error: 1017 received
sqlippool_command: database query error in: 'UPDATE radippool SET nas_ip_address =
'217.112.179.1', rb_path='*vxx4/1*35*272', calling_station_id = 'BCnico at XXX', expiry_time =
DATE_ADD(NOW(), INTERVAL 86400 SECOND) WHERE ip_address = '217.112.179.5''
expand: %{User-Name} -> BCnico at xxx
rlm_sql (ACCOUNTING-01): sql_set_user escaped user --> 'BCnico at xxx'
expand: COMMIT -> COMMIT
rlm_sql (ACCOUNTING-01): Released sql socket id: 1
++[LIVE-SYSTEM-01] returns ok
Returns OK but >> sqlippool_command: database query error in
For info : i paste the same scenario on the sql module (accounting) , who works :
+- entering group accounting
expand: %{User-Name} -> BCnico at XXX
rlm_sql (ACCOUNTING-01): sql_set_user escaped user --> 'BCnico at XXX'
expand: INSERT into radacct ................
rlm_sql (ACCOUNTING-01): Reserving sql socket id: 0
rlm_sql_mysql: MYSQL check_error: 1017 received
> Alternate query:
expand: UPDATE radacct SET AcctStartTime .....
rlm_sql_mysql: MYSQL check_error: 1017 received
rlm_sql_mysql: MYSQL check_error: 1017 received
rlm_sql_mysql: Cannot store result
++[ACCOUNTING-01] returns fail
OK!!! > Go to Second database..
++? if (!ok)
? Evaluating !(ok) -> FALSE
++? if (!ok) -> TRUE
++- entering if (!ok)
expand: %{User-Name} -> BCnico at XX
rlm_sql (ACCOUNTING-02):
But ....
On the SQLIPPOOL on the post auth section it works (same table) ... Hum , Strange
rlm_sql_mysql: MYSQL check_error: 1017 received
sqlippool_query1: database query error
expand: %{User-Name} -> BCnico at XXX
rlm_sql (ACCOUNTING-01): sql_set_user escaped user --> 'BCnico at XXX'
expand: COMMIT -> COMMIT
rlm_sql (ACCOUNTING-01): Released sql socket id: 2
rlm_sqlippool: IP address could not be allocated.
expand: IP Allocation FAILED from XXX
+++[LIVE-SYSTEM-01] returns noop
>>> NOop so NOT OK ,
> Go to the 2nd db :
+++? if (!ok)
? Evaluating !(ok) -> FALSE
+++? if (!ok) -> TRUE
+++- entering if (!ok)
rlm_sql (ACCOUNTING-02): Reserving sql socket id: 2
etc...
Allocated IP: 217.112.186.180 from ip_pooling (did cli port user BCnico at XXX)
++++[LIVE-SYSTEM-02] returns ok
More information about the Freeradius-Users
mailing list