On Mon, Jul 21, 2003 at 01:27:04PM +0900, CW wrote:
> Please exuse my last post I accidentily sent it off before I was done
> 
> 
> 
> I am running redhat 9.0 with postgresql 7.3 and freeradius-0.8.1.
> I use it for authentication for our fiber connections.  Everything was
> working well untill lately.  I have noticed that I get an error like the
> following in my radius.log and after that it looses the connection with
> postgresql server and I have to restart the freeradius process.
> 
> Fri Jul  4 06:03:09 2003 : Error: rlm_sql (sql): Couldn't update SQL
> accounting STOP record - ERROR:  pg_atoi: error reading "2618979488":
> Numerical result out of range
> 
> I suspect that it is trying to write the acctoutputoctets for a session into
> the radacct table but I am not positive.  My postgresql radacct table was
> created with the following script
> 
> 
> CREATE TABLE radacct (
>   RadAcctId SERIAL,
>   AcctSessionId VARCHAR(32) DEFAULT '' NOT NULL,
>   AcctUniqueId VARCHAR(32) DEFAULT '' NOT NULL,
>   UserName VARCHAR(32) DEFAULT '' NOT NULL,
>   Realm VARCHAR(30) DEFAULT '',
>   NASIPAddress VARCHAR(15) DEFAULT '' NOT NULL,
>   NASPortId NUMERIC(12),
>   NASPortType VARCHAR(32),
>   AcctStartTime timestamp,
>   AcctStopTime timestamp,
>   AcctSessionTime NUMERIC(12),
>   AcctAuthentic VARCHAR(32),
>   ConnectInfo_start VARCHAR(32),
>   ConnectInfo_stop VARCHAR(32),
>   AcctInputOctets NUMERIC(12),
>   AcctOutputOctets NUMERIC(12),
>   CalledStationId VARCHAR(10) DEFAULT '' NOT NULL,
>   CallingStationId VARCHAR(10) DEFAULT '' NOT NULL,
>   AcctTerminateCause VARCHAR(32) DEFAULT '' NOT NULL,
>   ServiceType VARCHAR(32),
>   FramedProtocol VARCHAR(32),
>   FramedIPAddress VARCHAR(15) DEFAULT '' NOT NULL,
>   AcctStartDelay NUMERIC(12),
>   AcctStopDelay NUMERIC(12),
>   PRIMARY KEY (RadAcctId)
> );

Are you sure you didn't modify the schema? It seems that you are using
integer for AcctOutputOctets, because 2618979488 is a valid value for
numeric(12):

fduch=# SELECT '2618979488'::numeric(12);
  numeric
------------
 2618979488
(1 record)

You could set up another database with more appropriate RadAcct table
(see schema and queries from 0.9-pre), and configure 2 sql modules
to do accounting - one to the old database, and second to the new one.
When everything OK, disable first.

Note, however, that current database schema and queries are
significally different from yours, so you should first test if you 
can convert your old accounting data into new database.

-- 
Fduch M. Pravking

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to