3.0.1: good old "die on exit" again
Stefan Winter
stefan.winter at restena.lu
Tue Feb 4 08:59:19 CET 2014
Hi,
> Must be the modules which get instantiated even though not used. I'm now
> deleting gradually from mods-enabled until I hopefully find the source.
Weird. So long as I only have one instance of sql-null-* named
instances, I'm good. As soon as I instantiate a second one, death by
TERM.
Here are the two instances I used - deleting any one of the two makes
the server behave again:
aragorn:/usr/local/freeradius/config/raddb/mods-enabled # cat sql-null-lastusage
sql sql-null-lastusage {
$INCLUDE ../sql-null-include.conf
postauth_table = "lastusage" # in radius_internal
post-auth {
logfile = "${radacctdir}/sql-relay-common"
sql_user_name = "%{%{User-Name}:-NO User-Name}"
query = "INSERT INTO ${..postauth_table} \
(username, \
service, \
type) \
VALUES ( '%{User-Name}', \
'%{RESTENA-Service-Type}', \
'%{reply:Packet-Type}') \
ON DUPLICATE KEY UPDATE last_seen='%S'"
}
}
aragorn:/usr/local/freeradius/config/raddb/mods-enabled # cat sql-null-postauth
sql sql-null-postauth {
$INCLUDE ../sql-null-include.conf
postauth_table = "radpostauth" # in radius_internal
post-auth {
logfile = "${radacctdir}/sql-relay-common"
sql_user_name = "%{%{User-Name}:-NO User-Name}"
query = "INSERT INTO ${..postauth_table} \
(user, \
pass, \
reply, date) \
VALUES ('%{User-Name}', \
'%{RESTENA-Service-Type}', \
'%{reply:Packet-Type}', \
'%S')"
}
}
aragorn:/usr/local/freeradius/config/raddb/mods-enabled #
Both include the same template file (that's not forbidden, I hope...
I used to have this for *years* now...). It's attached due to the
default comments making it too big to paste.
I realise that I have only defined the post-auth queries with that
method (the last line in the template about queries.conf is commented);
the modules only get used in post-auth. For the rest of the
query set, I don't care.
Greetings,
Stefan Winter
--
Stefan WINTER
Ingenieur de Recherche
Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
Tel: +352 424409 1
Fax: +352 422473
PGP key updated to 4096 Bit RSA - I will encrypt all mails if the recipient's key is known to me
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0DE6A358A39DC66
-------------- next part --------------
# -*- text -*-
##
## sql.conf -- SQL modules
##
## $Id: 16d2cf940c8fa8a67b99ca1f39267c8caf19853d $
######################################################################
#
# Configuration for the SQL module
#
# The database schemas and queries are located in subdirectories:
#
# sql/<DB>/main/schema.sql Schema
# sql/<DB>/main/queries.conf Authorisation and Accounting queries
#
# Where "DB" is mysql, mssql, oracle, or postgresql.
#
# The submodule to use to execute queries. This should match
# the database you're attempting to connect to.
#
# * rlm_sql_mysql
# * rlm_sql_mssql
# * rlm_sql_oracle
# * rlm_sql_postgresql
# * rlm_sql_sqlite
# * rlm_sql_null (log queries to disk)
#
driver = "rlm_sql_null"
# The dialect of SQL you want to use, this should usually match
# the driver you selected above.
#
# If you're using rlm_sql_null, then it should be the type of
# database the logged queries are going to be exected against.
dialect = "mysql"
# Connection info:
#
# server = "localhost"
# port = 3306
# login = "radius"
# password = "radpass"
# Database table configuration for everything except Oracle
radius_db = "radius_internal"
# If you are using Oracle then use this instead
# radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))"
# If you want both stop and start records logged to the
# same SQL table, leave this as is. If you want them in
# different tables, put the start table in acct_table1
# and stop table in acct_table2
# acct_table1 = "radacct"
# acct_table2 = "radacct"
# Allow for storing data after authentication
# postauth_table = "radpostauth"
# Tables containing 'check' items
authcheck_table = "radcheck"
groupcheck_table = "radgroupcheck"
# Tables containing 'reply' items
authreply_table = "radreply"
groupreply_table = "radgroupreply"
# Table to keep group info
usergroup_table = "radusergroup"
# If set to 'yes' (default) we read the group tables
# If set to 'no' the user MUST have Fall-Through = Yes in the radreply table
# read_groups = yes
# Remove stale session if checkrad does not see a double login
delete_stale_sessions = no
# Print all SQL statements when in debug mode (-x)
sqltrace = no
sqltracefile = ${logdir}/sqltrace.sql
# As of version 3.0, the "pool" section has replaced the
# following configuration items:
#
# num_sql_socks
# connect_failure_retry_delay
# lifetime
# max_queries
#
# The connection pool is new for 3.0, and will be used in many
# modules, for all kinds of connection-related activity.
#
pool {
# Number of connections to start
start = 3
# Minimum number of connections to keep open
min = 3
# Maximum number of connections
#
# If these connections are all in use and a new one
# is requested, the request will NOT get a connection.
max = 10
# Spare connections to be left idle
#
# NOTE: Idle connections WILL be closed if "idle_timeout"
# is set.
spare = 3
# Number of uses before the connection is closed
#
# 0 means "infinite"
uses = 0
# The lifetime (in seconds) of the connection
lifetime = 0
# idle timeout (in seconds). A connection which is
# unused for this length of time will be closed.
idle_timeout = 3600
# NOTE: All configuration settings are enforced. If a
# connection is closed because of "idle_timeout",
# "uses", or "lifetime", then the total number of
# connections MAY fall below "min". When that
# happens, it will open a new connection. It will
# also log a WARNING message.
#
# The solution is to either lower the "min" connections,
# or increase lifetime/idle_timeout.
}
# Set to 'yes' to read radius clients from the database ('nas' table)
# Clients will ONLY be read on server startup.
# read_clients = yes
# Table to keep radius client info
client_table = "nas"
# Read database-specific queries
# $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x8A39DC66.asc
Type: application/pgp-keys
Size: 3243 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20140204/893e2e82/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20140204/893e2e82/attachment.pgp>
More information about the Freeradius-Devel
mailing list