Re: MySQL accounting issue

2008-01-21 Thread Alan DeKok
Andy Smith wrote:
 I have attempted to configure freeradius to write accounting data to
 MySQL, however currently its not working. No data is being written
 to MySQL and the Radius client is complaining its not recieving a reply
 for accounting requests. I subsituted the detail setting in
 the accounting config section of radiusd.conf for sql and modifyied
 the sql.conf as seemed necessary. As soon as I switch this
 back to detail my Radius client starts recieving replies from
 freeradius once again :S

  So the sql module isn't logging anything.

 But after that there is no activity in the MySQL log :S And I have no
 errors logged from MySQL or radiusd, nor can I see any errors
 when running radiusd -Xf
  
 anyone any ideas what more I can do to identify the issue??

  Post the output of radiusd -X here, as suggested in the FAQ, README,
INSTALL, and (almost) daily.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: MySQL accounting issue

2008-01-21 Thread A.smith
Hi,

  ok this is an example of when its meant to do some accounting, in this
example I have both detail and sql set for accounting in radiusd.conf.

Nothing to do.  Sleeping until we see a request.
rad_recv: Accounting-Request packet from host 89.107.16.10:35377, id=82,
length=145
Acct-Status-Type = Failed
Service-Type = IAPP-Register
Attr-102 = 0x0194
Error-Cause = 32
Event-Timestamp = Jan 21 2008 13:05:11 GMT
Attr-105 = 0x61733738333035366464
Acct-Session-Id = [EMAIL PROTECTED]
Attr-108 = 0x38392e3130372e31362e39
Attr-109 = 0x35303630
NAS-Port = 5060
Acct-Delay-Time = 0
NAS-IP-Address = 89.107.16.10
  Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 85
  modcall[preacct]: module preprocess returns noop for request 85
rlm_realm: Proxy reply, or no User-Name.  Ignoring.
  modcall[preacct]: module suffix returns noop for request 85
  modcall[preacct]: module files returns noop for request 85
modcall: leaving group preacct (returns noop) for request 85
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 85
radius_xlat: 
'/usr/local/var/log/radius/radacct/89.107.16.10/detail-20080121'
rlm_detail:
/usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands
to /usr/local/var/log/radius/radacct/89.107.16.10/detail-20080121
  modcall[accounting]: module detail returns ok for request 85
rlm_sql (sql): Unsupported Acct-Status-Type = 15
  modcall[accounting]: module sql returns noop for request 85
modcall: leaving group accounting (returns ok) for request 85
Sending Accounting-Response of id 82 to 89.107.16.10 port 35377
Finished request 85
Going to the next request


At startup I see this from radiusd

Starting - reading configuration files ...
reread_config:  reading radiusd.conf
Config:   including file: /usr/local/etc/raddb/proxy.conf
Config:   including file: /usr/local/etc/raddb/clients.conf
Config:   including file: /usr/local/etc/raddb/snmp.conf
Config:   including file: /usr/local/etc/raddb/sql.conf
 main: prefix = /usr/local
 main: localstatedir = /usr/local/var
 main: logdir = /usr/local/var/log/radius
 main: libdir = /usr/local/lib
 main: radacctdir = /usr/local/var/log/radius/radacct
 main: hostname_lookups = no
 main: max_request_time = 30
 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 = /usr/local/var/log/radius/radius.log
 main: log_auth = no
 main: log_auth_badpass = no
 main: log_auth_goodpass = no
 main: pidfile = /usr/local/var/run/radiusd/radiusd.pid
 main: user = (null)
 main: group = (null)
 main: usercollide = no
 main: lower_user = no
 main: lower_pass = no
 main: nospace_user = no
 main: nospace_pass = no
 main: checkrad = /usr/local/sbin/checkrad
 main: proxy_requests = yes
 proxy: retry_delay = 5
 proxy: retry_count = 3
 proxy: synchronous = no
 proxy: default_fallback = yes
 proxy: dead_time = 120
 proxy: post_proxy_authorize = no
 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/local/lib
Module: Loaded expr
Module: Instantiated expr (expr)
Module: Loaded PAP
 pap: encryption_scheme = crypt
 pap: auto_header = no
Module: Instantiated pap (pap)
Module: Loaded CHAP
Module: Instantiated chap (chap)
Module: Loaded MS-CHAP
 mschap: use_mppe = yes
 mschap: require_encryption = no
 mschap: require_strong = no
 mschap: with_ntdomain_hack = no
 mschap: passwd = (null)
 mschap: ntlm_auth = (null)
Module: Instantiated mschap (mschap)
Module: Loaded System
 unix: cache = no
 unix: passwd = /etc/passwd
 unix: shadow = /etc/shadow
 unix: group = /etc/group
 unix: radwtmp = /usr/local/var/log/radius/radwtmp
 unix: usegroup = no
 unix: cache_reload = 600
Module: Instantiated unix (unix)
Module: Loaded preprocess
 preprocess: huntgroups = /usr/local/etc/raddb/huntgroups
 preprocess: hints = /usr/local/etc/raddb/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 SQL
 sql: driver = rlm_sql_mysql
 sql: server = localhost
 sql: port = 
 sql: login = root
 sql: password = password
 sql: radius_db = radius
 sql: nas_table = nas
 sql: sqltrace = yes
 sql: sqltracefile = /usr/local/var/log/radius/sqltrace.sql
 sql: readclients = yes
 sql: 

Re: MySQL accounting issue

2008-01-21 Thread A.smith
Ah,

  ok, now I see the other post regarding this. The problem is OpenSER and
this status type:

rlm_sql (sql): Unsupported Acct-Status-Type = 15

Whats the latest on this? Has the incompatibility been addressed in
freeradius 2.0?

thanks Andy.


Message sent using UK Grid Webmail 2.7.9


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: MySQL accounting issue

2008-01-21 Thread tnt
Again, send a debug with the Start and Stop packets.

Ivan Kalik
Kalik Informatika ISP


Dana 21/1/2008, A.smith [EMAIL PROTECTED] piše:

Also, regarding radius 1.x I  now have a patch which allows this type of
record.
However next issue is that with accounting set to sql in radiusd.conf the
SQL statements are being written just to
/usr/local/var/log/radius/sqltrace.sql
and nothing is actually put in the database... What have I done wrong? :P

cheers Andy.


Message sent using UK Grid Webmail 2.7.9


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: MySQL accounting issue

2008-01-21 Thread Andy Smith
Anyone any ideas? I repost this as the posts are in a messed up order on the 
forum page...


As per my previous mail, my current issue is that with accounting set to sql 
in radiusd.conf
the SQL statements are being written just to 
/usr/local/var/log/radius/sqltrace.sql

and nothing is actually put in the database... What have I done wrong?

thank u!

- Original Message - 
From: Andy Smith [EMAIL PROTECTED]

To: FreeRadius users mailing list freeradius-users@lists.freeradius.org
Sent: Monday, January 21, 2008 4:40 PM
Subject: Re: MySQL accounting issue



Ok, Im seeing this from radiusd:

rad_recv: Accounting-Request packet from host 89.107.16.10:35563, id=252, 
length=145

   Acct-Status-Type = Failed
   Service-Type = IAPP-Register
   Attr-102 = 0x0194
   Error-Cause = 32
   Event-Timestamp = Jan 21 2008 15:53:44 GMT
   Attr-105 = 0x61733264636462613764
   Acct-Session-Id = [EMAIL PROTECTED]
   Attr-108 = 0x38392e3130372e31362e39
   Attr-109 = 0x35303630
   NAS-Port = 5060
   Acct-Delay-Time = 0
   NAS-IP-Address = 89.107.16.10
 Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 0
 modcall[preacct]: module preprocess returns noop for request 0
rlm_acct_unique: WARNING: Attribute User-Name was not found in request, 
unique ID MAY be inconsistent
rlm_acct_unique: Hashing 'NAS-Port = 5060,Client-IP-Address = 
89.107.16.10,NAS-IP-Address = 89.107.16.10,Acct-Session-Id = 
[EMAIL PROTECTED],'

rlm_acct_unique: Acct-Unique-Session-ID = df36632bb92d5086.
 modcall[preacct]: module acct_unique returns ok for request 0
   rlm_realm: Proxy reply, or no User-Name.  Ignoring.
 modcall[preacct]: module suffix returns noop for request 0
 modcall[preacct]: module files returns noop for request 0
modcall: leaving group preacct (returns ok) for request 0
 Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 0
 modcall[accounting]: module unix returns noop for request 0
radius_xlat:  '/usr/local/var/log/radius/radutmp'
rlm_radutmp: NAS OpenSER port 5060 unknown packet type 15)
 modcall[accounting]: module radutmp returns noop for request 0
radius_xlat:  ''
radius_xlat:  ''
radius_xlat:  '/usr/local/var/log/radius/sqltrace.sql'
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): Released sql socket id: 3
 modcall[accounting]: module sql returns ok for request 0
modcall: leaving group accounting (returns ok) for request 0
Sending Accounting-Response of id 252 to 89.107.16.10 port 35563
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
--- Walking the entire request list ---
Cleaning up request 0 ID 252 with timestamp 4794be17
Nothing to do.  Sleeping until we see a request. 


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: MySQL accounting issue

2008-01-21 Thread tnt
Dana 21/1/2008, A.smith [EMAIL PROTECTED] piše:

Also, regarding radius 1.x I  now have a patch which allows this type of
record.
However next issue is that with accounting set to sql in radiusd.conf the
SQL statements are being written just to
/usr/local/var/log/radius/sqltrace.sql
and nothing is actually put in the database... What have I done wrong? :P

cheers Andy.


Message sent using UK Grid Webmail 2.7.9


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


MySQL accounting issue

2008-01-20 Thread Andy Smith
Hi List,

  ok next issue I have :P

I have attempted to configure freeradius to write accounting data to MySQL, 
however currently its not working. No data is being written
to MySQL and the Radius client is complaining its not recieving a reply for 
accounting requests. I subsituted the detail setting in
the accounting config section of radiusd.conf for sql and modifyied the 
sql.conf as seemed necessary. As soon as I switch this
back to detail my Radius client starts recieving replies from freeradius once 
again :S

I can see from the MySQL log that radiusd is successfully establishing a 
connection to MySQL at startup:

080120 19:14:49   61 Connect[EMAIL PROTECTED] on radius
   62 Connect   [EMAIL PROTECTED] on radius
   63 Connect   [EMAIL PROTECTED] on radius
   64 Connect   [EMAIL PROTECTED] on radius
   65 Connect   [EMAIL PROTECTED] on radius
   65 Query SELECT * FROM nas

But after that there is no activity in the MySQL log :S And I have no errors 
logged from MySQL or radiusd, nor can I see any errors
when running radiusd -Xf

anyone any ideas what more I can do to identify the issue??

thanks Andy.-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html