Re: Non-Breaking Accounting Response Handling

"\(null\) \(null\) via Freeradius-Users" <[email protected]>
Newsgroups gmane.comp.freeradius.user
Message-ID <[email protected]>
Tried the following settings, but it still doesn't work.

The accounting log breaks when SQL fails to connect, and it only returns successfully when the SQL server is up. I want to ensure that accounting responds even if it fails to save the log to radutmp or SQL.

Error Message: (0) No reply from server for ID 124 socket 3

accounting {
	if ("%{User-Name}" =~ /@/) {
		radutmp
            	sql_Fradius_log
    	}
	exec
	attr_filter.accounting_response
	log_accounting
	ok
}

accounting {
	if ("%{User-Name}" =~ /@/) {
		radutmp
		sql_Fradius_log
		ok
    	}
	exec
	attr_filter.accounting_response
	log_accounting
}



> On 13 Mar 2025, at 5:04 PM, Alan DeKok <[email protected]> wrote:
> 
> On Mar 13, 2025, at 3:02 AM, (null) (null) via Freeradius-Users <[email protected] <mailto:[email protected]>> wrote:
>> 
>> I have the accounting {} setting in /etc/raddb/sites-available/default.
>> How can I prevent this configuration from breaking the accounting response if an SQL connection error occurs or radutmp fails to write to the file? The accounting response should continue even if there are logging errors.
>> 
>> accounting {
>> if ("%{User-Name}" =~ /@/) {
>> radutmp
>> sql_Fradius_log
>>    }
>> exec
>> attr_filter.accounting_response
>> log_accounting
> 
>  Add "ok".
> 
>  The accounting section only replies if at least one module returns OK / success.
> 
>  Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.