On Tue, Sep 30, 2003 at 04:02:44AM -0400, Nick Taylor wrote:
> The problem shows itself when I try to set up accounting with the
> database.
>
> ...
> rlm_sql_postgresql: query: UPDATE radacct SET FramedIPAddress = '' WHERE
> AcctSessionId = ' 700011' AND UserName = '00022d284b47' AND NASIPAddress=
> '192.168.1.209' AND AcctStopTime = 0
> rlm_sql_postgresql: Status: PGRES_FATAL_ERROR
> rlm_sql_postgresql: affected rows =
> rlm_sql_postgresql: Postgresql check_error: PGRES_FATAL_ERROR, returning
> SQL_DOWN
> rlm_sql (sql): failed after re-connect
> rlm_sql (sql): Couldn't update SQL accounting for ALIVE packet - ERROR:
> invalid INET value ''
> rlm_sql (sql): Released sql socket id: 0
Try using in accounting_update_query:
"... FramedIpAddress = '%{Framed-IP-Address:-0.0.0.0}' ..."
or "... FramedIpAddress = NULLIF('%{Framed-IP-Address}', '') ..."
> The SQL server spits out:
>
> ERROR: Bad int8 external representation ""
> ERROR: Bad int8 external representation ""
> ERROR: invalid INET value ''
> ERROR: invalid INET value ''
> ERROR: invalid INET value ''
> ERROR: invalid INET value ''
It seems that you have similar problem with some integers,
but it's not in this radius log. Modify your postgresql.conf
to use '%{Attribute-Name:-default value}' for all attributes
which could be not present in packet, at least for those which
are non-text in your database schema (integer, bigint, inet).
--
Fduch M. Pravking
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html