1
Mon Jul 28 14:30:29 2014 : Error: Failed to load virtual server inner-tunnel
Mon Jul 28 14:30:29 2014 : Error: /etc/freeradius/sites-enabled/inner-tunnel[47]: Errors parsing authorize section.
Mon Jul 28 14:30:29 2014 : Error: /etc/freeradius/sites-enabled/inner-tunnel[131]: Failed to load module "sql".
Mon Jul 28 14:30:29 2014 : Error: /etc/freeradius/sql.conf[22]: Instantiation failed for module "sql"
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Closing sqlsocket 0
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Closing sqlsocket 1
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Closing sqlsocket 2
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Closing sqlsocket 3
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Closing sqlsocket 4
Mon Jul 28 14:30:29 2014 : Error: Failed to load clients from SQL.
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0
Mon Jul 28 14:30:29 2014 : Error: rlm_sql (sql): Failed to connect DB handle #0
Mon Jul 28 14:30:29 2014 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Mon Jul 28 14:30:29 2014 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server radius@localhost:radius
Mon Jul 28 14:30:29 2014 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Attempting to connect to radius@localhost:/radius
Mon Jul 28 14:30:29 2014 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Mon Jul 28 14:30:28 2014 : Error: Failed to load virtual server inner-tunnel
Mon Jul 28 14:30:28 2014 : Error: /etc/freeradius/sites-enabled/inner-tunnel[47]: Errors parsing authorize section.
Mon Jul 28 14:30:28 2014 : Error: /etc/freeradius/sites-enabled/inner-tunnel[131]: Failed to load module "sql".
Mon Jul 28 14:30:28 2014 : Error: /etc/freeradius/sql.conf[22]: Instantiation failed for module "sql"
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Closing sqlsocket 0
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Closing sqlsocket 1
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Closing sqlsocket 2
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Closing sqlsocket 3
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Closing sqlsocket 4
Mon Jul 28 14:30:28 2014 : Error: Failed to load clients from SQL.
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0
Mon Jul 28 14:30:28 2014 : Error: rlm_sql (sql): Failed to connect DB handle #0
Mon Jul 28 14:30:28 2014 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Mon Jul 28 14:30:28 2014 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server radius@localhost:radius
Mon Jul 28 14:30:28 2014 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Attempting to connect to radius@localhost:/radius
Mon Jul 28 14:30:28 2014 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked

this is the daloradius log, and someone told me , it is sql services haven't started, what is why i would like to delay the start daloradius service. belowing is my method to let daloradius service start after 200 seconds.

i would like to let the script sleep 200 seconds only start the daloradius. this is the command i had tried, but seem like not working.

start on login-session-start
script
sleep 200000
exec > freeradius -X
end script

OR

start on login-session-start
script
sleep 200000
freeradius -X
end script

and the script i save it as etc/init/VPN.conf

4
  • what is going on? what wrong with my post? i have posted to stack exchange , they down vote my post, and tell me to post at server fault. now i m post at here. you guy down vote my post again.
    – Ng chin ye
    Jul 28, 2014 at 6:40
  • You should use a more meaningful title and tag your question more precisely Jul 28, 2014 at 7:59
  • @Ngchinye Some people simply like to silently downvote posts. The only thing what you can do is to fix that with an upvote if you see, and this is also what I did.
    – peterh
    Jul 28, 2014 at 9:10
  • init scripts usually allow you to define dependencies, which services must already be running before it gets started itself. Sadly there are different competing init systems which vary from version to version in Ubuntu, so I cant't give you a definitive answer without seeing the Ubuntu version and the init script itself. But if you add mysqld as a dependency in your init script you should be fine. Jul 28, 2014 at 9:32

2 Answers 2

1

Here is your problem:

Mon Jul 28 14:30:29 2014 : Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

This (2) means No such file or directory, i.e. the socket is not present.

Did you actually install the MySQL server?

sudo apt-get install mysql-server

Did you start the server?

sudo service mysql restart
0

Why not put (/bin/sleep 200 && /path/to/freeradius -X) in /etc/rc.local ?

http://wiki.ubuntuusers.de/rc.local

P.s: sleep-function uses seconds.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .