try asterisk -vvvvvvvvvvvvvvc

this will spew up the verbose messaging while booting asterisk in console mode, if it dies right after you can see what module it crapped out on.

Phil


Darryl Moore wrote:
Hey TAUGers,

I've been playing with Asterisk and FreePBX on Ubuntu, and have come
across what looks like a bug. Basically after setting everything up as I
want it, it will all work fine. However if the Asterisk deamon stops for
any reason, it will never restart again. Well it will start, but it will
terminate without any errors almost immediately. I've run it in debug
and verbose mode with no indication as to what the issue is. Here are
the steps to repeat if any one wants to try. I've set up an Ubuntu
server in a vmware environment, and have a snapshot of it immediately
post install so I can try installing all sorts of software on a fresh OS
without having to reinstall the OS all the time. With this setup, I can
repeat this experiment in about 10 minutes.

Steps to repeat.

1) install Ubuntu server from http://releases.ubuntu.com/releases/9.10/
i used http://releases.ubuntu.com/releases/9.10/ubuntu-9.10-server-i386.iso
I also only installed ssh server from their install menues

# I did the above in vmware with a snapshot so i can return to this
point at any time

2) log in or ssh into the machine, become root, and execute the
following commands

# prerequisites and asterisk and freepbx
apt-get update
apt-get -y install mysql-server apache2 php5 php5-mysql asterisk
php5-cli php-pear php-db

# you can change this to your favorite flavour of freepbx. They all have
the same issue
FREEPBX=freepbx-2.6.0RC2
cd /usr/src/
wget http://mirror.freepbx.org/${FREEPBX}.tar.gz
tar -zxvf ${FREEPBX}.tar.gz
cd ${FREEPBX}

# password for database, change to whatever you picked when you
installed mysql
RPASS=pass

# create databases for asterisk
mysql_install_db
mysqladmin --password=$RPASS create asteriskcdrdb
mysqladmin --password=$RPASS create asterisk
mysql --password=$RPASS asterisk < ./SQL/newinstall.sql
mysql --password=$RPASS asteriskcdrdb < ./SQL/cdr_mysql_table.sql
echo "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asterisku...@localhost
IDENTIFIED BY 'amp109';" | mysql --password=$RPASS
echo "GRANT ALL PRIVILEGES ON asterisk.* TO asterisku...@localhost
IDENTIFIED BY 'amp109';" | mysql --password=$RPASS

# changes to apache to allow for bigger files
sed 's/upload_max_filesize.*/upload_max_filesize = 20M/g'
/etc/php5/cli/php.ini > temp ; mv -v temp /etc/php5/cli/php.ini
sed 's/upload_max_filesize.*/upload_max_filesize = 20M/g'
/etc/php5/apache2/php.ini > temp ; mv -v temp /etc/php5/apache2/php.ini

chown asterisk:asterisk /var/lib/php5 -R
chown asterisk:asterisk /var/www -R
sed 's/export APACHE_RUN_USER=www-data/export
APACHE_RUN_USER=asterisk/g' /etc/apache2/envvars > temp ; mv temp
/etc/apache2/envvars
sed 's/export APACHE_RUN_GROUP=www-data/export
APACHE_RUN_GROUP=asterisk/g' /etc/apache2/envvars > temp ; mv temp
/etc/apache2/envvars

# check asterisk is still running
ps -A | grep asterisk

# restart apache and asterisk and check again
/etc/init.d/apache2 restart
/etc/init.d/asterisk restart; sleep 1; ps -A | grep asterisk

#everything should still be running up to this point

#now install freepbx
./install_amp

# check asterisk is still running
ps -A | grep asterisk

# so far should be so good, and it will all work well too

# restart apache and asterisk and check again
/etc/init.d/apache2 restart
/etc/init.d/asterisk restart; sleep 1; ps -A | grep asterisk

# Bzzzz, asterisk did not stay up, and checking logs will show no errors.

#-----------------------------------------------------

As I said Asterisk and FreePBX will work fine after FreePBX is
installed, but don't ever let your machine reboot, or you will never get
asterisk back.


Anyone have any ideas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to