FreeRadius can’t start after reboot [mysql, etc]

Today UPT-Puskom Polinela got problem. We are using Freeradius as AAA Server. After we got some problem in electricity our freeradius service cannot start. This is the log problem :

Wed Sep  3 13:39:05 2014 : Info: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
Wed Sep  3 13:39:05 2014 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0
Wed Sep  3 13:39:05 2014 : Error: rlm_sql_mysql: Couldn’t connect socket to MySQL server radius@localhost:radius
Wed Sep  3 13:39:05 2014 : Error: rlm_sql_mysql: Mysql error ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’
Wed Sep  3 13:39:05 2014 : Error: rlm_sql (sql): Failed to connect DB handle #0
Wed Sep  3 13:39:05 2014 : Error: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0
Wed Sep  3 13:39:05 2014 : Error: Failed to load clients from SQL.
Wed Sep  3 13:39:05 2014 : Info: rlm_sql (sql): Closing sqlsocket 4
Wed Sep  3 13:39:05 2014 : Info: rlm_sql (sql): Closing sqlsocket 3
Wed Sep  3 13:39:05 2014 : Info: rlm_sql (sql): Closing sqlsocket 2
Wed Sep  3 13:39:05 2014 : Info: rlm_sql (sql): Closing sqlsocket 1
Wed Sep  3 13:39:05 2014 : Info: rlm_sql (sql): Closing sqlsocket 0
Wed Sep  3 13:39:05 2014 : Error: /etc/freeradius/sql.conf[22]: Instantiation failed for module “sql”
Wed Sep  3 13:39:05 2014 : Error: /etc/freeradius/sites-enabled/default[177]: Failed to load module “sql”.
Wed Sep  3 13:39:05 2014 : Error: /etc/freeradius/sites-enabled/default[69]: Errors parsing authorize section.

After we find solution in some page, we got the refrence how to fix it : http://ubuntuforums.org/archive/index.php/t-2060807.html

There is step by step how they can fix the problem:

freeradius
free radius

1. Deactivate freeradius loaded in /etc/rcN.d with command: update-rc.d freeradius disable
2. rename script ejecution in /etc/init.d/ with name is freeradius with name freeradiusbck for example with command: mv freeradius freeradiusbck
3. move to /etc/init/ and create script with name freeradius.conf with content

# freeradius – server
description “Customized Radius server RC.D”
author “Septafiansyah Dwi P<septa@polinela.ac.id>”
start on filesystem or runlevel [2345]
stop on runlevel [!2345]

respawn
exec /etc/init.d/freeradiusbck start

4. Create symbolic link in /etc/init.d/ to script created in step 3, (located in /etc/init.d/ write command ln -s /lib/init/upstart-job freeradius)   ###remember in the /etc./init.d/ directory###
5. restart your server with init 1

6. Problem solved, cek with tail -f /var/log/freeradius/radius.log

Untitled2
freeradius

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s