View previous topic :: View next topic |
Author |
Message |
ssmeenk at freshdot.net Guest
|
Posted: Wed May 28, 2014 4:52 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
Hi,
I want to do a scripted 'restart when convenient' on a daily basis. This
used to work, but since i've upgraded to Asterisk 11.7 it seems it's
never convenient to restart the server.
My question: how can i tell *why* it's not convenient to restart the
server?
It used to be some colleague left the receiver OffHook or something like
that, but even when i'm fairly certain there's no activity on my pbx,
all receivers are OnHook, Asterisk won't restart.
How can i debug why Asterisk thinks it isn't convenient to restart?
Thanks!
-Sander.
--
| Hey.. I'm done talkin'. Now check out my pretty!
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jw at uvacity.com Guest
|
Posted: Wed May 28, 2014 4:56 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
I didn't know that feature existed.
I'm doing a scripted restart by using the asterisk command line to tell me how many active calls are current. If 0 then restart.
J On 28 May 2014 10:52, "Sander Smeenk" <ssmeenk@freshdot.net (ssmeenk@freshdot.net)> wrote: Quote: | Hi,
I want to do a scripted 'restart when convenient' on a daily basis. This
used to work, but since i've upgraded to Asterisk 11.7 it seems it's
never convenient to restart the server.
My question: how can i tell *why* it's not convenient to restart the
server?
It used to be some colleague left the receiver OffHook or something like
that, but even when i'm fairly certain there's no activity on my pbx,
all receivers are OnHook, Asterisk won't restart.
How can i debug why Asterisk thinks it isn't convenient to restart?
Thanks!
-Sander.
--
| Hey.. I'm done talkin'. Now check out my pretty!
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
|
|
Back to top |
|
|
ssmeenk at freshdot.net Guest
|
Posted: Wed May 28, 2014 5:02 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
Quoting jonathan white (jw@uvacity.com):
Quote: | I'm doing a scripted restart by using the asterisk command line to tell me
how many active calls are current. If 0 then restart.
|
For this you use 'core show calls'? If 0, do you 'core restart now' or
do you kill and restart Asterisk in any other way?
--
| If you're going to be weird, be confident about it.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
darcy at Vex.Net Guest
|
Posted: Wed May 28, 2014 5:14 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
On Wed, 28 May 2014 12:01:44 +0200
Sander Smeenk <ssmeenk@freshdot.net> wrote:
Quote: | Quoting jonathan white (jw@uvacity.com):
Quote: | I'm doing a scripted restart by using the asterisk command line to
tell me how many active calls are current. If 0 then restart.
|
For this you use 'core show calls'? If 0, do you 'core restart now'
or do you kill and restart Asterisk in any other way?
|
I run 11.7 and use this: asterisk -x 'core stop gracefully'
That waits until all phones are on hook before stopping. No need to
run tests that would be subject to race conditions.
However, I don't believe that any of this answers the OP's question.
He says that he is running "restart when convenient" but I don't
believe there is any such command and he probably means what I said
above. perhaps he can clarify but I think that his question is, "Why
does it think that there are calls in progress when there are not."
OP - can you clarify what actual command you are running?
--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
ssmeenk at freshdot.net Guest
|
Posted: Wed May 28, 2014 5:19 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
Quoting D'Arcy J.M. Cain (darcy@Vex.Net):
Quote: | OP - can you clarify what actual command you are running?
|
pbx1*CLI> core [?]
abort clear ping reload
restart set show
stop waitfullybooted
pbx1*CLI> core restart [?]
gracefully now when
pbx1*CLI> core restart when [?]
pbx1*CLI> core restart when convenient
I use 'core restart when convenient'.
This is Asterisk 11.7.0~dfsg-1ubuntu1.
--
| Zebras are colored with light stripes on a dark background.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
darcy at Vex.Net Guest
|
Posted: Wed May 28, 2014 5:32 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
On Wed, 28 May 2014 12:19:10 +0200
Sander Smeenk <ssmeenk@freshdot.net> wrote:
Quote: | Quoting D'Arcy J.M. Cain (darcy@Vex.Net):
Quote: | OP - can you clarify what actual command you are running?
|
I use 'core restart when convenient'.
|
Right. You said "restart when convenient" in your original email. I
tested the above and "when convenient" is similar to "gracefully." The
difference is that the latter stops new calls from coming in. The
former allows new calls to start while waiting for old calls to finish.
What does "core show channels" show while waiting for it to restart?
--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
ssmeenk at freshdot.net Guest
|
Posted: Wed May 28, 2014 10:38 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
Quoting D'Arcy J.M. Cain (darcy@Vex.Net):
Quote: | Quote: | Quote: | OP - can you clarify what actual command you are running?
| I use 'core restart when convenient'.
| Right. You said "restart when convenient" in your original email.
|
Sorry for the confusion.
But the problem is not what command i am using, the problem is Asterisk
not restarting and it's obscure to me why it is not restarting.
pbx1*CLI> core show channels
Channel Location State Application(Data)
0 active channels
0 active calls
1925 calls processed
pbx1*CLI> sccp show devices
[ no devices show 'Act'ivty ]
pbx1*CLI> sip show sessions
[ no active SIP sessions ]
Yet,
pbx1*CLI> core restart when convenient
Waiting for inactivity to perform restart
Ignoring asterisk restart request, already in progress.
After doing 'core restart now' and hitting Enter really hard Asterisk
did restart.
Some how Asterisk thinks it is not convenient. I want to find out why.
-Sndr.
--
| Searching for lost relatives? Win the Lottery!
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
kevin.larsen at pionee... Guest
|
Posted: Wed May 28, 2014 10:48 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
asterisk-users-bounces@lists.digium.com wrote on 05/28/2014 10:37:25 AM:
Quote: | pbx1*CLI> core restart when convenient
Waiting for inactivity to perform restart
Ignoring asterisk restart request, already in progress.
After doing 'core restart now' and hitting Enter really hard Asterisk
did restart.
Some how Asterisk thinks it is not convenient. I want to find out why.
|
I haven't had it fail to restart, but I have been in the same situation and had it have a nice delay of a minute or two before it finally finds it convenient to restart. Haven't figured out what the delay is though. I am on 11.6.0. |
|
Back to top |
|
|
paddy at wizaner.com Guest
|
Posted: Wed May 28, 2014 11:38 am Post subject: [asterisk-users] 'restart when convenient' |
|
|
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Kevin LarsenSent: 28 May 2014 16:47To: Asterisk Users Mailing List - Non-Commercial DiscussionSubject: Re: [asterisk-users] 'restart when convenient' asterisk-users-bounces@lists.digium.com wrote on 05/28/2014 10:37:25 AM:> pbx1*CLI> core restart when convenient > Waiting for inactivity to perform restart> Ignoring asterisk restart request, already in progress.> > > After doing 'core restart now' and hitting Enter really hard Asterisk> did restart.> > > Some how Asterisk thinks it is not convenient. I want to find out why.> I haven't had it fail to restart, but I have been in the same situation and had it have a nice delay of a minute or two before it finally finds it convenient to restart. Haven't figured out what the delay is though. I am on 11.6.0. Maybe nothing but I had a similar problem with "... when convenient" - seem to remember it was a problem writing a cdr using cdr_adaptive_odbc - a database fault. Asterisk appeared idle but wouldn't close as I guess it thought something was still active. Paddy |
|
Back to top |
|
|
ssmeenk at freshdot.net Guest
|
Posted: Wed May 28, 2014 12:38 pm Post subject: [asterisk-users] 'restart when convenient' |
|
|
Quoting Kevin Larsen (kevin.larsen@pioneerballoon.com):
Quote: | Quote: | pbx1*CLI> core restart when convenient
Waiting for inactivity to perform restart
Ignoring asterisk restart request, already in progress.
Some how Asterisk thinks it is not convenient. I want to find out why.
|
I haven't had it fail to restart, but I have been in the same
situation and had it have a nice delay of a minute or two before it
finally finds it convenient to restart. Haven't figured out what the
delay is though. I am on 11.6.0.
|
Yes. But in this case 'core show uptime' was 5 days and somewhat hours.
Perhaps i should join the -dev list to find out what 'convenient'
actually means for the process...
--
| A good way to deal with predators is to taste terrible.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
ssmeenk at freshdot.net Guest
|
Posted: Wed May 28, 2014 12:39 pm Post subject: [asterisk-users] 'restart when convenient' |
|
|
Quoting Paddy Grice (paddy@wizaner.com):
Quote: | Quote: | Some how Asterisk thinks it is not convenient. I want to find out why.
| Maybe nothing but I had a similar problem with "... when convenient" -
seem to remember it was a problem writing a cdr using
cdr_adaptive_odbc - a database fault. Asterisk appeared idle but
wouldn't close as I guess it thought something was still active.
|
Ok. Good tip. We do use CDR in MySQL.
Will check this out if it happens again!
--
| And the Lord said unto John, 'Come forth and receive eternal life'.
| But John came fifth and won a toaster.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
support at drdos.info Guest
|
Posted: Wed May 28, 2014 12:47 pm Post subject: [asterisk-users] 'restart when convenient' |
|
|
Quote: | Quote: | Perhaps i should join the -dev list to find out what 'convenient'
actually means for the process...
|
|
The dev list is for discussions of coding Asterisk, this would be considered a user's question. Many of the devs are subscribed to this list as well.
Doug
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Wed May 28, 2014 1:09 pm Post subject: [asterisk-users] 'restart when convenient' |
|
|
On Wed, May 28, 2014 at 12:47 PM, Doug Lytle <support@drdos.info> wrote:
Quote: | Quote: | Quote: | Perhaps i should join the -dev list to find out what 'convenient'
actually means for the process...
|
|
The dev list is for discussions of coding Asterisk, this would be considered a user's question. Many of the devs are subscribed to this list as well.
|
The various 'stop/restart' flavours and what they mean:
* now - tell all CDRs to go submit themselves. Tell all channels to
hang up, and wait up to 15 seconds for all channels to go away. Don't
allow new channels to be made. After 15 seconds, shut down anyway.
Clean up of resources in modules is "best effort" - don't wait for
anything to get written or otherwise dispose of itself.
* gracefully - tell all CDRs to go submit themselves. Wait until all
channels have hung up, but don't hang them up. Don't allow new
channels to be made. Once all channels have hung up, ask all of the
modules to clean up after themselves - including waiting for CDRs to
get written.
* convenient - wait until all channels have hung up. If no channels
are made, keep waiting. Once all channels have hung up, and no new
channels are made, sneak in and ask all of the modules shut down and
to clean up after themselves - including waiting for all CDRs to get
written.
Note that while one shutdown command is executing, another cannot be
started. Thus, if you issue a 'core stop gracefully' and decide later
to escalate it to 'core stop now', by default, Asterisk will refuse
the 'core stop now' command. You can, however, stop the 'core stop
gracefully' by issuing 'core abort shutdown', which will cause
Asterisk to stop the existing shutdown attempt and return to normal
processing. You can then issue another shutdown command at your
leisure.
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Wed May 28, 2014 1:10 pm Post subject: [asterisk-users] 'restart when convenient' |
|
|
On Wed, May 28, 2014 at 1:08 PM, Matthew Jordan <mjordan@digium.com> wrote:
Quote: | On Wed, May 28, 2014 at 12:47 PM, Doug Lytle <support@drdos.info> wrote:
Quote: | Quote: | Quote: | Perhaps i should join the -dev list to find out what 'convenient'
actually means for the process...
|
|
The dev list is for discussions of coding Asterisk, this would be considered a user's question. Many of the devs are subscribed to this list as well.
|
The various 'stop/restart' flavours and what they mean:
|
<snip>
Quote: | * convenient - wait until all channels have hung up. If no channels
are made, keep waiting. Once all channels have hung up, and no new
channels are made, sneak in and ask all of the modules shut down and
to clean up after themselves - including waiting for all CDRs to get
written.
|
<snip>
Apologies, that should read "If new channels are made, keep waiting"
<snip>
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
ssmeenk at freshdot.net Guest
|
Posted: Wed May 28, 2014 1:47 pm Post subject: [asterisk-users] 'restart when convenient' |
|
|
Quoting Matthew Jordan (mjordan@digium.com):
Quote: | The various 'stop/restart' flavours and what they mean:
|
Thanks for this.
Quote: | * convenient - wait until all channels have hung up. If new channels
are made, keep waiting. Once all channels have hung up, and no new
channels are made, sneak in and ask all of the modules shut down and
to clean up after themselves - including waiting for all CDRs to get
written.
|
This is what i have cronned atm. I found Asterisk with 5 days uptime.
The behaviour i saw was issuing another 'core restart when convenient'
resulting in the 'Ignoring asterisk restart request, already in
progress.'-message, but issuing 'core restart now' did have effect,
though, as you stated, after a short delay of about 15 seconds.
I have some pointers on where to look next. It was totally unclear to me
that modules 'get asked to shut down' and might not feel like doing so
at particular moments. I figured it was all about active channels.
Thanks.
--
| If you must choose between two evils, pick the one you've never tried before.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
|