pre1 dies on startup: generate_sql_clients() returned error
I have a larger list of clients, that is read from a mysql database. Freeradius starts loading the clients, but when having loaded the first 2442 clients, it dies. Unfortunately gdb is not very helpfull: ..... rlm_sql (sql_base): Read entry nasname=192.168.36.73,shortname=192.168.36.73,secret=maxen^M rlm_sql (sql_base): Adding client 192.168.36.73 (192.168.36.73) to clients list^M rlm_sql (sql_base): generate_sql_clients() returned error rlm_sql (sql_base): Closing sqlsocket 4 rlm_sql (sql_base): Closing sqlsocket 3 rlm_sql (sql_base): Closing sqlsocket 2 rlm_sql (sql_base): Closing sqlsocket 1 rlm_sql (sql_base): Closing sqlsocket 0 radiusd.conf[46]: sql_base: Module instantiation failed. radiusd.conf[2032] Failed to find module "sql_base". radiusd.conf[2032] Failed to parse "sql_base" entry. radiusd.conf[1928] Failed to parse authorize section. Errors setting up modules Program exited with code 01. (gdb) bt No stack. (gdb) Norbert Wegener
Hi,
I have a larger list of clients, that is read from a mysql database. Freeradius starts loading the clients, but when having loaded the first 2442 clients, it dies.
time for FAQ or Wiki entry? the error message is not too helpful but what it means is that you have an identical entry in your database. either its a duplicate, or its the same as one in clients.conf the SQL table should have a UNIQUE force attribute for IP address alan
A.L.M.Buxey@lboro.ac.uk wrote:
time for FAQ or Wiki entry? the error message is not too helpful but what it means is that you have an identical entry in your database. either its a duplicate, or its the same as one in clients.conf
the SQL table should have a UNIQUE force attribute for IP address
The "clients.conf" file may also define clients. I'll add a debug message complaining about this. Alan DeKok.
A.L.M.Buxey@lboro.ac.uk wrote:
Hi,
The "clients.conf" file may also define clients.
yes. but that still doesnt fix the issue that duplicates could exist in the NAS table itself :-)
That's true, but maybe Alan's suggestion to add a debug message complaining about this would be nice here, too? Norbert Wegener
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alan DeKok wrote:
Norbert Wegener wrote:
That's true, but maybe Alan's suggestion to add a debug message complaining about this would be nice here, too?
Committed to CVS.
Does it complain and die , or just complain ? This is the kind of issue that I can see someone phoning me at 2am for *sigh* ... Oh fun... the four fields that make up the ip address haven't got a unique index across them... and the person who wrote our management application allows 0.0.0.0 as an ip address... --- I know you like to kill the server off if theres any kind of configuration parsing error; but possibly duplicate/invalid clients is one of the exceptions where it might be better to complain bitterly... Or better still complain normally, and complain and exit in debugging mode.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Mon 27 Aug 2007, Arran Cudbard-Bell wrote:
Alan DeKok wrote:
Norbert Wegener wrote:
That's true, but maybe Alan's suggestion to add a debug message complaining about this would be nice here, too?
Committed to CVS.
Does it complain and die , or just complain ?
This is the kind of issue that I can see someone phoning me at 2am for *sigh* ...
Oh fun... the four fields that make up the ip address haven't got a unique index across them...
and the person who wrote our management application allows 0.0.0.0 as an ip address...
---
I know you like to kill the server off if theres any kind of configuration parsing error; but possibly duplicate/invalid clients is one of the exceptions where it might be better to complain bitterly...
Or better still complain normally, and complain and exit in debugging mode.
How do we currently handle overlapping subnets, and more specifically a single share secret for a subnet with specific shared secrets for IPs in that subnet? (IMHO a valid config but something I am not sure we support at present) Regards -- Peter Nixon http://peternixon.net/
Hi,
How do we currently handle overlapping subnets, and more specifically a single share secret for a subnet with specific shared secrets for IPs in that subnet? (IMHO a valid config but something I am not sure we support at present)
overlapping/zopa or joins are all valid - the NAS with the closest match to the IP is taken. so that NAS must have a valid shared secret if its the closest match. this works suprisingly well... alan
Hi,
Does it complain and die , or just complain ?
dies.
This is the kind of issue that I can see someone phoning me at 2am for *sigh* ...
Oh fun... the four fields that make up the ip address haven't got a unique index across them...
I've made a change locally on our DB to add a unique constrain on that column of the DB to stop it being able to occur at that stage...and submitted a little patch to bugs.freeradius.org (under the rlm_sql tag)
and the person who wrote our management application allows 0.0.0.0 as an ip address...
well, it is a valid address.... could be cool to specify the default-route as a next hop DEFAULT proxy or NAS ;-) alan
Arran Cudbard-Bell wrote:
I know you like to kill the server off if theres any kind of configuration parsing error; but possibly duplicate/invalid clients is one of the exceptions where it might be better to complain bitterly...
This goes for invalid clients, invalid home servers, databases that are down, etc. The list is nearly endless. It's difficult to write all of the code to catch all of those error cases. And what does your policy do when it says "proxy to FOO", and FOO doesn't exist? Does your local configuration handle that correctly, or does something else go wrong? It's easier to force people to have working configurations. Alan DeKok.
Regarding the subject, it's still much better than the following headline: "A startup dies on pre1" :-))) Sorry, couldn't help thinking of it when reading the mail. Anyway, a hale to the project that has already helped so many new companies to construct their businnesses... On 28 Aug 2007, at 10:29, Alan DeKok wrote:
Arran Cudbard-Bell wrote:
I know you like to kill the server off if theres any kind of configuration parsing error; but possibly duplicate/invalid clients is one of the exceptions where it might be better to complain bitterly...
This goes for invalid clients, invalid home servers, databases that are down, etc. The list is nearly endless.
It's difficult to write all of the code to catch all of those error cases. And what does your policy do when it says "proxy to FOO", and FOO doesn't exist? Does your local configuration handle that correctly, or does something else go wrong?
It's easier to force people to have working configurations.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/ users.html
participants (6)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Arran Cudbard-Bell -
Artur Hecker -
Norbert Wegener -
Peter Nixon