[Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

[Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby q_p » 09 Dec 2012, 06:50

Selesai install yFi CaptivePortal di Ubuntu 12.04 menggunakan freeradius 2.2.0, mesin saya reboot. Berikut adalah isi file radius.log
Tampilkan
1. Selesai install lalu saya reboot u/ pertama-kalinya. Everything is OK.

Code: Select all

: rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
: rlm_sql_mysql: Starting connect to MySQL server for #2
: rlm_sql (sql): Connected new DB handle, #2
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
: rlm_sql_mysql: Starting connect to MySQL server for #3
: rlm_sql (sql): Connected new DB handle, #3
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
: rlm_sql_mysql: Starting connect to MySQL server for #4
: rlm_sql (sql): Connected new DB handle, #4
: Loaded virtual server <default>
: Ready to process requests.
2. Mesin saya matikan maupun saya reboot lagi, radiusd tidak jalan. Ini log-nya

Code: Select all

: Signalled to terminate
: Exiting normally.
: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
: rlm_sql (sql): Attempting to connect to yfi@localhost:/yfi
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
: rlm_sql_mysql: Starting connect to MySQL server for #0
: Error: rlm_sql_mysql: Couldn't connect socket to MySQL server yfi@localhost:yfi
: Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/run/mysqld.sock' (2)'
: Error: rlm_sql (sql): Failed to connect DB handle #0
: Error: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0
: Error: Failed to load clients from SQL.
: rlm_sql (sql): Closing sqlsocket 4
: rlm_sql (sql): Closing sqlsocket 3
: rlm_sql (sql): Closing sqlsocket 2
: rlm_sql (sql): Closing sqlsocket 1
: rlm_sql (sql): Closing sqlsocket 0
: Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql"
: Error: /usr/local/etc/raddb/sites-enabled/default[370]: Failed to find "sql" in the "modules" section.
: Error: /usr/local/etc/raddb/sites-enabled/default[342]: Errors parsing accounting section.
: Error: Failed to load virtual server <default>
3. Saya executed '/etc/init.d/radiusd start' radiusd berjalan normal

Code: Select all

: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
: rlm_sql (sql): Attempting to connect to yfi@localhost:/yfi
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
: rlm_sql_mysql: Starting connect to MySQL server for #0
: rlm_sql (sql): Connected new DB handle, #0
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
: rlm_sql_mysql: Starting connect to MySQL server for #1
: rlm_sql (sql): Connected new DB handle, #1
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
: rlm_sql_mysql: Starting connect to MySQL server for #2
: rlm_sql (sql): Connected new DB handle, #2
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
: rlm_sql_mysql: Starting connect to MySQL server for #3
: rlm_sql (sql): Connected new DB handle, #3
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
: rlm_sql_mysql: Starting connect to MySQL server for #4
: rlm_sql (sql): Connected new DB handle, #4
: Loaded virtual server <default>
: Ready to process requests.
: rlm_radutmp: NAS localhost restarted (Accounting-On packet seen)
Karena tidak bisa ikut start-up, saya masukkan '/etc/init.d/radiusd restart' di file rc.local baru bisa berjalan normal setelah mesin shutdown/reboot. Dengan konfigurasi yang sama di Ubuntu 10.04 + freeradius 2.1.8 tidak ada masalah seperti ini. Kenapa ya bisa terjadi "error" seperti pada nomer 2 dalam spoiler di atas ?
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby yudiarbi » 09 Dec 2012, 20:43

ada beberapa kemungkinan bro, kl menurutq
1. cek port mysql
2. cek kapasitas partisi mysql, udah penuh ato gak
4. cek konfigurasi
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby q_p » 09 Dec 2012, 20:53

Maslahnya tidak bisa start-up pakai init script, tapi radiusd bisa berjalan normal kalau '/etc/init.d/radiusd' dijalankan secara manual atau dimasukkan ke rc.local. YFI dan Ubuntu 12.04 kondisinya fresh-install menggunalan database lama. Bedanya dengan server lama (Ubuntu 10.04 + freeradius 2.1.8), sedangkan yang sekarang (Ubuntu 12.04) pakai freeradius 2.2. Semua konfigurasi sama. TQ Cak atas attensinya.
User avatar
sr_aja
Posts: 597
Joined: 10 Dec 2012, 11:21
Location: Jakarta

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby sr_aja » 10 Dec 2012, 11:29

PragolaPati wrote:Selesai install yFi CaptivePortal di Ubuntu 12.04 menggunakan freeradius 2.2.0, mesin saya reboot. Berikut adalah isi file radius.log
Tampilkan
1. Selesai install lalu saya reboot u/ pertama-kalinya. Everything is OK.

Code: Select all

: rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
: rlm_sql_mysql: Starting connect to MySQL server for #2
: rlm_sql (sql): Connected new DB handle, #2
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
: rlm_sql_mysql: Starting connect to MySQL server for #3
: rlm_sql (sql): Connected new DB handle, #3
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
: rlm_sql_mysql: Starting connect to MySQL server for #4
: rlm_sql (sql): Connected new DB handle, #4
: Loaded virtual server <default>
: Ready to process requests.
2. Mesin saya matikan maupun saya reboot lagi, radiusd tidak jalan. Ini log-nya

Code: Select all

: Signalled to terminate
: Exiting normally.
: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
: rlm_sql (sql): Attempting to connect to yfi@localhost:/yfi
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
: rlm_sql_mysql: Starting connect to MySQL server for #0
: Error: rlm_sql_mysql: Couldn't connect socket to MySQL server yfi@localhost:yfi
: Error: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/run/mysqld.sock' (2)'
: Error: rlm_sql (sql): Failed to connect DB handle #0
: Error: rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0
: Error: Failed to load clients from SQL.
: rlm_sql (sql): Closing sqlsocket 4
: rlm_sql (sql): Closing sqlsocket 3
: rlm_sql (sql): Closing sqlsocket 2
: rlm_sql (sql): Closing sqlsocket 1
: rlm_sql (sql): Closing sqlsocket 0
: Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql"
: Error: /usr/local/etc/raddb/sites-enabled/default[370]: Failed to find "sql" in the "modules" section.
: Error: /usr/local/etc/raddb/sites-enabled/default[342]: Errors parsing accounting section.
: Error: Failed to load virtual server <default>
3. Saya executed '/etc/init.d/radiusd start' radiusd berjalan normal

Code: Select all

: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
: rlm_sql (sql): Attempting to connect to yfi@localhost:/yfi
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
: rlm_sql_mysql: Starting connect to MySQL server for #0
: rlm_sql (sql): Connected new DB handle, #0
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
: rlm_sql_mysql: Starting connect to MySQL server for #1
: rlm_sql (sql): Connected new DB handle, #1
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
: rlm_sql_mysql: Starting connect to MySQL server for #2
: rlm_sql (sql): Connected new DB handle, #2
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
: rlm_sql_mysql: Starting connect to MySQL server for #3
: rlm_sql (sql): Connected new DB handle, #3
: rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
: rlm_sql_mysql: Starting connect to MySQL server for #4
: rlm_sql (sql): Connected new DB handle, #4
: Loaded virtual server <default>
: Ready to process requests.
: rlm_radutmp: NAS localhost restarted (Accounting-On packet seen)
Karena tidak bisa ikut start-up, saya masukkan '/etc/init.d/radiusd restart' di file rc.local baru bisa berjalan normal setelah mesin shutdown/reboot. Dengan konfigurasi yang sama di Ubuntu 10.04 + freeradius 2.1.8 tidak ada masalah seperti ini. Kenapa ya bisa terjadi "error" seperti pada nomer 2 dalam spoiler di atas ?


bukan nya kalau pada saat mesin boot semua file yg ada di /etc/init.d/* akan otomatis di run??

tapi ngak tau juga seh.,,.. :D
bisa di postingkah file /etc/init.d/radiusd nya??

kalau mau simple seh coba pakai "rcconf"

semoga membantu ;)
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby q_p » 10 Dec 2012, 22:44

Ini Bapak, isi file_init radiusd
Tampilkan

Code: Select all

#!/bin/sh
#
# radiusd   Start the radius daemon.
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
#    Copyright (C) 2001-2008 The FreeRADIUS Project http://www.freeradius.org

prefix=/usr/local
exec_prefix=${prefix}
sbindir=${exec_prefix}/sbin
localstatedir=${prefix}/var
logdir=${localstatedir}/log/radius
rundir=${localstatedir}/run/radiusd
sysconfdir=${prefix}/etc

#
#  If you have issues with OpenSSL, uncomment these next lines.
#
#  Something similar may work for MySQL, and you may also
#  have to LD_PRELOAD libz.so
#
#LD_LIBRARY_PATH= -lcrypto -lssl -lcrypto
#LD_RUN_PATH= -lcrypto -lssl -lcrypto:
#LD_PRELOAD= -lcrypto -lssl -lcryptolibcrypto.so
export LD_LIBRARY_PATH LD_RUN_PATH LD_PRELOAD

RADIUSD=$sbindir/radiusd
RADDBDIR=${sysconfdir}/raddb
DESC="FreeRADIUS"

#
#  See 'man radiusd' for details on command-line options.
#
ARGS=""

test -f $RADIUSD || exit 0
test -f $RADDBDIR/radiusd.conf || exit 0

#if [ ! -d $rundir ] ; then
#    mkdir $rundir
#    chown radmin:radius $rundir
#    chmod 775 $rundir
#fi
#
#if [ ! -d $logdir ] ; then
#    mkdir $logdir
#    chown radmin:radius $logdir
#    chmod 770 $logdir
#    chmod g+s $logdir
#fi
#
#if [ ! -f $logdir/radius.log ]; then
#        touch $logdir/radius.log
#fi
#
#chown radmin:radius $logdir/radius.log
#chmod 660 $logdir/radius.log

case "$1" in
  start)
   echo -n "Starting $DESC:"
   $RADIUSD $ARGS
   echo "radiusd"
   ;;
  stop)
   [ -z "$2" ] && echo -n "Stopping $DESC: "
        [ -f $rundir/radiusd.pid ] && kill -TERM `cat $rundir/radiusd.pid`
   [ -z "$2" ] && echo "radiusd."
   ;;
  reload|force-reload)
   echo "Reloading $DESC configuration files."
   [ -f $rundir/radiusd.pid ] && kill -HUP `cat $rundir/radiusd.pid`
   ;;
  restart)
   sh $0 stop quiet
   sleep 3
   sh $0 start
   ;;
  check)
   $RADIUSD -CX $ARGS
   exit $?
   ;;
  *)
        echo "Usage: /etc/init.d/$RADIUS {start|stop|reload|restart|check}"
        exit 1
esac

exit 0
Kasus ini tidak terjadi pada ubuntu server 10.04 lts. TQ :)
User avatar
sr_aja
Posts: 597
Joined: 10 Dec 2012, 11:21
Location: Jakarta

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby sr_aja » 11 Dec 2012, 08:43

PragolaPati wrote:Ini Bapak, isi file_init radiusd
Tampilkan

Code: Select all

#!/bin/sh
#
# radiusd   Start the radius daemon.
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
#    Copyright (C) 2001-2008 The FreeRADIUS Project http://www.freeradius.org

prefix=/usr/local
exec_prefix=${prefix}
sbindir=${exec_prefix}/sbin
localstatedir=${prefix}/var
logdir=${localstatedir}/log/radius
rundir=${localstatedir}/run/radiusd
sysconfdir=${prefix}/etc

#
#  If you have issues with OpenSSL, uncomment these next lines.
#
#  Something similar may work for MySQL, and you may also
#  have to LD_PRELOAD libz.so
#
#LD_LIBRARY_PATH= -lcrypto -lssl -lcrypto
#LD_RUN_PATH= -lcrypto -lssl -lcrypto:
#LD_PRELOAD= -lcrypto -lssl -lcryptolibcrypto.so
export LD_LIBRARY_PATH LD_RUN_PATH LD_PRELOAD

RADIUSD=$sbindir/radiusd
RADDBDIR=${sysconfdir}/raddb
DESC="FreeRADIUS"

#
#  See 'man radiusd' for details on command-line options.
#
ARGS=""

test -f $RADIUSD || exit 0
test -f $RADDBDIR/radiusd.conf || exit 0

#if [ ! -d $rundir ] ; then
#    mkdir $rundir
#    chown radmin:radius $rundir
#    chmod 775 $rundir
#fi
#
#if [ ! -d $logdir ] ; then
#    mkdir $logdir
#    chown radmin:radius $logdir
#    chmod 770 $logdir
#    chmod g+s $logdir
#fi
#
#if [ ! -f $logdir/radius.log ]; then
#        touch $logdir/radius.log
#fi
#
#chown radmin:radius $logdir/radius.log
#chmod 660 $logdir/radius.log

case "$1" in
  start)
   echo -n "Starting $DESC:"
   $RADIUSD $ARGS
   echo "radiusd"
   ;;
  stop)
   [ -z "$2" ] && echo -n "Stopping $DESC: "
        [ -f $rundir/radiusd.pid ] && kill -TERM `cat $rundir/radiusd.pid`
   [ -z "$2" ] && echo "radiusd."
   ;;
  reload|force-reload)
   echo "Reloading $DESC configuration files."
   [ -f $rundir/radiusd.pid ] && kill -HUP `cat $rundir/radiusd.pid`
   ;;
  restart)
   sh $0 stop quiet
   sleep 3
   sh $0 start
   ;;
  check)
   $RADIUSD -CX $ARGS
   exit $?
   ;;
  *)
        echo "Usage: /etc/init.d/$RADIUS {start|stop|reload|restart|check}"
        exit 1
esac

exit 0
Kasus ini tidak terjadi pada ubuntu server 10.04 lts. TQ :)


harusnya sih udah bener..
coba buat file nya di rc.x lain nya..

btw; daftar aplikasi yg ada di /etc/rc.local
hanya itu aja?? atau ada yg lain?

kalau hanya itu saja, gw curiga yg masalah justru rc.local nya..
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby q_p » 11 Dec 2012, 14:50

Yang saya taruh di rc.local hanya init_script-nya radiusd itu mas. Untuk rc.dX yang lainnya sudah saya lakukan dengan :

Code: Select all

#update-rc.d radiusd start 80 2 3 4 5 . stop 20 0 1 6 .
####maupun dengan####
#update-rc.d radiusd default
###dua2-nya tdk ngefek### :confused:
User avatar
sr_aja
Posts: 597
Joined: 10 Dec 2012, 11:21
Location: Jakarta

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby sr_aja » 13 Dec 2012, 08:40

PragolaPati wrote:Yang saya taruh di rc.local hanya init_script-nya radiusd itu mas. Untuk rc.dX yang lainnya sudah saya lakukan dengan :

Code: Select all

#update-rc.d radiusd start 80 2 3 4 5 . stop 20 0 1 6 .
####maupun dengan####
#update-rc.d radiusd default
###dua2-nya tdk ngefek### :confused:


kalau liat di log pada saat booting apakah tidak ada yg aneh??

btw kalau di jalankan manual, mau ngak?
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby q_p » 13 Dec 2012, 17:07

kalau liat di log pada saat booting apakah tidak ada yg aneh??
Tidak ada yang aneh mas.
btw kalau di jalankan manual, mau ngak?
Bisa mas.
TQ.
User avatar
sr_aja
Posts: 597
Joined: 10 Dec 2012, 11:21
Location: Jakarta

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby sr_aja » 17 Dec 2012, 11:24

@pragola
kayaknya, ini kayak nya loh..
mungkin ini disebabkan karena service mysql, belum di load/aktif saat radius nya di aktifkan :D << tapi ini kayaknya loh, mohon maaf apabila ndak sesuai dengan kenyataan :D
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby q_p » 17 Dec 2012, 15:03

Curiganya memang begitu, urutan start-up antara service-nya mySQL sama freeRadius. Herannya kalau di Ubuntu 10.04 jalan lancar. Beda di versi mySQL mungkin yang jadi penyebabnya.
BTW, terimakasih mas sr_aje :)
User avatar
sr_aja
Posts: 597
Joined: 10 Dec 2012, 11:21
Location: Jakarta

Re: [Ask]StarUp Failed freeradius 2.2.0 @ Ubuntu 12.04

Postby sr_aja » 19 Dec 2012, 09:05

bisa jadi sih...
kalau senggang coba ngoprek mengenai init.d deh..
atau bisa utak2 atik file init.d nya si radius, biar melakukan pengecekan ke mysql, jadi kalau mysql nya ndak jalan, suruh si radiusnya ngejalanin..

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 5 guests