sql + ippool + redundancy

Konstantin Chekushin koch2 at inbox.lv
Wed Feb 3 15:13:16 CET 2010


Hi! I have a question about failover configuration.
I have freeradius + sqlippool module for ip-assigning. I have 2
databases for redundancy (described in sql1 and sql2). 
my file from enabled-server:
server allauth {
        listen {
               
type = auth
               
ipaddr = *
               
port = 1812
        }
        authorize {
               
auth_log
               
update control {
                       
Pool-Name = 'main_pool'
               
}
               
redundant {
                       
# we need this only to get new Pool-name, if user exist in our defined
group.
                       
sql1 
                       
sql2
               
}
               
update control {
                       
# any user must be accepted.
                       
Auth-Type = 'Accept'
               
}
        }
        post-auth {
               
redundant {
                       
sqlippool1 # this module use sql1 for assigning
                       
sqlippool2 # this module use sql2 for assigning, if first will fails.
                       
main_pool
               
}
               
reply_log
        }
}
I've run the freeradius, but when I turned off my first database
(sql1), my redundancy in post-auth return incorrect code:, sqlippool1
returns "noop", neither "fail".
May be I've selected the wrong way to solve my task? Any comments are
welcome... How can I switch ip-assigning on sqlippool2, when sql1
(used by sqlippool1) doesn't work?
some information from log:
Wed Feb  3 15:36:29 2010 : Error: rlm_sql (sql1): Failed to
connect DB handle #1
Wed Feb  3 15:36:29 2010 : Error: rlm_sql (sql1): reconnect
failed, database down?
Wed Feb  3 15:36:29 2010 : Error: sqlippool_command: database
query error in: 'COMMIT'
Wed Feb  3 15:36:29 2010 : Info: [sqlippool1]   expand:
SELECT id FROM radippool  WHERE pool_name='%{control:Pool-Name}'
LIMIT 1 -> SELECT id FROM radippool  WHERE pool_name='main_pool'
LIMIT 1
Wed Feb  3 15:36:29 2010 : Error: rlm_sql_mysql: Socket not
connected
Wed Feb  3 15:36:29 2010 : Debug: rlm_sql (sql1): Attempting to
connect rlm_sql_mysql #1
Wed Feb  3 15:36:29 2010 : Info: rlm_sql_mysql: Starting connect
to MySQL server for #1
Wed Feb  3 15:36:29 2010 : Error: rlm_sql_mysql: Couldn't connect
socket to MySQL server user at ip:dbname
Wed Feb  3 15:36:29 2010 : Error: rlm_sql_mysql: Mysql error
'Lost connection to MySQL server at 'reading initial communication
packet', system error: 0'
Wed Feb  3 15:36:29 2010 : Error: rlm_sql (sql1): Failed to
connect DB handle #1
Wed Feb  3 15:36:29 2010 : Error: rlm_sql (sql1): reconnect
failed, database down?
Wed Feb  3 15:36:29 2010 : Error: sqlippool_query1: database
query error
Wed Feb  3 15:36:29 2010 : Debug: rlm_sql (sql1): Released sql
socket id: 1
Wed Feb  3 15:36:29 2010 : Info: [sqlippool1] IP address could
not be allocated as no pool exists with that name.
Wed Feb  3 15:36:29 2010 : Info: +++[sqlippool1] returns noop
Wed Feb  3 15:36:29 2010 : Info: ++- policy redundant returns
noop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100203/926d89a0/attachment.html>


More information about the Freeradius-Users mailing list