[OpenSIPS-Users] CDRtool freeradius mysql error

osiris123d duane.larson at gmail.com
Wed Dec 23 23:21:36 CET 2009


One more bit of info.

If I start freeradius in debug mode I see the following

CDRTool:/etc/init.d# freeradius -X
Starting - reading configuration files ...
reread_config:  reading radiusd.conf
Config:   including file: /etc/freeradius/proxy.conf
Config:   including file: /etc/freeradius/clients.conf
Config:   including file: /etc/freeradius/snmp.conf
Config:   including file: /etc/freeradius/sql.conf
 main: prefix = "/usr"
 main: localstatedir = "/var"
 main: logdir = "/var/log/freeradius"
 main: libdir = "/usr/lib/freeradius"
 main: radacctdir = "/var/log/freeradius/radacct"
 main: hostname_lookups = no
 main: snmp = no
 main: max_request_time = 6
 main: cleanup_delay = 5
 main: max_requests = 1024
 main: delete_blocked_requests = 0
 main: port = 0
 main: allow_core_dumps = no
 main: log_stripped_names = no
 main: log_file = "/var/log/freeradius/radius.log"
 main: log_auth = no
 main: log_auth_badpass = no
 main: log_auth_goodpass = no
 main: pidfile = "/var/run/freeradius/freeradius.pid"
 main: bind_address = 12.*.*.218 IP address [12.*.*.218]
 main: user = "freerad"
 main: group = "freerad"
 main: usercollide = no
 main: lower_user = "no"
 main: lower_pass = "no"
 main: nospace_user = "no"
 main: nospace_pass = "no"
 main: checkrad = "/usr/sbin/checkrad"
 main: proxy_requests = yes
 proxy: retry_delay = 1
 proxy: retry_count = 5
 proxy: synchronous = no
 proxy: default_fallback = yes
 proxy: dead_time = 120
 proxy: post_proxy_authorize = yes
 proxy: wake_all_if_all_dead = no
 security: max_attributes = 200
 security: reject_delay = 1
 security: status_server = no
 main: debug_level = 0
read_config_files:  reading dictionary
read_config_files:  reading naslist
Using deprecated naslist file.  Support for this will go away soon.
read_config_files:  reading clients
read_config_files:  reading realms
radiusd:  entering modules setup
Module: Library search path is /usr/lib/freeradius
Module: Loaded preprocess 
 preprocess: huntgroups = "/etc/freeradius/huntgroups"
 preprocess: hints = "/etc/freeradius/hints"
 preprocess: with_ascend_hack = no
 preprocess: ascend_channels_per_line = 23
 preprocess: with_ntdomain_hack = no
 preprocess: with_specialix_jetstream_hack = no
 preprocess: with_cisco_vsa_hack = no
 preprocess: with_alvarion_vsa_hack = no
Module: Instantiated preprocess (preprocess) 
Module: Loaded Acct-Unique-Session-Id 
 acct_unique: key = "Acct-Session-Id, Client-IP-Address, Sip-From-Tag,
Sip-To-Tag"
Module: Instantiated acct_unique (acct_unique) 
Module: Loaded realm 
 realm: format = "suffix"
 realm: delimiter = "@"
 realm: ignore_default = no
 realm: ignore_null = no
Module: Instantiated realm (suffix) 
Module: Loaded detail 
 detail: detailfile =
"/var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
 detail: detailperm = 384
 detail: dirperm = 493
 detail: locking = no
Module: Instantiated detail (detail) 
Module: Loaded SQL 
 sql: driver = "rlm_sql_mysql"
 sql: server = "12.*.*.218"
 sql: port = "3306"
 sql: login = "radius"
 sql: password = "cdrt00l1234"
 sql: radius_db = "radius"
 sql: nas_table = "nas"
 sql: sqltrace = no
 sql: sqltracefile = "/var/log/freeradius/sqltrace-%Y%m%d.log"
 sql: readclients = no
 sql: deletestalesessions = no
 sql: num_sql_socks = 25
 sql: sql_user_name = ""
 sql: default_user_profile = ""
 sql: query_on_not_found = no
 sql: authorize_check_query = ""
 sql: authorize_reply_query = ""
 sql: authorize_group_check_query = ""
 sql: authorize_group_reply_query = ""
 sql: accounting_onoff_query = ""
 sql: accounting_update_query = "          CALL
update_raddact_record_mediaproxy(                 'radius',                
'%{Acct-Session-Time}',                 '%{Acct-Input-Octets}',                
'%{Acct-Output-Octets}',                 '%{Sip-User-Agents}',                
'%{Media-Codecs}',                 '%{Sip-Application-Type}',                
'%{Media-Info}',                 '0',                 '%{Acct-Session-Id}',                
'%{Sip-To-Tag}',                 '%{Sip-From-Tag}'                 )"
 sql: accounting_update_query_alt = ""
 sql: accounting_start_query = "          CALL insert_radacct_record(                
'radius',                 '%{Acct-Session-Id}',                
'%{Acct-Unique-Session-Id}',                 '%{Billing-Party}',                
'%{Billing-Party}',                 '%{SIP-Proxy-IP}',                
'%{NAS-Port}',                 '%S',                 '0',                
'0',                 '0',                 '0',                
'%{Called-Station-Id}',                 '%{Calling-Station-Id}',                
'%{Sip-Response-Code}',                 '%{Service-Type}',                
'%{ENUM-TLD}',                 '%{Framed-IP-Address}',                
'%{Acct-Delay-Time}',                 '0',                
'%{Sip-Response-Code}',                 '%{Sip-Method}',                
'%{Sip-Translated-Request-URI}',                 '%{Sip-To-Tag}',                
'%{Sip-From-Tag}',                 '%{Sip-RPId}',                
'%{Source-IP}',                 '%{Source-Port}',                
'%{Canonical-URI}',                 '',                 '',                
'%{Sip-Application-Type}',                 '%{User-Agent}',                
'%{From-Header}'                 )"
 sql: accounting_start_query_alt = ""
 sql: accounting_stop_query = "          CALL update_radacct_record(                
'radius',                 '%S',                 '%{Acct-Delay-Time}',                
'%{Connect-Info}',                 '%{X-RTP-Stat}',                 
'%{Acct-Session-Id}',                 '%{Sip-To-Tag}',                
'%{Sip-From-Tag}'                 )"
 sql: accounting_stop_query_alt = ""
 sql: accounting_failed_query = "          CALL insert_radacct_record(                
'radius',                 '%{Acct-Session-Id}',                
'%{Acct-Unique-Session-Id}',                 '%{Billing-Party}',                
'%{Billing-Party}',                 '%{SIP-Proxy-IP}',                
'%{NAS-Port}',                 '%S',                 '%S',                
'0',                 '0',                 '0',                
'%{Called-Station-Id}',                 '%{Calling-Station-Id}',                
'%{Sip-Response-Code}',                 '%{Service-Type}',                
'%{ENUM-TLD}',                 '%{Framed-IP-Address}',                
'%{Acct-Delay-Time}',                 '0',                
'%{Sip-Response-Code}',                 '%{Sip-Method}',                
'%{Sip-Translated-Request-URI}',                 MD5(RAND()),                
'%{Sip-From-Tag}',                 '%{Sip-RPId}',                
'%{Source-IP}',                 '%{Source-Port}',                
'%{Canonical-URI}',                 '',                 '',                
'%{Sip-Application-Type}',                 '%{User-Agent}',                
'%{From-Header}'                 )"
 sql: group_membership_query = ""
 sql: connect_failure_retry_delay = 60
 sql: simul_count_query = ""
 sql: simul_verify_query = ""
 sql: postauth_query = ""
 sql: safe-characters =
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
rlm_sql (sql): Attempting to connect to radius at 12.*.*.218:3306/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
rlm_sql_mysql: Starting connect to MySQL server for #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql (sql): starting 1
rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
rlm_sql_mysql: Starting connect to MySQL server for #1
rlm_sql (sql): Connected new DB handle, #1
rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
rlm_sql_mysql: Starting connect to MySQL server for #2
rlm_sql (sql): Connected new DB handle, #2
rlm_sql (sql): starting 3
rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
rlm_sql_mysql: Starting connect to MySQL server for #3
rlm_sql (sql): Connected new DB handle, #3
rlm_sql (sql): starting 4
rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
rlm_sql_mysql: Starting connect to MySQL server for #4
rlm_sql (sql): Connected new DB handle, #4
rlm_sql (sql): starting 5
rlm_sql (sql): Attempting to connect rlm_sql_mysql #5
rlm_sql_mysql: Starting connect to MySQL server for #5
rlm_sql (sql): Connected new DB handle, #5
rlm_sql (sql): starting 6
rlm_sql (sql): Attempting to connect rlm_sql_mysql #6
rlm_sql_mysql: Starting connect to MySQL server for #6
rlm_sql (sql): Connected new DB handle, #6
rlm_sql (sql): starting 7
rlm_sql (sql): Attempting to connect rlm_sql_mysql #7
rlm_sql_mysql: Starting connect to MySQL server for #7
rlm_sql (sql): Connected new DB handle, #7
rlm_sql (sql): starting 8
rlm_sql (sql): Attempting to connect rlm_sql_mysql #8
rlm_sql_mysql: Starting connect to MySQL server for #8
rlm_sql (sql): Connected new DB handle, #8
rlm_sql (sql): starting 9
rlm_sql (sql): Attempting to connect rlm_sql_mysql #9
rlm_sql_mysql: Starting connect to MySQL server for #9
rlm_sql (sql): Connected new DB handle, #9
rlm_sql (sql): starting 10
rlm_sql (sql): Attempting to connect rlm_sql_mysql #10
rlm_sql_mysql: Starting connect to MySQL server for #10
rlm_sql (sql): Connected new DB handle, #10
rlm_sql (sql): starting 11
rlm_sql (sql): Attempting to connect rlm_sql_mysql #11
rlm_sql_mysql: Starting connect to MySQL server for #11
rlm_sql (sql): Connected new DB handle, #11
rlm_sql (sql): starting 12
rlm_sql (sql): Attempting to connect rlm_sql_mysql #12
rlm_sql_mysql: Starting connect to MySQL server for #12
rlm_sql (sql): Connected new DB handle, #12
rlm_sql (sql): starting 13
rlm_sql (sql): Attempting to connect rlm_sql_mysql #13
rlm_sql_mysql: Starting connect to MySQL server for #13
rlm_sql (sql): Connected new DB handle, #13
rlm_sql (sql): starting 14
rlm_sql (sql): Attempting to connect rlm_sql_mysql #14
rlm_sql_mysql: Starting connect to MySQL server for #14
rlm_sql (sql): Connected new DB handle, #14
rlm_sql (sql): starting 15
rlm_sql (sql): Attempting to connect rlm_sql_mysql #15
rlm_sql_mysql: Starting connect to MySQL server for #15
rlm_sql (sql): Connected new DB handle, #15
rlm_sql (sql): starting 16
rlm_sql (sql): Attempting to connect rlm_sql_mysql #16
rlm_sql_mysql: Starting connect to MySQL server for #16
rlm_sql (sql): Connected new DB handle, #16
rlm_sql (sql): starting 17
rlm_sql (sql): Attempting to connect rlm_sql_mysql #17
rlm_sql_mysql: Starting connect to MySQL server for #17
rlm_sql (sql): Connected new DB handle, #17
rlm_sql (sql): starting 18
rlm_sql (sql): Attempting to connect rlm_sql_mysql #18
rlm_sql_mysql: Starting connect to MySQL server for #18
rlm_sql (sql): Connected new DB handle, #18
rlm_sql (sql): starting 19
rlm_sql (sql): Attempting to connect rlm_sql_mysql #19
rlm_sql_mysql: Starting connect to MySQL server for #19
rlm_sql (sql): Connected new DB handle, #19
rlm_sql (sql): starting 20
rlm_sql (sql): Attempting to connect rlm_sql_mysql #20
rlm_sql_mysql: Starting connect to MySQL server for #20
rlm_sql (sql): Connected new DB handle, #20
rlm_sql (sql): starting 21
rlm_sql (sql): Attempting to connect rlm_sql_mysql #21
rlm_sql_mysql: Starting connect to MySQL server for #21
rlm_sql (sql): Connected new DB handle, #21
rlm_sql (sql): starting 22
rlm_sql (sql): Attempting to connect rlm_sql_mysql #22
rlm_sql_mysql: Starting connect to MySQL server for #22
rlm_sql (sql): Connected new DB handle, #22
rlm_sql (sql): starting 23
rlm_sql (sql): Attempting to connect rlm_sql_mysql #23
rlm_sql_mysql: Starting connect to MySQL server for #23
rlm_sql (sql): Connected new DB handle, #23
rlm_sql (sql): starting 24
rlm_sql (sql): Attempting to connect rlm_sql_mysql #24
rlm_sql_mysql: Starting connect to MySQL server for #24
rlm_sql (sql): Connected new DB handle, #24
Module: Instantiated sql (sql) 
Module: Loaded always 
 always: rcode = "ok"
 always: simulcount = 0
 always: mpp = no
Module: Instantiated always (ok) 
Listening on authentication 12.*.*.218:1812
Listening on accounting 12.*.*.218:1813
Listening on proxy 12.*.*.218:1814
Ready to process requests.



osiris123d wrote:
> 
> I edited /etc/mysql/my.cnf with the following
> 
> server-id = 1
> log_bin = /var/log/mysql/mysql-bin.log
> binlog_do_db = include_database_name
> binlog_ignore_db = include_database_name
> 
> When I restart mysql the following file is created under /var/log/mysql
> mysql-bin.000001
> 
> But when I start up /etc/init.d/cdrtool start and /etc/init.d/freeradius  
> start
> nothing shows up in the log file all that is there is
> CDRTool:/var/log/mysql# more mysql-bin.000001
> KˆN2KuK^b5.0.51a-24+lenny2-logJ2K8
> 
> 
> Thats it. :(
> 
> When is the radacctYYYYMM created? Is it when cdrtool is started or when  
> freeradius is started?? I see in the /etc/cron.d/cdrtool file that the  
> following are commented out
> # Next two jobs are only used when using a central radacct table:
> # 0 3 1 * * root php /var/www/CDRTool/scripts/OpenSIPS/rotateTables.php  
>>/dev/null
> # 0 4 * * * root php /var/www/CDRTool/scripts/purgeTables.php >/dev/null
> 
> but the rotateTables looks like it would only create the new months table  
> on the first of the month. So that can't be my issue, but I am guessing  
> that this does need to be uncommented for future table creations correct?
> 
> 
> On Dec 23, 2009 10:24am, "Saul Ibarra Corretge [via OpenSIPS (Open SIP  
> Server)]" <ml-node+4209391-434944227 at n2.nabble.com> wrote:
> 
> 
> 
> 
>> On 23/12/09 4:40 PM, osiris123d wrote:
> 
> 
>> >
> 
> 
>> > It still isn't working. The radacctYYYYMM table is never created in the
> 
> 
>> > radius database. I have logging turned on in MySQL and I never see the
> 
> 
>> > radius user execute the INSERT command to create the database. Can you
> 
> 
>> > explain to me when exactly does the radacctYYYYMM database get created?
> 
> 
>> > That way I could pinput what is going on and why it's not working.
> 
> 
>> >
> 
> 
> 
>> The tables get created by the stored procedure. Enable binary logging of
> 
> 
>> stored procedures to see if you are getting an error there.
> 
> 
> 
> 
>> Regards,
> 
> 
> 
>> --
> 
> 
>> Saúl Ibarra Corretgé
> 
> 
>> AG Projects
> 
> 
> 
>> _______________________________________________
> 
> 
>> Users mailing list
> 
> 
>> [hidden email]
> 
> 
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> 
> 
> 
> 
> 
> 
> 
>> View message @  
>> http://n2.nabble.com/CDRtool-freeradius-mysql-error-tp4200490p4209391.html
> 
> 
> 
> 
>> To unsubscribe from Re: CDRtool freeradius mysql error, click here.
> 
> 
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/CDRtool-freeradius-mysql-error-tp4200490p4210856.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list