(RADIATOR) Problems with Timed out, retransmitting and SQL accounting

Hugh Irvine hugh at open.com.au
Wed Jun 9 10:45:44 CDT 2004


Hello Sergio -

One way to do this is to use "AccountingHandled" in the Handler clause 
and "IgnoreAccountingResponse" in the AuthBy RADIUS clause.

<Handler .....>
	AccountingHandled
	......
	<AuthBy RADIUS>
		......
		IgnoreAccountingResponse
	</AuthBy>
	.....
</Handler>

regards

Hugh


On 9 Jun 2004, at 10:19, Sergio Gómez de Travesedo Rojas wrote:

> Hi every one,
>
> 	I'm having problems (sometimes) retransmitting accounting packets to 
> my
> radius clients... The problem is... I have my system doing sql 
> accounting
> and then retransmitting the packet to one radius client... and when I 
> can
> not connect to that client tries to insert again into my data base... 
> ¿do
> you know how to fix it?... thanks in advance..
>
> Here is an example of debug lines...
>
> Tue Jun  8 20:55:12 2004: DEBUG: Packet dump:
> *** Received from 192.168.0.1 port 21714 ....
>
> Packet length = 182
> 04 2b 00 b6 77 1a 75 0d a4 4d 4e e9 ad 7a 1a 8d
> 4c 54 d6 eb 2c 0a 30 30 32 30 41 35 31 36 07 06
> 00 00 00 01 08 06 a4 4d b4 c0 2d 06 00 00 00 01
> 01 11 31 31 36 35 32 40 67 75 76 73 6b 79 61 75
> 73 28 06 00 00 00 01 1f 0e 34 34 31 33 38 32 37
> 37 35 34 35 34 1e 09 31 31 30 30 30 30 23 05 06
> 00 00 01 e1 3d 06 00 00 00 00 4d 1a 31 34 34 30
> 30 20 56 33 32 62 69 73 2f 56 34 32 62 69 73 2f
> 4c 41 50 4d 19 20 43 49 53 43 4f 41 43 53 3a 30
> 30 30 35 63 32 36 31 2f 61 34 34 64 62 34 30 32
> 2f 34 38 31 06 06 00 00 00 02 04 06 a4 4d b4 02
> 29 06 00 00 00 00
> Code:       Accounting-Request
> Identifier: 43
> Authentic:  w<26>u<13><164>MN<233><173>z<26><141>LT<214><235>
> Attributes:
> 	Acct-Session-Id = "0020A516"
> 	Framed-Protocol = PPP
> 	Framed-IP-Address = 192.168.0.80
> 	Acct-Authentic = RADIUS
> 	User-Name = "MYUSERNAME at MYREALM"
> 	Acct-Status-Type = Start
> 	Calling-Station-Id = "111111111111"
> 	Called-Station-Id = "110000#"
> 	NAS-Port = 481
> 	NAS-Port-Type = Async
> 	Connect-Info = "14400 V32bis/V42bis/LAPM"
> 	Class = "CISCOACS:0005c261/a44db402/481"
> 	Service-Type = Framed-User
> 	NAS-IP-Address = 192.168.0.1
> 	Acct-Delay-Time = 0
>
> Tue Jun  8 20:55:12 2004: DEBUG: Handling request with Handler
> 'Request-Type=Accounting-Request,Realm=MYREALM'
> Tue Jun  8 20:55:12 2004: DEBUG:  Adding session for 
> MYUSERNAME at MYREALM,
> 192.168.0.1, 481
> Tue Jun  8 20:55:12 2004: DEBUG: Handling with Radius::AuthSQL
> Tue Jun  8 20:55:12 2004: DEBUG: Handling accounting with 
> Radius::AuthSQL
> Tue Jun  8 20:55:12 2004: DEBUG: do query is: insert into Calls
> 		(NASIdentifier, NasPort, AcctSessionID, AcctStatusType, UserName,
> AcctDelayTime, AcctAuthentic, NASPortDNIS, CallerId, CallingStationId,
> FramedProtocol, UserService)
> 		values
> 		('192.168.0.1', 481, '0020A516', 1, 'MYUSERNAME at MYREALM', 0, 1, 
> '110000#',
> '111111111111', '111111111111', 1, 2)
>
> Tue Jun  8 20:55:12 2004: DEBUG: Handling with Radius::AuthGROUP
> Tue Jun  8 20:55:12 2004: DEBUG: Rewrote user name to MYUSERNAME
> Tue Jun  8 20:55:12 2004: DEBUG: Handling with Radius::AuthRADIUS
> Tue Jun  8 20:55:12 2004: DEBUG: Packet dump:
> *** Sending to 10.0.1.1 port 1813 ....
>
> Packet length = 178
> 04 13 00 b2 d8 32 ca 4e cc 91 bc dc 1c 7f 79 1c
> 74 23 9c c1 2c 0a 30 30 32 30 41 35 31 36 07 06
> 00 00 00 01 08 06 a4 4d b4 c0 2d 06 00 00 00 01
> 01 07 31 31 36 35 32 28 06 00 00 00 01 1f 0e 34
> 34 31 33 38 32 37 37 35 34 35 34 1e 09 31 31 30
> 30 30 30 23 05 06 00 00 01 e1 3d 06 00 00 00 00
> 4d 1a 31 34 34 30 30 20 56 33 32 62 69 73 2f 56
> 34 32 62 69 73 2f 4c 41 50 4d 19 20 43 49 53 43
> 4f 41 43 53 3a 30 30 30 35 63 32 36 31 2f 61 34
> 34 64 62 34 30 32 2f 34 38 31 06 06 00 00 00 02
> 04 06 a4 4d b4 02 29 06 00 00 00 00 67 06 40 c6
> 0b 90
> Code:       Accounting-Request
> Identifier: 19
> Authentic:  <0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0>
> Attributes:
> 	Acct-Session-Id = "0020A516"
> 	Framed-Protocol = PPP
> 	Framed-IP-Address = 192.168.0.80
> 	Acct-Authentic = RADIUS
> 	User-Name = "MYUSERNAME"
> 	Acct-Status-Type = Start
> 	Calling-Station-Id = "111111111111"
> 	Called-Station-Id = "110000#"
> 	NAS-Port = 481
> 	NAS-Port-Type = Async
> 	Connect-Info = "14400 V32bis/V42bis/LAPM"
> 	Class = "CISCOACS:0005c261/a44db402/481"
> 	Service-Type = Framed-User
> 	NAS-IP-Address = 192.168.0.1
> 	Acct-Delay-Time = 0
> 	Timestamp = 1086720912
>
> Tue Jun  8 20:55:14 2004: DEBUG: Timed out, retransmitting
> Tue Jun  8 20:55:14 2004: DEBUG: Packet dump:
> *** Sending to 10.0.1.1 port 1812 ....
>
> Tue Jun  8 20:55:17 2004: DEBUG: Packet dump:
> *** Received from 192.168.0.1 port 21714 ....
>
> Packet length = 182
> 04 2e 00 b6 bb 65 f9 d7 71 56 95 3e 74 94 4f f8
> 7f 13 c7 85 2c 0a 30 30 32 30 41 35 31 36 07 06
> 00 00 00 01 08 06 a4 4d b4 c0 2d 06 00 00 00 01
> 01 11 31 31 36 35 32 40 67 75 76 73 6b 79 61 75
> 73 28 06 00 00 00 01 1f 0e 34 34 31 33 38 32 37
> 37 35 34 35 34 1e 09 31 31 30 30 30 30 23 05 06
> 00 00 01 e1 3d 06 00 00 00 00 4d 1a 31 34 34 30
> 30 20 56 33 32 62 69 73 2f 56 34 32 62 69 73 2f
> 4c 41 50 4d 19 20 43 49 53 43 4f 41 43 53 3a 30
> 30 30 35 63 32 36 31 2f 61 34 34 64 62 34 30 32
> 2f 34 38 31 06 06 00 00 00 02 04 06 a4 4d b4 02
> 29 06 00 00 00 05
> Code:       Accounting-Request
> Identifier: 46
> Authentic:  <187>e<249><215>qV<149>>t<148>O<248><127><19><199><133>
> Attributes:
> 	Acct-Session-Id = "0020A516"
> 	Framed-Protocol = PPP
> 	Framed-IP-Address = 192.168.0.80
> 	Acct-Authentic = RADIUS
> 	User-Name = "MYUSERNAME at MYREALM"
> 	Acct-Status-Type = Start
> 	Calling-Station-Id = "111111111111"
> 	Called-Station-Id = "110000#"
> 	NAS-Port = 481
> 	NAS-Port-Type = Async
> 	Connect-Info = "14400 V32bis/V42bis/LAPM"
> 	Class = "CISCOACS:0005c261/a44db402/481"
> 	Service-Type = Framed-User
> 	NAS-IP-Address = 192.168.0.1
> 	Acct-Delay-Time = 5
>
> Tue Jun  8 20:55:17 2004: DEBUG: Handling request with Handler
> 'Request-Type=Accounting-Request,Realm=MYREALM'
> Tue Jun  8 20:55:17 2004: DEBUG:  Adding session for 
> MYUSERNAME at MYREALM,
> 192.168.0.1, 481
> Tue Jun  8 20:55:17 2004: DEBUG: Handling with Radius::AuthSQL
> Tue Jun  8 20:55:17 2004: DEBUG: Handling accounting with 
> Radius::AuthSQL
> Tue Jun  8 20:55:17 2004: DEBUG: do query is: insert into Calls
> 		(NASIdentifier, NasPort, AcctSessionID, AcctStatusType, UserName,
> AcctDelayTime, AcctAuthentic, NASPortDNIS, CallerId, CallingStationId,
> FramedProtocol, UserService)
> 		values
> 		('192.168.0.1', 481, '0020A516', 1, 'MYUSERNAME at MYREALM', 5, 1, 
> '110000#',
> '111111111111', '111111111111', 1, 2)
>
> Tue Jun  8 20:55:17 2004: ERR: do failed for 'insert into Calls
> 		(NASIdentifier, NasPort, AcctSessionID, AcctStatusType, UserName,
> AcctDelayTime, AcctAuthentic, NASPortDNIS, CallerId, CallingStationId,
> FramedProtocol, UserService)
> 		values
> 		('192.168.0.1', 481, '0020A516', 1, 'MYUSERNAME at MYREALM', 5, 1, 
> '110000#',
> '111111111111', '111111111111', 1, 2)': [Microsoft][ODBC SQL Server
> Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_Calls'. 
> Cannot
> insert duplicate key in object 'Calls'. (SQL-23000)
> [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been
> terminated. (SQL-01000)(DBD: Execute immediate failed err=-1)
> Tue Jun  8 20:55:17 2004: DEBUG: Handling with Radius::AuthGROUP
> Tue Jun  8 20:55:17 2004: DEBUG: Rewrote user name to MYUSERNAME
> Tue Jun  8 20:55:17 2004: DEBUG: Handling with Radius::AuthRADIUS
> Tue Jun  8 20:55:17 2004: DEBUG: Packet dump:
> *** Sending to 10.0.1.1 port 1813 ....
>
>
>
> Thanks a lot,
> Sergio Gómez de Travesedo Rojas
>
> --
> 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: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.

--
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