server error in 3.0.11/ unknown column
Wegener, Norbert
norbert.wegener at atos.net
Wed Jul 20 09:55:58 CEST 2016
I have my users in a local mysql database and want to send logs to a central
mysql database via sql-relay.
This works fine.
Now as the central log db uses a radpostauth table with an extended
structure compared to the default table available on every radius server
installation, I want to provide additional information for the service desk
people.
Unfortunately, when I change the default post-auth in
mods-config/sql/main/mysql/queries.conf
from:
post-auth {
# Write SQL queries to a logfile. This is potentially useful for bulk
inserts
# when used with the rlm_sql_null driver.
# logfile = ${logdir}/post-auth.sql
query = "\
INSERT INTO ${..postauth_table} \
(username, pass, reply, authdate) \
VALUES ( \
'%{SQL-User-Name}', \
'%{%{User-Password}:-%{Chap-Password}}', \
'%{reply:Packet-Type}', \
'%S')"
To:
post-auth {
# Write SQL queries to a logfile. This is potentially useful for
bulk inserts
# when used with the rlm_sql_null driver.
# logfile = ${logdir}/post-auth.sql
query = "\
INSERT INTO ${..postauth_table} \
(username, pass, reply, authdate, nasname,
nasipaddress,radiusip,switchtype,machinetype,nasport,modulefailmes,csi,vlan)
\
VALUES ( \
'%{SQL-User-Name}', \
'%{%{User-Password}:-%{Chap-Password}}', \
'%{reply:Packet-Type}', \
'%S','%{NAS-Identifier}','%{Client-IP-Address}','${RADIP}','%{request:Virtua
l-Server}','%{request:usergroup}','%{NAS-Port-Id}','%{Module-Failure-Message
}','%{Calling-Station-Id}','%{control:switchvlan}')"
}
I get a server error:
...
(0) sqldef: --> INSERT INTO radpostauth (username, pass, reply, authdate,
nasname,
nasipaddress,radiusip,switchtype,machinetype,nasport,modulefailmes,csi,vlan)
VALUES ( '000d60d11c1e', '000d60d11c1e', 'Access-Accept', '2016-07-20
07:34:36','','123.45.163.93','sapold','cisco','other','','MAC based
auth','','')
(0) sqldef: EXPAND /usr/local/freeradius-3.0.11/var/log/radius/post-auth.sql
(0) sqldef: --> /usr/local/freeradius-3.0.11/var/log/radius/post-auth.sql
(0) sqldef: Executing query: INSERT INTO radpostauth (username, pass, reply,
authdate, nasname,
nasipaddress,radiusip,switchtype,machinetype,nasport,modulefailmes,csi,vlan)
VALUES ( '000d60d11c1e', '000d60d11c1e', 'Access-Accept', '2016-07-20
07:34:36','','123.45.163.93','sapold','cisco','other','','MAC based
auth','','')
(0) sqldef: ERROR: rlm_sql_mysql: ERROR 1054 (Unknown column 'nasipaddress'
in 'field list'): 42S22
(0) sqldef: SQL query returned: server error
This could probably be solved by modifying the radpostauth table on every
radius server, but this is something I really would like to avoid if
possible on production systems.
Any other idea?
Norbert Wegener
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5725 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20160720/008493c4/attachment-0001.bin>
More information about the Freeradius-Users
mailing list