freeradius sqlite3 unable to open database file

Antonio Silva asilva at wirelessmundi.com
Mon Apr 10 15:36:12 CEST 2017


Hi,

Got some extra information:

Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Socket destructor 
called, closing socket
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Got SQLite error code 
(5) when closing socket
Apr 09 10:56:36 H radiusd[4014]: rlm_sql (sql): Reconnecting (9291)
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Opening SQLite database 
"radius.db"
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Error opening SQLite 
database "radius.db": Code 0x000e (14): unable to open database file
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Socket destructor 
called, closing socket
Apr 09 10:56:36 H radiusd[4014]: rlm_sql (sql): Reserved connection (9275)
Apr 09 10:56:36 H radiusd[4014]: (14081) sql: Executing query: UPDATE 
radacct SET acctupdatetime  = 1491728196, acctinterval    = 0, 
framedipaddress = '192.168.4.13', acctsessiontime = 42004, acctinputoctets
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Socket destructor 
called, closing socket
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Got SQLite error code 
(5) when closing socket
Apr 09 10:56:36 H radiusd[4014]: rlm_sql (sql): Reconnecting (9275)
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Opening SQLite database 
"radius.db"
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Error opening SQLite 
database "radius.db": Code 0x000e (14): unable to open database file
Apr 09 10:56:36 H radiusd[4014]: rlm_sql_sqlite: Socket destructor 
called, closing socket
Apr 09 10:56:36 H radiusd[4014]: rlm_sql (sql): Reserved connection (9292)


I see lots of error "Got SQLite error code (5) when closing socket", but 
not always end with the error unable to open database file, but i guess 
is the main reason for the lock issue in the db.


I try to set the db poll to only one worker, but in that case when i 
have two simultaneous connections instead of waiting for the timeout an 
try to connected i have immediately "No connections available and at max 
connection limit"

Is this possible to do, have only one connection to db but with multiple 
threads?


Thanks,
António


On 04/06/2017 06:26 PM, Antonio Silva wrote:
> Hi,
>
> thanks for the reply.
>
> Is there a way to debug the freeradius sqlite fd operations?
>
> The strange is that it happens from time to time, initial i though it 
> could be related to the number of users, but is not the case, it just 
> happen even if there is only one connection open.
>
>
> On 03/31/2017 02:56 AM, Alan DeKok wrote:
>> On Mar 30, 2017, at 6:06 PM, Antonio Silva <asilva at wirelessmundi.com> 
>> wrote:
>>> Hi,
>>>
>>> with sqlite3 is working fine using version 3.0.13, but time to time 
>>> i have to restart it because is unable open sqlite file.
>>> There is no other process using this file and after the restart it 
>>> works fine for a few days more.
>>>
>>> Any idea how can i track this done?
>>> ...
>>> Mar 29 09:25:20 H radiusd[3167]: rlm_sql_sqlite: Error opening 
>>> SQLite database "radius.db": Code 0x000e (14): unable to open 
>>> database file
>>    That's an error produced by SQLite.  I'm not sure why it's 
>> happening.  Maybe because some file descriptors aren't being closed?
>>
>>    But the underlying connection pool is used for all SQL modules, so 
>> it should work...
>>
>>    Alan DeKok.
>>
>>
>> -
>> List info/subscribe/unsubscribe? See 
>> http://www.freeradius.org/list/users.html
>

-- 

Saludos / Regards / Cumprimentos,
António silva



More information about the Freeradius-Users mailing list