(RADIATOR) Problem with remote mySql logging accounting

Hugh Irvine hugh at open.com.au
Thu Oct 24 00:35:44 CDT 2002


Hello Terry -

It looks like you have not installed DBI/DBD correctly on "mrtg".

regards

Hugh


On Thursday, October 24, 2002, at 02:23 PM, terry at ccis.net wrote:

> I'm having trouble getting the second of two radiator servers logging
> accounting records to a mySql database.
>
> Machine "marvin" runs radiator and mySql. Radiator can log fine to the
> database, config is: (all user/pw XXX'd out)
>
> <Handler>
>         # remove the "@domain" part (if it exists)
>         RewriteUsername s/^([^@]+).*/$1/
>         # remove spaces
>         RewriteUsername s/\s//g
>         AuthByPolicy ContinueAlways
>         AcctLogFileName %L/detail
>         AuthLog logger1
>         <AuthBy SQL>
>                 # AuthSelect with empty string means dont do auth
>                 AuthSelect
>                 DBSource        dbi:mysql:radius
>                 DBUsername      XXX
>                 DBAuth          XXX
>                 AccountingTable ACCOUNTING
>                 AcctColumnDef   USERNAME,User-Name
>                 AcctColumnDef   TIME_STAMP,Timestamp,integer
>                 AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type
>                 AcctColumnDef   ACCTDELAYTIME,Acct-Delay-Time,integer
>                 AcctColumnDef   
> ACCTINPUTOCTETS,Acct-Input-Octets,integer
>                 AcctColumnDef   
> ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
>                 AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
>                 AcctColumnDef   
> ACCTSESSIONTIME,Acct-Session-Time,integer
>                 AcctColumnDef   ACCTTERMINATECAUSE,Acct-Terminate-Cause
>                 AcctColumnDef
> ASCENDDISCONNECTCAUSE,Ascend-Disconnect-Cause
>                 AcctColumnDef   ASCENDDATARATE,Ascend-Data-Rate
>                 AcctColumnDef   ASCENDXMITRATE,Ascend-Xmit-Rate
>                 AcctColumnDef
> ASCENDCONNECTPROGRESS,Ascend-Connect-Progress
>                 AcctColumnDef   NASIDENTIFIER,NAS-Identifier
>                 AcctColumnDef   NASPORT,NAS-Port,integer
>                 AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
>                 AcctColumnDef   NASIPADDRESS,NAS-IP-Address
>                 AcctColumnDef   CALLEDSTATIONID,Called-Station-Id
>                 AcctColumnDef   CALLINGSTATIONID,Calling-Station-Id
>                 AcctColumnDef   CONNECTINFO,Connect-Info
>         </AuthBy>
>         # Make sure they appear in the users2 file
>         # Anyone with Auth-Type=UNIX in the users2 file will be
>         # authenticated with the AuthBy UNIX above
>         <AuthBy FILE>
>                 Filename        %D/users2
>         </AuthBy>
>
> </Handler>
>
>
>
> Machine "mrtg"'s radiator gets an error logging into marvin's mySql (I 
> can
> run mysql manually from that machine and access the database with no
> problems). It's config is
>
> <Handler>
>         # remove the "@domain" part (if it exists)
>         RewriteUsername s/^([^@]+).*/$1/
>         # remove spaces
>         RewriteUsername s/\s//g
>         AuthByPolicy ContinueAlways
>         AcctLogFileName %L/detail
>         AuthLog logger1
>         <AuthBy SQL>
>                 # AuthSelect with empty string means dont do auth
>                 AuthSelect
>                 DBSource        dbi:mysql:radius:marvin.ccis.net:3306
>                 DBUsername      XXX
>                 DBAuth          XXX
>                 AccountingTable ACCOUNTING
>                 AcctColumnDef   USERNAME,User-Name
>                 AcctColumnDef   TIME_STAMP,Timestamp,integer
>                 AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type
>                 AcctColumnDef   ACCTDELAYTIME,Acct-Delay-Time,integer
>                 AcctColumnDef   
> ACCTINPUTOCTETS,Acct-Input-Octets,integer
>                 AcctColumnDef   
> ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
>                 AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
>                 AcctColumnDef   
> ACCTSESSIONTIME,Acct-Session-Time,integer
>                 AcctColumnDef   ACCTTERMINATECAUSE,Acct-Terminate-Cause
>                 AcctColumnDef
> ASCENDDISCONNECTCAUSE,Ascend-Disconnect-Cause
>                 AcctColumnDef   ASCENDDATARATE,Ascend-Data-Rate
>                 AcctColumnDef   ASCENDXMITRATE,Ascend-Xmit-Rate
>                 AcctColumnDef
> ASCENDCONNECTPROGRESS,Ascend-Connect-Progress
>                 AcctColumnDef   NASIDENTIFIER,NAS-Identifier
>                 AcctColumnDef   NASPORT,NAS-Port,integer
>                 AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
>                 AcctColumnDef   NASIPADDRESS,NAS-IP-Address
>                 AcctColumnDef   CALLEDSTATIONID,Called-Station-Id
>                 AcctColumnDef   CALLINGSTATIONID,Calling-Station-Id
>                 AcctColumnDef   CONNECTINFO,Connect-Info
>         </AuthBy>
>         # Make sure they appear in the users2 file
>         # Anyone with Auth-Type=UNIX in the users2 file will be
>         # authenticated with the AuthBy UNIX above
>        <AuthBy FILE>
>                 Filename        %D/users2
>         </AuthBy>
>
> </Handler>
>
>
> I've tried specifying the machine name in the DBSource with name and 
> IP, no
> diff. Error is
>
> Thu Oct 24 00:02:35 2002: ERR: Could not connect to any SQL database.
> Request is ignored. Backing off for 600 seconds
> Can't read $DBI::errstr, last handle unknown or destroyed at
> /usr/libdata/perl5/site_perl/Radius/SqlDb.pm line 136.
> Thu Oct 24 00:03:53 2002: ERR: Could not connect to SQL database with
> DBI->connect dbi:mysql:radius:marvin.ccis.net:3306, XXX, XXX:
>
> "marvin" (good) is running radiator 1.93 ; mrtg (bad) is running 1.86.
> Anyone have suggestions?
>
> ===
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.
>
>

NB: I am travelling this week, so there may be delays in our 
correspondence.

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list