Slaptijack Title

Cisco Access Registrar: Automatically Clear Old Sessions

by Scott Hebert

While doing some testing with Cisco Access Registrar (CAR) 5.0, I noticed that the test user had hundreds of old sessions hanging around:

--> query-sessions /r with-User X
Sessions with-User X for /Radius
  Sessions for /Radius/SessionManagers/session-mgr-1:
    S432 Key: 04000000000CF660, NAS: NAS.slaptijack.com, NAS-Port: 0, User-Name: X, Time: 21:19:26, Acct-Session-Id: 04000000000CF660
<snipped a lot of lines>

--> count-sessions /r with-User X

Total 469 session(s) with-User X for /Radius/SessionManagers

Read More →

Python: Remove Whitespace From a String

by Scott Hebert
>>> print "".join(" hello   world ".split())
helloworld

The key to the above is that the String method split() separates the string on any amount of whitespace when no separator is specified.

Python Logo

Tech Messages | 2010-08-31

by Scott Hebert

Green NetworkInteresting technology-related news from around the web for 2010-08-31:

Tech Messages | 2010-08-30

by Scott Hebert

Green NetworkInteresting technology-related news from around the web for 2010-08-30:

Cisco Access Registrar ODBC Remote Server KeepAliveTimerInterval

by Scott Hebert

In a test lab, we ran into a situation where the connection between our Cisco Access Registrar (AAA) server and MySQL server was timing out. This forced the server to reconnect and resulted in the following errors:

 name/radius/1 Error Server 0 ODBC client (DataSource 'my_odbc', Connection 8): SQLExecute failed: SQLState:08S01 NativeError:2006 ErrorText:[MySQL][ODBC 3.51 Driver][mysqld-5.0.21-log] MySQL server has gone away
name/radius/1 Error Server 0 Service odbc has no active remote servers available

Obviously, the MySQL server was still there, but after the wait_timeout expires, the server severs the idle connections. By default, the wait_timeout is set to 8 hours. This is obviously much longer than is usually necessary, but in our test lab, it caused problems every morning.

The fix is to set the KeepAliveTimerInterval in the Remote Servers configuration in Cisco Access Registrar. The value defaults to 0, which means no keep-alives are sent. When you set this value, remember that it is in milliseconds. If you forget, you are going to be send lots and lots of keep-alives to your database server!