Hi Louis, 

I use hostapd with openwrt (14.07). 

I checked this: 

mysql> select count(acctuniqueid) from radacct where acctuniqueid is NULL; 

And this query returned 0. I tried this 2 query: 

mysql> select count(acctuniqueid),acctuniqueid from radacct 
GROUP by acctuniqueid 
HAVING count(acctuniqueid) > 1 

mysql> select count(acctsessionid),acctsessionid from radacct 
GROUP by acctsessionid 
HAVING count(acctsessionid) > 1 

And these, returned few rows like this: 

'2', '33e750911b098fc3' 
'4', '40af3b9f1b739cb1' 
'3', '57034151baf2dedd' 
'27', '610e794d690a5b5e' 
'5', '6926ba8da34bd9bc' 
'9', '84c78bcf0f3ca8ec' 
'3', 'bd6933537b5c86bb' 
'2', 'db07ce54c70a868f' 
'2', 'db9179bc9c4d56f0' 
'2', 'ee98d19e435615ee' 


Also, I checked my Radius config in conf/radiusd/packetfence. The “acct_unique” 
module is OK. 

And when I replace acctsessionid in the stored procedure with acctuniqueid I 
have the same error ( A bug with hostapd ? ) 

Regards. 


-- 
Guillaume PROMONET 
Neptune Internet Services 


----- Mail original -----

De: "Louis Munro" <[email protected]> 
À: [email protected] 
Envoyé: Mardi 26 Janvier 2016 17:42:42 
Objet: Re: [PacketFence-users] Radius Error: Couldn't update SQL accounting 
STOP record 

Hi Guillaume, 


What controller or switches are you using? 




This is what the FreeRADIUS documentation says about accounting sessions: 



Many NAS vendors have their equipment supply an Acct-Session-Id 
attribute which is not unique over reboots. This makes accounting dif- 
ficult, as there will be many independent sessions with the same Acct- 
Session-Id attribute. 




You will probably have to rely on the “accuniqueid” column in radacct. 
Can you check if you have values for that column ? 


mysql> select count(acctuniqueid) from radacct where acctuniqueid is NULL; 




Also, check if you have the “acct_unique” module in the pre-acct session of 
conf/radiusd/packetfence: 


preacct { 
preprocess 
acct_unique 
suffix 
files 
} 






If you do, then it should be possible to replace the reference to acctsessionid 
is the stored procedure with one to acctuniqueid. 
I am working on a patch to do just that. 










-- 
Louis Munro 
[email protected] :: www.inverse.ca 
+1.514.447.4918 x125 :: +1 (866) 353-6153 x125 
Inverse inc. :: Leaders behind SOGo ( www.sogo.nu ) and PacketFence ( 
www.packetfence.org ) 




On Jan 26, 2016, at 9:51 , Guillaume Promonet < [email protected] > wrote: 



Hi All, 

I have an other question today, always in the same context: 
I upgraded from packet fence 5.5 to the latest 5.6.0 and today in 5.6.1 . 

I note the following errors with PacketFence 5.6.0 and 5.6.1 in radius .log 
when I disconnect a node : 


Wed Jan 20 12:04:43 2016 : Error: [sql] Couldn't update SQL accounting STOP 
record - Result consisted of more than one row 


In the source code, there is a difference in the mysql procedure "acct_stop". 
With packetfence 5.5, the query use 'SUM' and return only 1 row : 

SELECT SUM(acctinputoctets), SUM(acctoutputoctets), SUM(acctsessiontime) 
INTO Previous_Input_Octets, Previous_Output_Octets, Previous_Session_Time 
FROM radacct_log 
WHERE acctsessionid = p_acctsessionid 
AND username = p_username 
AND nasipaddress = p_nasipaddress; 



But with packetfence 5.6.X the query is modified and can return several rows ( 
and generate the error log in radius.log ) : 

SELECT acctinputoctets, acctoutputoctets, acctsessiontime 
INTO Previous_Input_Octets, Previous_Output_Octets, Previous_Session_Time 
FROM radacct 
WHERE acctsessionid = p_acctsessionid 
AND username = p_username 
AND nasipaddress = p_nasipaddress; 




An idea ? 

Thanks in advance, 


-- 
Guillaume PROMONET 
Neptune Internet Services 

------------------------------------------------------------------------------ 
Site24x7 APM Insight: Get Deep Visibility into Application Performance 
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month 
Monitor end-to-end web transactions and take corrective actions now 
Troubleshoot faster and improve end-user experience. Signup Now! 
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________
 
PacketFence-users mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/packetfence-users 



------------------------------------------------------------------------------ 
Site24x7 APM Insight: Get Deep Visibility into Application Performance 
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month 
Monitor end-to-end web transactions and take corrective actions now 
Troubleshoot faster and improve end-user experience. Signup Now! 
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 
_______________________________________________ 
PacketFence-users mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/packetfence-users 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to