autostart script for FreeRADIUS
Hello, I was installed FreeRADIUS 2.1.3 on FreeBSD 6.4 . I want FreeRADIUS comes up when the system is rebooting. Thank you. Sincerely, Tseveen
On Mar 29, 2009, at 18:16, Tseveendorj wrote:
Hello,
I was installed FreeRADIUS 2.1.3 on FreeBSD 6.4 . I want FreeRADIUS comes up when the system is rebooting.
Did you add to /etc/rc.conf: radiusd_enable="YES" radiusd_flags="-y" I am not sure about the flags for that version. The -y is for version 1. But there may be some you need for version 2. I haven't put it in production yet.
Yes. I already wrote radiusd_enable="YES" in /etc/rc.conf but It didn't work. Doug Hardie wrote:
On Mar 29, 2009, at 18:16, Tseveendorj wrote:
Hello,
I was installed FreeRADIUS 2.1.3 on FreeBSD 6.4 . I want FreeRADIUS comes up when the system is rebooting.
Did you add to /etc/rc.conf:
radiusd_enable="YES" radiusd_flags="-y"
I am not sure about the flags for that version. The -y is for version 1. But there may be some you need for version 2. I haven't put it in production yet.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
May be I got the problem why radiusd didn't come up. I found following error in the radiusd.log Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Attempting to connect to root@localhost:/billing Fri Mar 27 20:09:43 2009 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server root@localhost:billing Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Fri Mar 27 20:09:43 2009 : Error: rlm_sql (sql): Failed to connect DB handle #0 Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0 Fri Mar 27 20:09:43 2009 : Error: Failed to load clients from SQL. Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[149]: Failed to find module "sql". Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section. Fri Mar 27 20:09:43 2009 : Error: Errors initializing modules In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ? Sincerely, Tseveen. Doug Hardie wrote:
On Mar 29, 2009, at 18:16, Tseveendorj wrote:
Hello,
I was installed FreeRADIUS 2.1.3 on FreeBSD 6.4 . I want FreeRADIUS comes up when the system is rebooting.
Did you add to /etc/rc.conf:
radiusd_enable="YES" radiusd_flags="-y"
I am not sure about the flags for that version. The -y is for version 1. But there may be some you need for version 2. I haven't put it in production yet.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
I found following error in the radiusd.log
Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Attempting to connect to root@localhost:/billing Fri Mar 27 20:09:43 2009 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server root@localhost:billing Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Fri Mar 27 20:09:43 2009 : Error: rlm_sql (sql): Failed to connect DB handle #0 Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0 Fri Mar 27 20:09:43 2009 : Error: Failed to load clients from SQL. Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/ default[149]: Failed to find module "sql". Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/ default[62]: Errors parsing authorize section. Fri Mar 27 20:09:43 2009 : Error: Errors initializing modules
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
I found following error in the radiusd.log
Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Attempting to connect to root@localhost:/billing Fri Mar 27 20:09:43 2009 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server root@localhost:billing Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Fri Mar 27 20:09:43 2009 : Error: rlm_sql (sql): Failed to connect DB handle #0 Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0 Fri Mar 27 20:09:43 2009 : Error: Failed to load clients from SQL. Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[149]: Failed to find module "sql". Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section. Fri Mar 27 20:09:43 2009 : Error: Errors initializing modules
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
How do I do startup order ? Thanks for help. Sincerely, Tseveen.
On Mon, Mar 30, 2009 at 6:53 AM, Tseveendorj <tseveendorj@gmail.com> wrote:
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
I found following error in the radiusd.log
Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Attempting to connect to root@localhost:/billing Fri Mar 27 20:09:43 2009 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server root@localhost:billing Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Fri Mar 27 20:09:43 2009 : Error: rlm_sql (sql): Failed to connect DB handle #0 Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0 Fri Mar 27 20:09:43 2009 : Error: Failed to load clients from SQL. Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[149]: Failed to find module "sql". Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section. Fri Mar 27 20:09:43 2009 : Error: Errors initializing modules
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Check your /etc/rcx.d where x is your default runlevel. mysql should have a lower S number than freeRadius. Regards Luciano
Hi Luciano, Sorry, I didn't understand what are you saying. Please more detailed. Sincerely, Tseveen. On Mon, Mar 30, 2009 at 8:42 PM, Luciano Afranllie <listas.luafran@gmail.com
wrote:
On Mon, Mar 30, 2009 at 6:53 AM, Tseveendorj <tseveendorj@gmail.com> wrote:
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
I found following error in the radiusd.log
Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): Attempting to connect
to
root@localhost:/billing Fri Mar 27 20:09:43 2009 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server root@localhost:billing Fri Mar 27 20:09:43 2009 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Fri Mar 27 20:09:43 2009 : Error: rlm_sql (sql): Failed to connect DB handle #0 Fri Mar 27 20:09:43 2009 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0 Fri Mar 27 20:09:43 2009 : Error: Failed to load clients from SQL. Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[149]: Failed to find module "sql". Fri Mar 27 20:09:43 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section. Fri Mar 27 20:09:43 2009 : Error: Errors initializing modules
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Check your /etc/rcx.d where x is your default runlevel. mysql should have a lower S number than freeRadius.
Regards Luciano
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 30/3/09 13:42, "Luciano Afranllie" <listas.luafran@gmail.com> wrote:
On Mon, Mar 30, 2009 at 6:53 AM, Tseveendorj <tseveendorj@gmail.com> wrote:
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
[ ... ]
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Check your /etc/rcx.d where x is your default runlevel. mysql should have a lower S number than freeRadius.
That would be true for a Linux/SysV startup. The rc script for FreeRadius under FreeBSD should contain the following header: # # PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS nmbd winbindd # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable radiusd: # # radiusd_enable="YES" There should be something similar for the MySQL startup. Take a note of the entry in the MySQL PROVIDE: line and append that to the radiusd REQUIRE: line. That should ensure that the MySQL server is started before FreeRadius. -- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526 -- Future Publishing Limited (registered company number 2008885) and Future Publishing (Overseas) Limited (registered company number 06202940) are wholly owned subsidiaries of Future plc (registered company number 3757874). Future Publishing Limited, Future Publishing (Overseas) Limited and Future plc are all incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW. This email and any files transmitted with it are confidential. If you have received this email in error please notify the sender and then delete it immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future. The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email. Future may regularly and randomly monitor outgoing and incoming emails (including the content of them) and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. ***** Save resources: think before you print.
Does anyone know how to get this started in Debian Linux? On Mon, Mar 30, 2009 at 10:30 AM, John Hawkes-Reed < John.Hawkes-Reed@futurenet.com> wrote:
On 30/3/09 13:42, "Luciano Afranllie" <listas.luafran@gmail.com> wrote:
On Mon, Mar 30, 2009 at 6:53 AM, Tseveendorj <tseveendorj@gmail.com> wrote:
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
[ ... ]
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Check your /etc/rcx.d where x is your default runlevel. mysql should have a lower S number than freeRadius.
That would be true for a Linux/SysV startup.
The rc script for FreeRadius under FreeBSD should contain the following header:
# # PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS nmbd winbindd # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable radiusd: # # radiusd_enable="YES"
There should be something similar for the MySQL startup. Take a note of the entry in the MySQL PROVIDE: line and append that to the radiusd REQUIRE: line.
That should ensure that the MySQL server is started before FreeRadius.
-- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526
-- Future Publishing Limited (registered company number 2008885) and Future Publishing (Overseas) Limited (registered company number 06202940) are wholly owned subsidiaries of Future plc (registered company number 3757874). Future Publishing Limited, Future Publishing (Overseas) Limited and Future plc are all incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW.
This email and any files transmitted with it are confidential. If you have received this email in error please notify the sender and then delete it immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future.
The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email.
Future may regularly and randomly monitor outgoing and incoming emails (including the content of them) and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring.
*****
Save resources: think before you print. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
for example rc.local 2009/3/30 Edwin Isada <eisada@gmail.com>
Does anyone know how to get this started in Debian Linux?
On Mon, Mar 30, 2009 at 10:30 AM, John Hawkes-Reed < John.Hawkes-Reed@futurenet.com> wrote:
On 30/3/09 13:42, "Luciano Afranllie" <listas.luafran@gmail.com> wrote:
On Mon, Mar 30, 2009 at 6:53 AM, Tseveendorj <tseveendorj@gmail.com> wrote:
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
[ ... ]
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Check your /etc/rcx.d where x is your default runlevel. mysql should have a lower S number than freeRadius.
That would be true for a Linux/SysV startup.
The rc script for FreeRadius under FreeBSD should contain the following header:
# # PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS nmbd winbindd # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable radiusd: # # radiusd_enable="YES"
There should be something similar for the MySQL startup. Take a note of the entry in the MySQL PROVIDE: line and append that to the radiusd REQUIRE: line.
That should ensure that the MySQL server is started before FreeRadius.
-- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526
-- Future Publishing Limited (registered company number 2008885) and Future Publishing (Overseas) Limited (registered company number 06202940) are wholly owned subsidiaries of Future plc (registered company number 3757874). Future Publishing Limited, Future Publishing (Overseas) Limited and Future plc are all incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW.
This email and any files transmitted with it are confidential. If you have received this email in error please notify the sender and then delete it immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future.
The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email.
Future may regularly and randomly monitor outgoing and incoming emails (including the content of them) and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring.
*****
Save resources: think before you print. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Sorry I'm new to Linux and FreeRadius. From the looks of it I'm assuming I need to create my own script in the /etc/init.d/ directory. Am I correct? Please help. 2009/3/30 Marinko Tarlac <mangia81@gmail.com>
for example rc.local
2009/3/30 Edwin Isada <eisada@gmail.com>
Does anyone know how to get this started in Debian Linux?
On Mon, Mar 30, 2009 at 10:30 AM, John Hawkes-Reed < John.Hawkes-Reed@futurenet.com> wrote:
On 30/3/09 13:42, "Luciano Afranllie" <listas.luafran@gmail.com> wrote:
On Mon, Mar 30, 2009 at 6:53 AM, Tseveendorj <tseveendorj@gmail.com> wrote:
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
> May be I got the problem why radiusd didn't come up.
[ ... ]
> In my config FreeRADIUS must work with MySQL but from the log freeradius > couldn't connect to mysql server. > I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Check your /etc/rcx.d where x is your default runlevel. mysql should have a lower S number than freeRadius.
That would be true for a Linux/SysV startup.
The rc script for FreeRadius under FreeBSD should contain the following header:
# # PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS nmbd winbindd # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable radiusd: # # radiusd_enable="YES"
There should be something similar for the MySQL startup. Take a note of the entry in the MySQL PROVIDE: line and append that to the radiusd REQUIRE: line.
That should ensure that the MySQL server is started before FreeRadius.
-- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526
-- Future Publishing Limited (registered company number 2008885) and Future Publishing (Overseas) Limited (registered company number 06202940) are wholly owned subsidiaries of Future plc (registered company number 3757874). Future Publishing Limited, Future Publishing (Overseas) Limited and Future plc are all incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW.
This email and any files transmitted with it are confidential. If you have received this email in error please notify the sender and then delete it immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future.
The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email.
Future may regularly and randomly monitor outgoing and incoming emails (including the content of them) and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring.
*****
Save resources: think before you print. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Edwin Isada wrote:
Sorry I'm new to Linux and FreeRadius. From the looks of it I'm assuming I need to create my own script in the /etc/init.d/ directory. Am I correct? Please help.
The path of least resistance is to install the freeradius package provided by your distribution (e.g. debian, suse, fedora, RHEL, CentOS, etc.). The purpose of these distribution specific packages is so all the distribution specific issues are taken care of by the packager for the distribution freeing you from having to learn and apply all the distribution specific issues. The only reason not to install a distribution specific package is if the distribution does not have a current version of freeradius available. Since I presume you built and installed from source you can find example init scripts in the debian, suse, and redhat subdirectories. Just be aware of bit rot as I don't think the files in these distribution specific directories is regularly maintained, but it will certainly get you started if you feel the need to "roll your own" as opposed to using what your distribution provides. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
John Hawkes-Reed wrote:
On 30/3/09 13:42, "Luciano Afranllie" <listas.luafran@gmail.com> wrote:
On Mon, Mar 30, 2009 at 6:53 AM, Tseveendorj <tseveendorj@gmail.com> wrote:
Doug Hardie wrote:
On Mar 29, 2009, at 20:10, Tseveendorj wrote:
May be I got the problem why radiusd didn't come up.
[ ... ]
In my config FreeRADIUS must work with MySQL but from the log freeradius couldn't connect to mysql server. I thought that is problem. isn't it ?
There lies the problem. It would appear that MySQL is not running when FreeRADIUS starts. Check through the messages log to seen what the startup order is. I suspect its backwards.
Check your /etc/rcx.d where x is your default runlevel. mysql should have a lower S number than freeRadius.
That would be true for a Linux/SysV startup.
The rc script for FreeRadius under FreeBSD should contain the following header:
# # PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS nmbd winbindd # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable radiusd: # # radiusd_enable="YES"
There should be something similar for the MySQL startup. Take a note of the entry in the MySQL PROVIDE: line and append that to the radiusd REQUIRE: line.
That should ensure that the MySQL server is started before FreeRadius.
-- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526
Hi John Thank you for trying to help me. It has but I didn't know this is exactly right. Something looks like following inside /usr/local/etc/rc.d/mysql-server # PROVIDE: mysql # REQUIRE: LOGIN # KEYWORD: shutdown inside /usr/local/etc/rc.d/radiusd # PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS mysql # KEYWORD: shutdown In my opinion the MySQL starts after LOGIN process then radiusd is starting when the mysql started. But it doesn't. inside the radiusd.log Mon Mar 30 17:29:15 2009 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked Mon Mar 30 17:29:15 2009 : Info: rlm_sql (sql): Attempting to connect to root@localhost:/billing Mon Mar 30 17:29:15 2009 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0 Mon Mar 30 17:29:15 2009 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server root@localhost:billing Mon Mar 30 17:29:15 2009 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Mon Mar 30 17:29:15 2009 : Error: rlm_sql (sql): Failed to connect DB handle #0 Mon Mar 30 17:29:15 2009 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0 Mon Mar 30 17:29:15 2009 : Error: Failed to load clients from SQL. Mon Mar 30 17:29:15 2009 : Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql" Mon Mar 30 17:29:15 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[149]: Failed to find module "sql". Mon Mar 30 17:29:15 2009 : Error: /usr/local/etc/raddb/sites-enabled/default[62]: Errors parsing authorize section. Mon Mar 30 17:29:15 2009 : Error: Errors initializing modules How to define the accurate config? Sincerely, Tseveen
On 31/3/09 02:46, "Tseveendorj" <tseveendorj@gmail.com> wrote:
John Hawkes-Reed wrote:
[ ... ]
Hi John
Thank you for trying to help me.
It has but I didn't know this is exactly right. Something looks like following
inside /usr/local/etc/rc.d/mysql-server
# PROVIDE: mysql # REQUIRE: LOGIN # KEYWORD: shutdown
inside /usr/local/etc/rc.d/radiusd
# PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS mysql # KEYWORD: shutdown
In my opinion the MySQL starts after LOGIN process then radiusd is starting when the mysql started.
But it doesn't.
Hm. Bother.
From 'man 8 rc':
Certain scripts may want to provide enhanced functionality. The user may access this functionality through additional commands. The script may list and define as many commands at it needs. #!/bin/sh # # PROVIDE: foo # REQUIRE: bar_service_required_to_precede_foo # BEFORE: baz_service_requiring_foo_to_precede_it So I guess try a 'BEFORE: radiusd' in the mysql rc file. After that, I'd be debugging the script start order by hand. [ ... ] -- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526 -- Future Publishing Limited (registered company number 2008885) and Future Publishing (Overseas) Limited (registered company number 06202940) are wholly owned subsidiaries of Future plc (registered company number 3757874). Future Publishing Limited, Future Publishing (Overseas) Limited and Future plc are all incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW. This email and any files transmitted with it are confidential. If you have received this email in error please notify the sender and then delete it immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future. The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email. Future may regularly and randomly monitor outgoing and incoming emails (including the content of them) and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. ***** Save resources: think before you print.
On 31/3/09 02:46, "Tseveendorj" <tseveendorj@gmail.com> wrote:
Hi John
Thank you for trying to help me.
It has but I didn't know this is exactly right. Something looks like following
inside /usr/local/etc/rc.d/mysql-server
# PROVIDE: mysql # REQUIRE: LOGIN # KEYWORD: shutdown
inside /usr/local/etc/rc.d/radiusd
# PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS mysql # KEYWORD: shutdown
In my opinion the MySQL starts after LOGIN process then radiusd is starting when the mysql started.
But it doesn't.
I would wonder if MySQL is fully up and running by the time radius gets to trying to login. If MySQL is being launched before FreeRADIUS when you boot, you might try putting a sleep into the radiusd startup script. If you can watch the console during bootup, that would be an easy way to determine which script is starting first, and perhaps, how much time is passing between launches. -- Scott Lambert KC5MLE Unix SysAdmin lambert@lambertfam.org
Scott Lambert wrote:
On 31/3/09 02:46, "Tseveendorj" <tseveendorj@gmail.com> wrote:
Hi John
Thank you for trying to help me.
It has but I didn't know this is exactly right. Something looks like following
inside /usr/local/etc/rc.d/mysql-server
# PROVIDE: mysql # REQUIRE: LOGIN # KEYWORD: shutdown
inside /usr/local/etc/rc.d/radiusd
# PROVIDE: radiusd # REQUIRE: NETWORKING SERVERS mysql # KEYWORD: shutdown
In my opinion the MySQL starts after LOGIN process then radiusd is starting when the mysql started.
But it doesn't.
I would wonder if MySQL is fully up and running by the time radius gets to trying to login. If MySQL is being launched before FreeRADIUS when you boot, you might try putting a sleep into the radiusd startup script. If you can watch the console during bootup, that would be an easy way to determine which script is starting first, and perhaps, how much time is passing between launches.
Thank you very much.
Tseveen, Add radiusd_enable="YES" to /etc/rc.conf. -r On (03/30/09 09:16), Tseveendorj wrote:
Hello,
I was installed FreeRADIUS 2.1.3 on FreeBSD 6.4 . I want FreeRADIUS comes up when the system is rebooting.
Thank you.
Sincerely, Tseveen
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Ryan Steinmetz Lead Security/Systems Administrator Finance & Administration Systems & Technology Rochester Institute of Technology 585.475.5663 PGP: EF36 D45A 5CA9 28B1 A550 18CD A43C D111 7AD7 FAF2
participants (10)
-
Doug Hardie -
Edwin Isada -
John Dennis -
John Hawkes-Reed -
Luciano Afranllie -
Marinko Tarlac -
Ryan Steinmetz -
Scott Lambert -
Tseveendorj -
Tseveendorj Ochirlantuu