If SQL not available during startup, then it not available all the time
Hello ! I use FreeRADIUS and PostgreSQL for productional VoIP billing. I had found that if SQL server not available during FreeRADIUS startup:
Sun Apr 23 10:08:22 2006 : Info: rlm_sql (pgsql-voip): Driver rlm_sql_postgresql (module rlm_sql_postgresql) loaded and linked Sun Apr 23 10:08:22 2006 : Info: rlm_sql (pgsql-voip): Attempting to connect to voipflik@10.9.9.2:/isbs Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 0 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): Attempting to connect rlm_sql_postgresql #0 Sun Apr 23 10:08:22 2006 : Error: rlm_sql_postgresql: Couldn't connect socket to PostgreSQL server voipflik@10.9.9.2:isbs Sun Apr 23 10:08:22 2006 : Error: rlm_sql_postgresql: Postgresql error 'could not connect to server: Connection refused ?Is the server running on host "10.9.9 Sun Apr 23 10:08:22 2006 : Error: rlm_sql (pgsql-voip): Failed to connect DB handle #0 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 1 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 2 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 3 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 4 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): Failed to connect to any SQL server. Sun Apr 23 10:08:22 2006 : Debug: Module: Instantiated sql (pgsql-voip)
then it will not available all the time until we reload FreeRADIUS daemon - it not ever try to reconnect:
Sun Apr 23 10:17:51 2006 : Debug: radius_xlat: 'INSERT into radoriginate (RadiusServerName, UserName, NASIPAddress, AcctStartTime, AcctStopTime, Cal Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring unconnected handle 4.. Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring unconnected handle 3.. Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring unconnected handle 2.. Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring unconnected handle 1.. Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring unconnected handle 0.. Sun Apr 23 10:17:51 2006 : Info: rlm_sql (pgsql-voip): There are no DB handles to use! skipped 5, tried to connect 0
Why FreeRADIUS do not try to reconnect during sql command must be proceeded ? Is it possible to fix via configuration parameter or its hard-coded bug ? P.S. I had maid perl-script to recover radius cdrs into DB from standard FreeRADIUS detail-* files. If any interesting in it, I'll public it on the web. Thanks a lot Ruslan A Dautkhanov
On Fri 19 May 2006 09:42, Ruslan A Dautkhanov wrote:
Hello !
I use FreeRADIUS and PostgreSQL for productional VoIP billing.
I had found that if SQL server not available during FreeRADIUS startup:
Sun Apr 23 10:08:22 2006 : Info: rlm_sql (pgsql-voip): Driver
rlm_sql_postgresql (module rlm_sql_postgresql) loaded and linked
Sun Apr 23 10:08:22 2006 : Info: rlm_sql (pgsql-voip): Attempting to
connect to voipflik@10.9.9.2:/isbs
Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 0 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): Attempting to
connect rlm_sql_postgresql #0
Sun Apr 23 10:08:22 2006 : Error: rlm_sql_postgresql: Couldn't
connect socket to PostgreSQL server voipflik@10.9.9.2:isbs
Sun Apr 23 10:08:22 2006 : Error: rlm_sql_postgresql: Postgresql
error 'could not connect to server: Connection refused ?Is the server running on host "10.9.9
Sun Apr 23 10:08:22 2006 : Error: rlm_sql (pgsql-voip): Failed to
connect DB handle #0
Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 1 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 2 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 3 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): starting 4 Sun Apr 23 10:08:22 2006 : Debug: rlm_sql (pgsql-voip): Failed to
connect to any SQL server.
Sun Apr 23 10:08:22 2006 : Debug: Module: Instantiated sql (pgsql-voip)
then it will not available all the time until we reload FreeRADIUS daemon -
it not ever try to reconnect:
Sun Apr 23 10:17:51 2006 : Debug: radius_xlat: 'INSERT into
radoriginate (RadiusServerName, UserName, NASIPAddress, AcctStartTime, AcctStopTime, Cal
Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring
unconnected handle 4..
Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring
unconnected handle 3..
Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring
unconnected handle 2..
Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring
unconnected handle 1..
Sun Apr 23 10:17:51 2006 : Debug: rlm_sql (pgsql-voip): Ignoring
unconnected handle 0..
Sun Apr 23 10:17:51 2006 : Info: rlm_sql (pgsql-voip): There are no
DB handles to use! skipped 5, tried to connect 0
Why FreeRADIUS do not try to reconnect during sql command must be proceeded ? Is it possible to fix via configuration parameter or its hard-coded bug ?
P.S. I had maid perl-script to recover radius cdrs into DB from standard FreeRADIUS detail-* files. If any interesting in it, I'll public it on the web.
I would be interested, however there is already a perl script that does exactly that called h323detail2db.pl in src/billing/ It is specific to Cisco h323 VSA records and my pqsl-voip schema but it can be trivially changed to work with "standard" records. If you give me a look at your script, maybe we can combine our work. Regards -- Peter Nixon http://www.peternixon.net/ PGP Key: http://www.peternixon.net/public.asc
Ruslan A Dautkhanov <rusland@scn.ru> wrote:
I had found that if SQL server not available during FreeRADIUS startup: ... then it will not available all the time until we reload FreeRADIUS daemon - it not ever try to reconnect:
It should. See sql.c, and the "connect_failure_retry_delay" option. The default is 60 seconds. You can change that to a lower value. Alan DeKok.
participants (3)
-
Alan DeKok -
Peter Nixon -
Ruslan A Dautkhanov