I have an if statement that checks if the Packet-Src-IP-Address matches that of the ones in the database table and the same process for the realm, before processing a user. This works fine to a local database, however I need redundancy setting up and it fails to authenticate to the second database but it does appear to connect. In the sites-enabled/default file I have: if("%{sql: SELECT COUNT(nas_ip) FROM `nas_ip` WHERE nas_ip='%{Packet-Src-IP-Address}' AND realm='%{Realm}'}" >0 ) { redundant { sql1 sql2 } } In radiusd.conf under instantiate { ..... Redundant { Sql1 Sql2 Handled } } And $INCLUDE sql1.conf $INCLUDE sql2.conf With the connection info for the databases in those 2 files. The output of radiusd -X is in the txt file attached Any help on how to get this working would be much appreciated. Adam King Network Engineer adam.king@intechnology.com InTechnology plc Support 0845 120 7070 Telephone 01423 850000 Facsimile 01423 858866 www.intechnology.com * Harrogate, Reading, London * 200 people, ?50m p.a. turnover * Over 500 corporate clients * Specialist Business Solutions & Services Provider This is an email from InTechnology plc, Central House, Beckwith Knowle, Harrogate, UK, HG3 1UG. Registered in England 3916586. The contents of this message may be privileged and confidential. If you have received this message in error, you may not use, disclose, copy or distribute its content in anyway. Please notify the sender immediately. All messages are scanned for all viruses.
King, Adam wrote:
I have an if statement that checks if the Packet-Src-IP-Address matches that of the ones in the database table and the same process for the realm, before processing a user. This works fine to a local database, however I need redundancy setting up and it fails to authenticate to the second database but it does appear to connect.
No. It doesn't connect to the second SQL server. rlm_sql_mysql: Couldn't connect socket to MySQL server radius@localhost:radius rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' This is a MySQL error. See the MySQL documentation for details. Alan DeKok.
Sorted, thanks again for the help. One more question, off topic a bit - Is there any configuration difference if I intend to run the radius servers on virtual machines using vmware rather than on physical hardware? Adam King Network Engineer adam.king@intechnology.com InTechnology plc Support 0845 120 7070 Telephone 01423 850000 Facsimile 01423 858866 www.intechnology.com -----Original Message----- From: freeradius-users-bounces+adam.king=intechnology.co.uk@lists.freeradius.o rg [mailto:freeradius-users-bounces+adam.king=intechnology.co.uk@lists.free radius.org] On Behalf Of Alan DeKok Sent: 18 June 2008 14:29 To: FreeRadius users mailing list Subject: Re: redundant_sql King, Adam wrote:
I have an if statement that checks if the Packet-Src-IP-Address matches that of the ones in the database table and the same process for the realm, before processing a user. This works fine to a local database, however I need redundancy setting up and it fails to authenticate to the second database but it does appear to connect.
No. It doesn't connect to the second SQL server. rlm_sql_mysql: Couldn't connect socket to MySQL server radius@localhost:radius rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' This is a MySQL error. See the MySQL documentation for details. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html This is an email from InTechnology plc, Central House, Beckwith Knowle, Harrogate, UK, HG3 1UG. Registered in England 3916586. The contents of this message may be privileged and confidential. If you have received this message in error, you may not use, disclose, copy or distribute its content in anyway. Please notify the sender immediately. All messages are scanned for all viruses.
Connection details for sql1 are incorrect. Ivan Kalik Kalik Informatika ISP Dana 18/6/2008, "King, Adam" <adam.king@intechnology.com> piše:
I have an if statement that checks if the Packet-Src-IP-Address matches that of the ones in the database table and the same process for the realm, before processing a user. This works fine to a local database, however I need redundancy setting up and it fails to authenticate to the second database but it does appear to connect. In the sites-enabled/default file I have: if("%{sql: SELECT COUNT(nas_ip) FROM `nas_ip` WHERE nas_ip='%{Packet-Src-IP-Address}' AND realm='%{Realm}'}" >0 ) { redundant { sql1 sql2 } }
In radiusd.conf under instantiate { ......
Redundant { Sql1 Sql2 Handled } }
And $INCLUDE sql1.conf $INCLUDE sql2.conf
With the connection info for the databases in those 2 files. The output of radiusd -X is in the txt file attached Any help on how to get this working would be much appreciated.
Adam King Network Engineer adam.king@intechnology.com
InTechnology plc Support 0845 120 7070 Telephone 01423 850000 Facsimile 01423 858866 www.intechnology.com * Harrogate, Reading, London * 200 people, ?50m p.a. turnover * Over 500 corporate clients * Specialist Business Solutions & Services Provider
This is an email from InTechnology plc, Central House, Beckwith Knowle, Harrogate, UK, HG3 1UG. Registered in England 3916586.
The contents of this message may be privileged and confidential. If you have received this message in error, you may not use,
disclose, copy or distribute its content in anyway. Please notify the sender immediately.
All messages are scanned for all viruses.
participants (3)
-
Alan DeKok -
Ivan Kalik -
King, Adam