rlm_sqlippool Question

Richard J Palmer richard at merula.net
Sat Apr 6 23:40:09 CEST 2019


OK

Going back more (sorry I am talking to myself .....

The config works file with 3.0.15
BUT breaks with that error with 3.0.16 onwards

I am running temporarily with 3.0.15 but if anyone can help locate / 
find the problem with the later version it would be nice.

Just to confirm  - If I install an 3.0.15 compiled from source (same 
config) it just works

3.0.16 onwards gives the crash I sent earlier
Richard

On Saturday 06/04/2019 at 10:06 pm, Richard J Palmer  wrote:
>
> OK Further to this - it's not due to the config changes
>
> I removed them - but it is something from the upgrade between 3.0.15
> that was on this server and 3.0.18 which I am now using
>
> Logins are working fine using sql - it is only the sqlippool that is
> crashing here
>
>
> Happy to provide any details needed here / make any changes ...
>
> Richard
>
> On Saturday 06/04/2019 at 9:55 pm, Richard J Palmer  wrote:
>>
>>
>> Hmmmm
>>
>> OK Now I am getting a little stuck...
>>
>> I created a version on my 'test' server - and reverted the hard coded
>> config and added:
>>
>> start_begin = "BEGIN TRANSACTION"
>> allocate_begin = "BEGIN TRANSACTION"
>> stop_begin = "BEGIN TRANSACTION"
>> on_begin = "BEGIN TRANSACTION"
>> off_begin = "BEGIN TRANSACTION"
>>
>>
>> To the config file ..
>>
>> And during a login that uses ippool - I get:
>>
>> --
>> rlm_sql (sql1): Reserved connection (2)
>> (0) sqlippool: EXPAND %{User-Name}
>> (0) sqlippool:    --> cgnattest at adsl.merula.net
>> (0) sqlippool: SQL-User-Name set to 'cgnattest at adsl.merula.net'
>> (0) sqlippool: EXPAND BEGIN TRANSACTION
>> (0) sqlippool:    --> BEGIN TRANSACTION
>> (0) sqlippool: Executing query: BEGIN TRANSACTION
>> src/modules/rlm_sql/rlm_sql.c:381: Type mismatch: name[rlm_sql_t]
>> expected[rlm_sql_handle_t]
>>
>> talloc abort: src/modules/rlm_sql/rlm_sql.c:381: Type mismatch:
>> name[rlm_sql_t] expected[rlm_sql_handle_t]
>> ----
>>
>>
>> Have I done something silly here ?
>>
>> This is using a newly upgraded 3.0.18 install
>>
>> Thanks in advance
>>
>> Richard
>>
>>
>> On Saturday 06/04/2019 at 9:10 pm, Alan DeKok  wrote:
>>>
>>>
>>> On Apr 6, 2019, at 3:54 PM, Richard J Palmer <richard at merula.net>
>>> wrote:
>>>>
>>>>
>>>>
>>>> I am getting somewhere
>>>
>>>                Sounds good.
>>>
>>>>
>>>>
>>>>
>>>> There's actually a couple of other changes - One in the source code -
>>>> one for the queries.
>>>>
>>>> I have it running in theory and will test and come back on this one
>>>> soon....
>>>>
>>>> With the source code - the issue I found was the Transaction code was
>>>> different in Mssql to mysql - The start / end transaction calls seem
>>>> to be hard coded - so for now I have tweaked the code to send the MS
>>>> SQL commit functions - BUT I suspect that may be better as a config
>>>> setting ?
>>>
>>>                The transaction code should be pretty common: start
>>> transaction, do
>>> work, end transaction.  And all of those SQL statements can go into
>>> the configuration files.
>>>
>>>                e.g. having "allocate_commit = COMMIT" in the source is 
>>> just a
>>> default.  If you need a different statement for commit, just put
>>> "allocate_commit = whatever" into the configuration files.  No source
>>> code changes required.
>>>
>>>                What's different about the MS-SQL commit functions?
>>>
>>>>
>>>>
>>>>
>>>> I am going to test this 'in anger' now so we get accounting data for a
>>>> few test accounts and make sure things look OK...
>>>>
>>>> Once working would you like a copy of the code changes / working
>>>> queries to apply to the code ?
>>>
>>>                Yes.  Probably only one file with the queries is 
>>> needed.
>>>
>>>                Alan DeKok.
>>>
>>>
>>> -
>>> List info/subscribe/unsubscribe? See
>>> http://www.freeradius.org/list/users.html
>>
>> -
>> List info/subscribe/unsubscribe? See
>> http://www.freeradius.org/list/users.html
>
> -
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list