asterisk -rx "restart now"

Support forum for the ViciBox ISO Server Install and ISO LiveCD Demo

Moderators: enjay, williamconley, Staydog, mflorell, MJCoate, mcargile, Kumba

asterisk -rx "restart now"

Postby bmorrison » Sun Jun 20, 2010 4:35 pm

Asterisk flipped out (using 200% of CPU when idle) and I wanted to restart it. However, asterisk -rx "restart now" did nothing. Neither did "stop now".

I simply rebooted the box and everything went back to normal, but I've been searching the forums here since for the proper way to restart asterisk on a vicibox install without a full shutdown -r. I have been unable to find a post.

I tried "service vicidial restart" but I just managed to break everything.

I was going to install monit on this box to automatically restart asterisk if it flipped out again, but if -rx restart now isn't an option I'm not sure how to get a watchdog on the process.
bmorrison
 
Posts: 94
Joined: Wed Jul 09, 2008 11:26 pm
Location: United States

Postby Acidshock » Sun Jun 20, 2010 7:35 pm

Not sure if this is your problem but try running:
/etc/init.d/vicidial restart
Acidshock
 
Posts: 429
Joined: Wed Mar 03, 2010 3:19 pm

Postby bmorrison » Sun Jun 20, 2010 7:58 pm

Thanks for the reply.

I did try that, however it just broke all kinds of stuff. One of the screens died (I think) and I had to reboot the box.
bmorrison
 
Posts: 94
Joined: Wed Jul 09, 2008 11:26 pm
Location: United States

Postby x-rateddissiden » Sun Sep 26, 2010 3:59 pm

I have the same problem. Any other solution?
x-rateddissiden
 
Posts: 2
Joined: Sun Sep 26, 2010 3:55 pm

Postby Kumba » Fri Oct 01, 2010 12:25 am

If asterisk deadlocks, I.E. stops responding to anything, you have to do a manual stop. Here's how you do it:

1) Type ps ax | grep asterisk | grep -v grep
2) The first number in the output is the PID process. The one we are interested in here is the line that has /usr/sbin/asterisk on it. Type kill -9 <pid-number>
3) Type 'screen -ls'.You are interested in the number preceeding the period on two lines. One line contains the word 'astshell', the second line contains the work 'asterisk'.
4) Type kill -9 <pid-of-astshell> <pid-of-asterisk>
5) Type 'screen -wipe'
6) Type '/etc/init.d/vicidial stop'
7) Type '/etc/init.d/vicidial start'

And you have just fixed a crashed asterisk process without restarting the server. And now you also know why we tell people to just reboot the server most of the time. If you are running a newer version of vicibox (v.3.0+), you can omit steps 3, 4 and 5. The init script in these versions will automatically kill the screen processes when stop is issued.
Kumba
 
Posts: 939
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 333 guests