All installation and configuration problems and questions
Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
by ytcracker » Wed May 02, 2007 11:24 am
hey all!
last night i had a power outage and the ups on my server malfunctioned, and today i was having a problem with people logging into the dialer and immediately being kicked out to the "no one is in your session" blue screen. this issue was persistent through reboots and running AST_reset_mysql_vars.pl.
i drilled down and found that the live_channels and live_sip_channels tables were corrupted, so i fixed this issue by repairing them in mysql.
just putting this out there if anyone ever has a similar problem so you have a point of entry where to look.
thanks again matt for a great open source solution!
-
ytcracker
-
- Posts: 7
- Joined: Thu Nov 02, 2006 7:49 pm
by aster1 » Wed May 02, 2007 12:54 pm
Exactly same porblem happened with me . This tables were corrupted for my setup too after power outage since then i have a backup power supply installed . Btw to completely prevent it i run a script at startup that first repairs all tabels, then optimizes all tables and then run AST_reset_mysql_vars.pl once . It takes a extra minute to reboot but still fixes most random problems everytime at reboot so if i am not around other guys can simply restart dialer and most problems are fixed
.
-
aster1
-
- Posts: 281
- Joined: Sun Dec 24, 2006 6:48 am
- Location: India
by asterisk_at_my_risk » Thu May 03, 2007 6:06 am
can you post the contents of that script for table repair and optimization and by table optimization what exactly u mean
Thanks
-
asterisk_at_my_risk
-
- Posts: 102
- Joined: Mon Sep 04, 2006 10:50 am
- Location: New Delhi
by ytcracker » Thu May 03, 2007 11:49 am
nano /usr/share/astguiclient/mysql_tables.sh
paste this:
- Code: Select all
#!/bin/sh
# this shell script finds all the tables for a database and run a command against it
# @usage "mysql_tables.sh --optimize MyDatabaseABC"
# @date 6/14/2006
# @version 1.1 - 1/28/2007 - add repair
# @version 1.0 - 6/14/2006 - first release
# @author Son Nguyen
DBNAME=$2
printUsage() {
echo "Usage: $0"
echo " --optimize <dbname>"
echo " --repair <dbname>"
return
}
doAllTables() {
# get the table names
TABLENAMES=`mysql -D $DBNAME -e "SHOW TABLES\G;"|grep 'Tables_in_'|sed -n 's/.*Tables_in_.*: \([_0-9A-Za-z]*\).*/\1/p'`
# loop through the tables and optimize them
for TABLENAME in $TABLENAMES
do
mysql -D $DBNAME -e "$DBCMD TABLE $TABLENAME;"
done
}
if [ $# -eq 0 ] ; then
printUsage
exit 1
fi
case $1 in
--optimize) DBCMD=OPTIMIZE; doAllTables;;
--repair) DBCMD=REPAIR; doAllTables;;
--help) printUsage; exit 1;;
*) printUsage; exit 1;;
esac
make sure its rwxrxrx
in your startup script put
/usr/share/astguiclient/mysql_tables.sh --repair asterisk
/usr/share/astguiclient/mysql_tables.sh --optimize asterisk
-
ytcracker
-
- Posts: 7
- Joined: Thu Nov 02, 2006 7:49 pm
by Op3r » Thu May 03, 2007 2:57 pm
can you please add this to the WIKI and the Tracker?
Get paid for US outbound Toll Free calls. PM me.
-
Op3r
-
- Posts: 1432
- Joined: Wed Jun 07, 2006 7:53 pm
- Location: Manila
-
by ytcracker » Thu May 03, 2007 5:40 pm
forgive me for my ignorance, but how should i list this on the wiki? i have submitted it on the tracker.
-
ytcracker
-
- Posts: 7
- Joined: Thu Nov 02, 2006 7:49 pm
Return to Support
Who is online
Users browsing this forum: No registered users and 123 guests