[arm-allstar] Resync AST database
Patrick Perdue
borrisinabox at gmail.com
Wed Mar 29 23:28:37 EDT 2023
Mark:
I've seen this happen a few times.
By default, there is a cronjob that downloads the latest list of all
nodes from Asterisk, which fires at 03:15 AM local time.
15 03 * * * cd /usr/local/sbin; ./astdb.php cron
It may be worth adding something in the initial script that starts
Asterisk on system boot to see if /var/log/asterisk/astdb.txt exists,
and if not, immediately download it, or modify the php file or the
mountpoint itself to write to a directory that persists across reboots,
which doesn't happen by default with /var/log, as it lives in RAM.
On 3/29/2023 3:41 PM, Mark VE3JMR via ARM-allstar wrote:
>
>
> When my nodes restarted after a recent power failure, there was
> missing and incorrect information reported in Supermon2. It stated
> that the nodes were now private, any incoming connections displayed
> the node# but the descriptions were replaced by an error message,
> "unavailable". I found a thread somewhere (cannot find it now, it's so
> hard to locate threads) that described the issue and stated that the
> resolution was to execute astdb.php from the Linux command prompt. It
> took about 2 seconds to run, displayed a result of xxxxx bytes written
> to astdb.txt and the display in Supermon2 was corrected after I
> refreshed the page.
>
> Should there be another system crash and restart, I decided to modify
> /etc/asterisk/rpt.conf to force a resync each time the node is booted.
> I did this because I did not want the node to wait for the cronjob
> that repeats this task at 0300h each day.
>
> With XXXXXX representing the node number, the mods were:
>
> 1. Create a new function -> 85=cmd,/usr/local/sbin/astdb.php
> XXXXXX ;Resync ASL database
>
> 2. Modify macro1 -> 1=*85 *80 *81 *73517301#
>
> 3. Make sure that startup_macro=*51 _and_ startup_macro_delay=10
>
> 4. Save file and reboot server.
>
> Is my logic correct? (I've checked my Linux system log and it appears
> that executes during each reboot and Supermon2 appears normal.)
>
> Is the function syntax correct; specifically, is the node number
> required?
>
> If a server has more than one node, should this procedure be included
> with the second node? I'm thinking it should because each node has its
> own startup macro.
>
> Is there anything else I need to consider?
>
> Thanks so much.
>
> 73 75 de VE3JMR | VE3MR
> Mark
> Port Colborne, Ontario, CANADA
> https://www.qrz.com/db/VE3JMR
> Allstar# 531320 [1] | Echolink# 736666 | VE3JMR-L [2]
>
> [3] [4] [5]
> Ottawa ARC [3] Burlington ARC
> [4] Radio Amateur of Canada [5]
>
> LIFE has an expiry date.
> <if trumpet=%true then exit function>
>
> Links:
> ------
> [1] http://stats.allstarlink.org/stats/531320
> [2]
> https://www.echolink.org/links.jsp?lat_deg=42&lat_min=52.997999999999905&lat_NS=North&lon_deg=79&lon_min=13.99799999999999&lon_EW=West&gs=FN02jv&sel=city&city=Port+Colborne&state=ON&country=CA&d=1
> [3] https://oarc.net
> [4] https://www.barc.ca
> [5] https://www.rac.ca
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list