Re: radacct and db handles

2009-10-23 Thread Alan Buxey
Hi,

 I checked my radius db and radacct table and there are many indexed and
 nothing I could found is the problem. It only append when I enable radius
 accounting in SQL.

indexing speeds up queries but slows down inserts/updates.  if you do live
inserts/updates of accouting records into mysql then the accounting threads
are goign to be blocking up the system. either fix this by moving to
a better DB system - eg postgresql ;-) - or by moving to using buffered-sql
virtual server for your accounting  (fairly trivial...configure the buffered-sql
virtual server, soft link it into sites-enabled and then change calls to 'sql'
in your accounting sections of main virtual server to be 'detail'. tada!

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


Re: FreeRADIUS + Postgresql dies unexpectedly

2009-10-23 Thread Duarte Fonseca
Hi Alan,

Thanks for the advice, I've tried the same test with radiusd -f and
here are the results

Some runs just produce this:

# radiusd -f
Segmentation fault

Others produce a more verbose output, hope it helps:

# radiusd -f
*** glibc detected *** radiusd: double free or corruption (fasttop):
0x09143220 ***
=== Backtrace: =
/lib/libc.so.6[0x3c50f1]
/lib/libc.so.6(cfree+0x90)[0x3c8bc0]
/lib/libcrypto.so.6(CRYPTO_free+0x3a)[0x2a7a5a]
/lib/libcrypto.so.6(X509_VERIFY_PARAM_free+0x29)[0x26c029]
/lib/libssl.so.6(SSL_free+0x64)[0x13b8b4]
/usr/lib/libpq.so.4[0xfdc4e9]
/usr/lib/libpq.so.4(pqReadData+0x1da)[0xfd46ba]
/usr/lib/libpq.so.4(PQgetResult+0xa0)[0xfd3180]
/usr/lib/libpq.so.4[0xfd3348]
/usr/lib/libpq.so.4(PQexec+0x27)[0xfd35e7]
/usr/lib/freeradius/rlm_sql_postgresql.so[0x18e7bf]
/usr/lib/freeradius/rlm_sql.so(rlm_sql_query+0x52)[0xa6b2e2]
/usr/lib/freeradius/rlm_sql.so[0xa68a96]
radiusd(modcall+0x94e)[0x8062dfe]
radiusd(indexed_modcall+0xa5)[0x805fa65]
radiusd(module_accounting+0x2c)[0x805fd4c]
radiusd(rad_accounting+0xab)[0x804df9b]
radiusd(radius_handle_request+0x65)[0x806e4d5]
radiusd[0x8066065]
/lib/libpthread.so.0[0xd1949b]
/lib/libc.so.6(clone+0x5e)[0x42d42e]
=== Memory map: 
0011-00153000 r-xp  08:02 6291673/lib/libssl.so.0.9.8e
00153000-00157000 rwxp 00042000 08:02 6291673/lib/libssl.so.0.9.8e
00157000-00183000 r-xp  08:02 8986736/usr/lib/libgssapi_krb5.so.2.2
00183000-00184000 rwxp 0002c000 08:02 8986736/usr/lib/libgssapi_krb5.so.2.2
00184000-00186000 r-xp  08:02 6291658/lib/libcom_err.so.2.1
00186000-00187000 rwxp 1000 08:02 6291658/lib/libcom_err.so.2.1
00187000-00189000 r-xp  08:02 6291546/lib/libkeyutils-1.2.so
00189000-0018a000 rwxp 1000 08:02 6291546/lib/libkeyutils-1.2.so
0018a000-0018c000 r-xp  08:02 9085015
/usr/lib/freeradius/rlm_acct_unique-2.1.7.so
0018c000-0018d000 rwxp 1000 08:02 9085015
/usr/lib/freeradius/rlm_acct_unique-2.1.7.so
0018d000-00191000 r-xp  08:02 9085105
/usr/lib/freeradius/rlm_sql_postgresql-2.1.7.so
00191000-00192000 rwxp 4000 08:02 9085105
/usr/lib/freeradius/rlm_sql_postgresql-2.1.7.so
00194000-0019d000 r-xp  08:02 6291484/lib/libcrypt-2.5.so
0019d000-0019e000 r-xp 8000 08:02 6291484/lib/libcrypt-2.5.so
0019e000-0019f000 rwxp 9000 08:02 6291484/lib/libcrypt-2.5.so
0019f000-001c6000 rwxp 0019f000 00:00 0
001d4000-001d5000 r-xp 001d4000 00:00 0  [vdso]
001d5000-002ff000 r-xp  08:02 6291671/lib/libcrypto.so.0.9.8e
002ff000-00312000 rwxp 00129000 08:02 6291671/lib/libcrypto.so.0.9.8e
00312000-00316000 rwxp 00312000 00:00 0
00316000-00328000 r-xp  08:02 8984623/usr/lib/libz.so.1.2.3
00328000-00329000 rwxp 00011000 08:02 8984623/usr/lib/libz.so.1.2.3
00345000-00358000 r-xp  08:02 6291490/lib/libnsl-2.5.so
00358000-00359000 r-xp 00012000 08:02 6291490/lib/libnsl-2.5.so
00359000-0035a000 rwxp 00013000 08:02 6291490/lib/libnsl-2.5.so
0035a000-0035c000 rwxp 0035a000 00:00 0
0035c000-0049a000 r-xp  08:02 6291480/lib/libc-2.5.so
0049a000-0049c000 r-xp 0013e000 08:02 6291480/lib/libc-2.5.so
0049c000-0049d000 rwxp 0014 08:02 6291480/lib/libc-2.5.so
0049d000-004a rwxp 0049d000 00:00 0
004a-00533000 r-xp  08:02 8986750/usr/lib/libkrb5.so.3.3
00533000-00536000 rwxp 00092000 08:02 8986750/usr/lib/libkrb5.so.3.3
0064-0065a000 r-xp  08:02 6291473/lib/ld-2.5.so
0065a000-0065b000 r-xp 00019000 08:02 6291473/lib/ld-2.5.so
0065b000-0065c000 rwxp 0001a000 08:02 6291473/lib/ld-2.5.so
006b9000-006c8000 r-xp  08:02 6291506/lib/libresolv-2.5.so
006c8000-006c9000 r-xp e000 08:02 6291506/lib/libresolv-2.5.so
006c9000-006ca000 rwxp f000 08:02 6291506/lib/libresolv-2.5.so
006ca000-006cc000 rwxp 006ca000 00:00 0
006f4000-006f6000 r-xp  08:02 9085067
/usr/lib/freeradius/rlm_files-2.1.7.so
006f6000-006f7000 rwxp 1000 08:02 9085067
/usr/lib/freeradius/rlm_files-2.1.7.so
00753000-00769000 r-xp  08:02 6291646/lib/libselinux.so.1
00769000-0076b000 rwxp 00015000 08:02 6291646/lib/libselinux.so.1
00787000-00792000 r-xp  08:02 6291458  Aborted



# radiusd -f
*** glibc detected *** radiusd: double free or corruption (fasttop):
0x0993eeb0 ***
=== Backtrace: =
/lib/libc.so.6[0x1790f1]
/lib/libc.so.6(cfree+0x90)[0x17cbc0]
/lib/libcrypto.so.6(CRYPTO_free+0x3a)[0x483a5a]
/lib/libcrypto.so.6(X509_VERIFY_PARAM_free+0x29)[0x448029]
/lib/libssl.so.6(SSL_free+0x64)[0xede8b4]
/usr/lib/libpq.so.4[0x3a14e9]
/usr/lib/libpq.so.4(pqReadData+0x1da)[0x3996ba]
/usr/lib/libpq.so.4(PQgetResult+0xa0)[0x398180]
/usr/lib/libpq.so.4[0x39828c]
/usr/lib/freeradius/rlm_sql_postgresql.so[0x3887bf]
/usr/lib/freeradius/rlm_sql.so(rlm_sql_query+0x52)[0x9e82e2]
/usr/lib/freeradius/rlm_sql.so[0x9e5c3b]
radiusd(modcall+0x94e)[0x8062dfe]
radiusd(indexed_modcall+0xa5)[0x805fa65]

Re: cannot upgrade 2.1.6 to 2.1.7

2009-10-23 Thread Craig Campbell
You still haven't mentioned (as far as I can see) what your system IS?

It could be you need to add some semi-optional package to it?

As far back as I can check, this file should be in /usr/include (Redhat AS3 
Update 4, Fedora 7) so it looks like your OS might have something missing.

The name of the call you want to remove is wait_for_child_to_die 

Can you imagine its removal resulting an a happy ending for your system?  
If the name is accurate, eventually you could fill up your process table.

Good luck,
-craig
  - Original Message - 
  From: kachin Agarwal 
  To: freeradius-users@lists.freeradius.org 
  Sent: Friday, October 23, 2009 1:19 AM
  Subject: cannot upgrade 2.1.6 to 2.1.7


Hi,


If i dont ve pthread.h in my system.. then how did the 2.1.6 build 
work.? but i remove the line 
callback=wait_for_child_to_die;
there is no error.
can i remove this line and build or is there any other solution to fix 
it

Thanx  Regards,
kachin
   


--
  Try the new Yahoo! India Homepage. Click here.


--


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


  __ Information from ESET Smart Security, version of virus signature 
database 4535 (20091023) __

  The message was checked by ESET Smart Security.

  http://www.eset.com




__ Information from ESET Smart Security, version of virus signature 
database 4536 (20091023) __

The message was checked by ESET Smart Security.

http://www.eset.com

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

RE: radacct and db handles

2009-10-23 Thread Ademir Klauck
Hi Ivan,

I run Server with radiusd -X  log and could'n found the same error in log. 
The only sql fail I found is a Msg reply field:

[sql]   expand: SELECT id, username, attribute, value, op   FROM radrepl
y   WHERE username = '%{SQL-User-Name}'   ORDER BY id - SELECT
id, username, attribute, value, op   FROM radreply   WHERE usern
ame = 'alexandre'   ORDER BY id
[sql]   expand: SELECT groupname   FROM radusergroup   WHERE use
rname = '%{SQL-User-Name}'   ORDER BY priority - SELECT groupname
 FROM radusergroup   WHERE username = 'alexandre'   ORDER BY
 priority
[sql]   expand: SELECT id, groupname, attribute,   Value, op   F
ROM radgroupcheck   WHERE groupname = '%{Sql-Group}'   ORDER BY
id - SELECT id, groupname, attribute,   Value, op   FROM radgro
upcheck   WHERE groupname = 'SUSPENSO'   ORDER BY id
rlm_sql: Failed to create the pair: Invalid octet string Conta Suspensa. Entre
em contato com o setor financeiro. for attribute name Reply-Msg
rlm_sql (sql): Error getting data from database
[sql] Error retrieving check pairs for group SUSPENSO
[sql] Error processing groups; rejecting user
rlm_sql (sql): Released sql socket id: 2
++[sql] returns fail

-Original Message-
From: Ivan Kalik [mailto:t...@kalik.net] 
Sent: quinta-feira, 22 de outubro de 2009 21:22
To: adem...@netwizard.com.br; FreeRadius users mailing list
Subject: Re: radacct and db handles

 I'm installed freeradius with daloradius in a FC11 box, everything new.
 After some corrections everything is working, but in radius.log I receive
 constantly the error message below:
  Info: rlm_sql (sql): There are no DB handles to use! skipped 0, tried to
 connect 0

 I checked my radius db and radacct table and there are many indexed and
 nothing I could found is the problem. It only append when I enable radius
 accounting in SQL.

Run server in debug mode and see which queries are failing.

Ivan Kalik
Kalik Informatika ISP




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


Status X User

2009-10-23 Thread Sergio Belkin
Hi,

Is there a way to get the las time that user got Accept-Accept and
Accept-Reject, of course I can parse log files but I wonder if there a
radius tool that can do it.

Thanks in advance

-- 
--
Open Kairos http://www.openkairos.com
Watch More TV http://sebelk.blogspot.com
Sergio Belkin -
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Status X User

2009-10-23 Thread Alexander Clouter
Sergio Belkin seb...@gmail.com wrote:
 
 Is there a way to get the las time that user got Accept-Accept and
 Accept-Reject, of course I can parse log files but I wonder if there a
 radius tool that can do it.
 
your data - SQL

SELECT * FROM postauth WHERE user_name = 'blar' AND packet_type = 
'Access-Reject' ORDER BY timestamp DESC LIMIT 1

Then for the latter replace 'Access-Accept' with 'Access-Reject'?

Cheers

-- 
Alexander Clouter
.sigmonster says: Zeus gave Leda the bird.

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


Re: Status X User

2009-10-23 Thread Sergio Belkin
2009/10/23 Alexander Clouter a...@digriz.org.uk:
 Sergio Belkin seb...@gmail.com wrote:

 Is there a way to get the las time that user got Accept-Accept and
 Accept-Reject, of course I can parse log files but I wonder if there a
 radius tool that can do it.

 your data - SQL

 SELECT * FROM postauth WHERE user_name = 'blar' AND packet_type = 
 'Access-Reject' ORDER BY timestamp DESC LIMIT 1

 Then for the latter replace 'Access-Accept' with 'Access-Reject'?

 Cheers

 --
 Alexander Clouter
 .sigmonster says: Zeus gave Leda the bird.

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


Ooops, I have no mysql, except that there is a way to dump log files
to mysql database :)

Sorry if the question sounds stupid :)
-- 
--
Open Kairos http://www.openkairos.com
Watch More TV http://sebelk.blogspot.com
Sergio Belkin -
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html