Hi Ray,
Your config file looks fine, and looking at the example trace it shows what I
would expect: inserting one Start and then inserting one Stop.
When you get duplicate stops in your SQL, is it only when you test with
radpwtst, or is it coming from your real NAS? If its from the NAS, would it be
possible for you to capture an example NAS login with trace level 4? If its
from radpwtst, is it possible you are seeing old Stops from previous testing
runs (by default, radpwtst uses much the same data for each Stop it sends)
When you say that you have duplicate Stops, is every field exactly duplicated?
What about the Timestamp? Is it possible that you have packet loss between your
NAS and radiator?
I hope that gives you some clues about where to look. Please let me know how
you get on.
Cheers.
On May 24, 10:41pm, Ray Brighenti wrote:
> Subject: (RADIATOR) Very Strange happenings with Radiator->MySQL
> HI all,
>
> I have Radiator set to Auth/Acc to a MySQL Dbase. When I do a test with
> radpwtst I get all OKs, Radiator writes to the detail logs fine, But! when
> I check MySQL I get (90% of the time) two identical STOP records, every now
> and again it will do the proper START and STOP records. But as I mentioned
> before the detail files are 100% right
>
> Also if I have our NAS sending a copy of the START and STOP records to
> Radiator I was getting a lot of duplicate entries (again the detail file
> was fine)
>
> I just used the file in the goodies directory to create the tables (added
> some other fields), I have included my config file below as well as
> Radiator at a trace level of 4.
>
> If there is anything else you need just let me know
>
> Thanks
>
> Ray
>
> radius.cfg
> ===================================
> Foreground
>
> LogStdout
>
> Trace 4
>
> AuthPort 1812
>
> AcctPort 1813
>
> LogDir etc
>
> DbDir .
>
> LogFile etc/logfile
>
> DictionaryFile ./dictionary
>
> <Client radiusmachine.net.au>
> Secret mysecret
> </Client>
>
> <Realm DEFAULT>
> AcctLogFileName ./detail
> PasswordLogFileName ./password.log
>
> AuthByPolicy ContinueWhileAccept
> <AuthBy SQL>
> DBSource dbi:mysql:radius
> DBUsername
> DBAuth
> AuthSelect select PASSWORD from SUBSCRIBERS where USERNAME='%n'
> AuthColumnDef 0, User-Password, check
>
> 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 NASIDENTIFIER,NAS-Identifier,string
> AcctColumnDef NASPORT,NAS-Port,integer
> AcctColumnDef CALLERID,Caller-Id,integer
> AcctColumnDef NASPORTTYPE,NAS-Port-Type,integer
> AcctColumnDef ASCDISCAUSE,Ascend-Disconnect-Cause,integer
> AcctColumnDef ASCCONPROG,Ascend-Connect-Progress,integer
> AcctColumnDef ASCTXRATE,Ascend-Xmit-Rate,integer
> AcctColumnDef ASCRXRATE,Ascend-Data-Rate,integer
> AcctColumnDef ASCMODEPORTNO,Ascend-Modem-PortNo,integer
> AcctColumnDef ASCMODEMSLOTNO,Ascend-Modem-SlotNo,integer
> AcctColumnDef CLIENTPORTDINS,Client-Port-DNIS,integer
> AcctColumnDef FRAMEDPROTOCOL,Framed-Protocol
> AcctColumnDef FRAMEDADDRESS,Framed-Address
> AcctColumnDef ASCMULTILNKID,Ascend-Multilink-ID,integer
> AcctColumnDef ASCNUMINMULTI,Ascend-Num-In-Multilink,integer
> </AuthBy>
>
> </Realm>
>
> ===================================
> Results with trace at 4
> ===================================
>
> Mon May 24 22:22:26 1999: INFO: Server started
> Mon May 24 22:22:33 1999: DEBUG: Packet dump:
> *** Received from 203.23.200.29 port 3466 ....
> Code: Access-Request
> Identifier: 94
>
> Authentic: <0><1><2><3><4><5><6><7><8><9><10><11><12><13><14><15>
> Attributes:
> User-Name = "username"
>
> Password = "<150><209><151><11>f<193><233>)<179>\)0<136>eE]"
>
> Mon May 24 22:22:33 1999: DEBUG: Handling request with Handler
'Realm=DEFAULT'
> Mon May 24 22:22:33 1999: DEBUG: Handling with Radius::AuthSQL
> Mon May 24 22:22:33 1999: DEBUG: Handling with Radius::AuthSQL
> Mon May 24 22:22:33 1999: DEBUG: Query is: select PASSWORD from SUBSCRIBERS
> where USERNAME='username' and CHECKATTR=1
>
> Mon May 24 22:22:33 1999: DEBUG: Radius::AuthSQL looks for match with
username
> Mon May 24 22:22:33 1999: DEBUG: Radius::AuthSQL ACCEPT:
> Mon May 24 22:22:33 1999: DEBUG: Access accepted for username
> Mon May 24 22:22:33 1999: DEBUG: Packet dump:
> *** Sending to 203.23.200.29 port 3466 ....
> Code: Access-Accept
> Identifier: 94
> Authentic: <0><1><2><3><4><5><6><7><8><9><10><11><12><13><14><15>
> Attributes:
>
> Mon May 24 22:22:45 1999: DEBUG: Packet dump:
> *** Received from 203.23.200.16 port 4607 ....
> Code: Access-Request
> Identifier: 90
> Authentic: 1234567890123456
> Attributes:
> User-Name = "username"
> User-Service = Framed-User
> NAS-Identifier = "203.63.154.1"
> NAS-Port = 1234
> NAS-Port-Type = Async
> Password = "?<198>pX<215>R<148>Y<207><240><22>y<193><210><228><216>"
>
> Mon May 24 22:22:45 1999: DEBUG: Handling request with Handler
'Realm=DEFAULT'
> Mon May 24 22:22:45 1999: DEBUG: Handling with Radius::AuthSQL
> Mon May 24 22:22:45 1999: DEBUG: Handling with Radius::AuthSQL
> Mon May 24 22:22:45 1999: DEBUG: Query is: select PASSWORD from SUBSCRIBERS
> where USERNAME='username' and CHECKATTR=1
>
> Mon May 24 22:22:45 1999: DEBUG: Radius::AuthSQL looks for match with
username
> Mon May 24 22:22:45 1999: DEBUG: Radius::AuthSQL ACCEPT:
> Mon May 24 22:22:45 1999: DEBUG: Access accepted for username
> Mon May 24 22:22:45 1999: DEBUG: Packet dump:
> *** Sending to 203.23.200.16 port 4607 ....
> Code: Access-Accept
> Identifier: 90
> Authentic: 1234567890123456
> Attributes:
>
> Mon May 24 22:22:45 1999: DEBUG: Packet dump:
> *** Received from 203.23.200.16 port 4607 ....
> Code: Accounting-Request
> Identifier: 91
> Authentic: j<187><133><226><140>,<174><143>ni<21><197><243><246><218><31>
> Attributes:
> User-Name = "username"
> User-Service = Framed-User
> NAS-Identifier = "203.63.154.1"
> NAS-Port = 1234
> NAS-Port-Type = Async
> Acct-Session-Id = "00001234"
> Acct-Status-Type = Start
>
> Mon May 24 22:22:45 1999: DEBUG: Handling request with Handler
'Realm=DEFAULT'
> Mon May 24 22:22:45 1999: DEBUG: Handling with Radius::AuthSQL
> Mon May 24 22:22:45 1999: DEBUG: Handling accounting with Radius::AuthSQL
> Mon May 24 22:22:45 1999: DEBUG: do query is: insert into ACCOUNTING
> (USERNAME, ACCTSTATUSTYPE, NASIDENTIFIER, NASPORT,
> NASPORTTYPE, ACCTSESSIONID, TIME_STAMP)
> values
> ('username', 'Start', '203.63.154.1', 1234, 0, '00001234',
> 927548565)
>
> Mon May 24 22:22:45 1999: DEBUG: Adding session for username, 203.63.154.1,
> 1234
> Mon May 24 22:22:45 1999: DEBUG: Accounting accepted
> Mon May 24 22:22:45 1999: DEBUG: Packet dump:
> *** Sending to 203.23.200.16 port 4607 ....
> Code: Accounting-Response
> Identifier: 91
> Authentic: j<187><133><226><140>,<174><143>ni<21><197><243><246><218><31>
> Attributes:
>
> Mon May 24 22:22:45 1999: DEBUG: Packet dump:
> *** Received from 203.23.200.16 port 4607 ....
> Code: Accounting-Request
> Identifier: 92
> Authentic: <219>S<140><246><0>'<247><@~<168><175><133>4<25><151>
> Attributes:
> User-Name = "username"
> User-Service = Framed-User
> NAS-Identifier = "203.63.154.1"
> NAS-Port = 1234
> NAS-Port-Type = Async
> Acct-Session-Id = "00001234"
> Acct-Status-Type = Stop
> Acct-Delay-Time = 0
> Acct-Session-Time = 1000
> Acct-Input-Octets = 20000
> Acct-Output-Octets = 30000
>
> Mon May 24 22:22:45 1999: DEBUG: Handling request with Handler
'Realm=DEFAULT'
> Mon May 24 22:22:45 1999: DEBUG: Handling with Radius::AuthSQL
> Mon May 24 22:22:45 1999: DEBUG: Handling accounting with Radius::AuthSQL
> Mon May 24 22:22:45 1999: DEBUG: do query is: insert into ACCOUNTING
> (USERNAME, ACCTSTATUSTYPE, NASIDENTIFIER, NASPORT,
> NASPORTTYPE, ACCTSESSIONID, ACCTSESSIONTIME, TIME_STAMP, ACCTDELAYTIME,
> ACCTINPUTOCTETS, ACCTOUTPUTOCTETS)
> values
> ('username', 'Stop', '203.63.154.1', 1234, 0, '00001234',
> 1000, 927548565, 0, 20000, 30000)
>
> Mon May 24 22:22:45 1999: DEBUG: Deleting session for username,
> 203.63.154.1, 1234
> Mon May 24 22:22:45 1999: DEBUG: Accounting accepted
> Mon May 24 22:22:45 1999: DEBUG: Packet dump:
> *** Sending to 203.23.200.16 port 4607 ....
> Code: Accounting-Response
> Identifier: 92
> Authentic: <219>S<140><246><0>'<247><@~<168><175><133>4<25><151>
> Attributes:
>
>
> ===
> Archive at http://www.thesite.com.au/~radiator/
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
>-- End of excerpt from Ray Brighenti
--
Mike McCauley [EMAIL PROTECTED]
Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au
Phone +61 3 9598-0985 Fax +61 3 9598-0955
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.