Restarting asterisk


#1

After updating the following modules;
backup 15.0.10.51 (current: 15.0.10.48)

cel 15.0.15.12 (current: 15.0.15.11)

certman 15.0.42 (current: 15.0.39)

filestore 15.0.3.13 (current: 15.0.3.12)

findmefollow 15.0.25 (current: 15.0.24)

firewall 15.0.8.14 (current: 15.0.8.9)

framework 15.0.17.34 (current: 15.0.17.32)

paging 15.0.4.30 (current: 15.0.4.29)

presencestate 15.0.11 (current: 15.0.10)

sysadmin 15.0.21.46 (current: 15.0.21.28)

timeconditions 15.0.15.10 (current: 15.0.15.9)

voicemail 15.0.18.31 (current: 15.0.18.25)

and system updates;
sangoma-pbx.noarch 2104-1.sng7 (current: 2012.1.sng7)
on 5/1/2021 like clock work every nine (9) days I have to restart asterisk using “fwconsole restart” in order to allow agents to log into QueueMetrics. Extensions and trunks can call each other inbound and outbound normal call processing appears ok however QueueMetrics will not allow logins, only quick fix right now is to use “fwconsole restart”. Its the second outage now, first on the 10th and today on the 19th… Any idea to point me in the direction to look for an error? also this is happening to three (3) different systems that had the same updates.


(TheJames) #2

It sounds like everything is working except Queue Metrics? Have you tried contacting loway to see if this is a known issue or if they can debug it?


#3

Thank you for responding; I opened a ticket with them however I did not hear back as yet. Wanted to be proactive and see if I could troubleshoot it myself. Please note I honestly don’t think the issue is with the QueueMetrics since it was working without an issue for years and prior to the latest system and module updates.


#4

Does this part of the log file mean anything significant?

[2021-05-17 04:02:01] Asterisk 16.17.0 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2021-04-22 07:22:22 UTC
[2021-05-17 04:02:01] VERBOSE[10509] logger.c: Asterisk Queue Logger restarted
[2021-05-17 04:02:01] VERBOSE[10509] asterisk.c: Remote UNIX connection disconnected


(TheJames) #5

That is likely from log rotation. You can try

asterisk -rx "logger rotate"

Then see if the problem happens.


#6

I think I found the problem, Asterisk is not writing the queue_log file. how do I fix this? apparently starts happening after the May 1st modules and system updates.


(Lorne Gaetz) #7

Are the queue log events being written to the previously rotated queuelog file?

https://issues.freepbx.org/browse/FREEPBX-22499

If so, see the postrotate fix in ticket.


#9

per the solution to this as quoted below from the issue tracker how do I implement this please? your help appreciated. thanks.

This affects any software that reads the queue_log file. Solution is simple, just add the same postrotate section than for the other asterisk log files.
/var/log/asterisk/queue_log {
        daily
        missingok
        rotate 30
        notifempty
        sharedscripts
        create 0640 asterisk asterisk
        su asterisk asterisk
        postrotate
            /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
        endscript
}

(Communication Technologies) #10

@lgaetz do you think this would be an attributing factor to an issues we are experiencing using the current distro, in that when using Asternic or Sangoma Queue Wallboards, we do not see agent realtime stats (just blank, like the agent is not signed in). We see queue real-time, and queue and agent historical, just not agent realtime. The agents do show in Reports>Asterisk Info>Queues, just kind of at a dead end trying to figure out what it might be.


(Lorne Gaetz) #11

Queue Wallboard doesn’t use queuelog so I would think not. Can’t comment on asternic.


(Itzik) #12
nano /etc/logrotate.d/asterisk

add

postrotate
    /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
endscript

To the queue_log block as shown above

asterisk -x "logger reload"

(Itzik) #13

Asternic reads the queue_log, so likely related.

Do the same thing and see if it helps.

Also, do get the data from the last good file, stop asterniclog service

service asterniclog stop

And then

/usr/local/parselog/asterniclog -u qstatsUser -p qstatsPassw0rd -d qstats -l /var/log/asterisk/queue_log-<date> -c

You’ll have to hit Ctrl+C to stop it after a few seconds.