Time not updating in DB asterisk

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Time not updating in DB asterisk

Postby c20xh2 » Fri Jan 17, 2020 2:15 pm

Version: 2.14b0.5
SVN Version: 3185
DB Schema Version: 1584
BUILD: 200108-0937
Cluster install

Code: Select all
viciasterisk:~ # asterisk -V
Asterisk 13.27.1-vici


Hey guys,

I can't find the reason why after a fresh install the asterisk don't update his time in the DB. Server is showing red in REPORT and only update it's time after a reboot.
Code: Select all
MariaDB [asterisk]> select * from server_updater;
+--------------+---------------------+---------------------+
| server_ip    | last_update         | db_time             |
+--------------+---------------------+---------------------+
| 192.168.1.24 | 2020-01-17 13:54:03 | 2020-01-17 13:54:03 |


From what I understand my SVN version is correct vs the asterisk version.
Not sure if all background process are running and ok.

Code: Select all
viciasterisk:~ # screen -r
There are several suitable screens on:
        2376.ASTVDremote        (Detached)
        2373.ASTVDauto  (Detached)
        2370.ASTlisten  (Detached)
        2367.ASTsend    (Detached)
        2364.ASTupdate  (Detached)
        2282.ASTfastlog (Detached)
        2115.asterisk   (Detached)




Same for the Cronjob.

Code: Select all
viciasterisk:~ # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/rootcron installed on Fri Jan 10 18:19:26 2020)
# (Cronie version 4.2)

### keepalive script for astguiclient processes
* * * * * /usr/share/astguiclient/ADMIN_keepalive_ALL.pl

### Compress astguiclient log files and remove old ones
25 2 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +1 -print | grep -v \.xz | xargs xz -9 >/dev/null 2>&1
28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +30 -print | xargs rm -f

### remove and rotate old asterisk logs
29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +30 -print | xargs rm -f
30 0 * * * /usr/bin/find / -maxdepth 1 -name "screenlog.0*" -mtime +7 -print | xargs rm -f
31 0 * * * /usr/bin/find /tmp -maxdepth 1 -type f -mtime +7 -print | xargs rm -f
32 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 1 -type f -mtime +1 -print | grep -v \.xz | xargs xz >/dev/null 2>&1

### recording mixing/compressing/ftping scripts
#0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl --MIX
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_VDonly.pl
1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --MP3
#2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --MP3 --run-check
#0 1 * * * /usr/share/astguiclient/AST_CRON_audio_4_ftp2.pl --ftp-server=server.ip --ftp-login=user --ftp-pass=pass --ftp-directory=/ --ftp-persistent --ftp-validate --transfer-limit=100000 --list-limit=100000

### remove old recordings more than 7 days old, and delete originals after 1 day
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
24 1 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +1 -print | xargs rm -f

### kill Hangup script for Asterisk updaters
* * * * * /usr/share/astguiclient/AST_manager_kill_hung_congested.pl

### updater for voicemail
* * * * * /usr/share/astguiclient/AST_vm_update.pl

### updater for conference validator
* * * * * /usr/share/astguiclient/AST_conf_update.pl

### reset several temporary-info tables in the database
2 1 * * * /usr/share/astguiclient/AST_reset_mysql_vars.pl

### Reboot nightly to manage asterisk issues and memory leaks - uncomment if issues arise
#30 6 * * * /sbin/reboot

### remove text to speech file more than 4 days old
#20 0 * * * /usr/bin/find /var/lib/asterisk/sounds/tts/ -maxdepth 2 -type f -mtime +4 -print | xargs rm -f

### Update agent records with the IP of the phone they are logging in on
#*/5 * * * * /usr/share/astguiclient/AST_phone_update.pl --agent-lookup

### Delete voicemail that is older then 60 days
#0 2 * * * /usr/local/bin/vmspool_manager.pl --active --age=60

### ViciBox integrated firewall, by default just load the VoIP Black list and reload it every 4 hours
### You can lock everyone out of your server if you set this wrong, so understand what you are doing!!!
@reboot /usr/local/bin/VB-firewall.pl --voipbl --noblack --quiet
0 */6 * * * /usr/local/bin/VB-firewall.pl --voipbl --noblack --flush --quiet



I think I found the name of the script that take care of updating the time in DB but when I run it we get an error:

Code: Select all
/usr/share/astguiclient/AST_update.pl:# 80111-1850 - fixed server_updater record missing bug
/usr/share/astguiclient/AST_update.pl:  $server_updater =               'server_updater';
/usr/share/astguiclient/AST_update.pl:# $server_updater =               'TEST_server_updater';
/usr/share/astguiclient/AST_update.pl:##### Check for a server_updater record, and if not present, insert one
/usr/share/astguiclient/AST_update.pl:$stmtA = "SELECT count(*) FROM $server_updater where server_ip='$server_ip';";
/usr/share/astguiclient/AST_update.pl:  $stmtU = "INSERT INTO $server_updater set server_ip='$server_ip', last_update='$now_date';";
/usr/share/astguiclient/AST_update.pl:  $stmtU = "UPDATE $server_updater set last_update='$now_date' where server_ip='$server_ip'";


Code: Select all
viciasterisk:~ # perl /usr/share/astguiclient/AST_update.pl
SHOW CHANNELS format: 2
LOOKING FOR Zap/DAHDI clients assigned to this server:
LOOKING FOR IAX2 clients assigned to this server:
LOOKING FOR SIP clients assigned to this server:
gs102
gs103
gs113
Zap Clients:  |
IAX2 Clients: |
SIP Clients:  |gs102|gs102@gs102|gs103|gs103@gs103|gs113|gs113@gs113|
pattern match timed-out at /usr/share/astguiclient/AST_update.pl line 470


Not sure where to go from there :( If anyone can point me in the right direction.

Thanks !
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: Time not updating in DB asterisk

Postby mflorell » Fri Jan 17, 2020 11:07 pm

in the Admin -> Servers -> Modify server page, what is the Asterisk Version set to?
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Time not updating in DB asterisk

Postby c20xh2 » Sat Jan 18, 2020 11:02 am

Something that I don't think make sense:

Code: Select all
1.4.21.2


Changed the config to what asterisk -V give me:

Code: Select all
13.27.1-vici


Rebooted the asterisk box and now we can see the time getting updated in the DB.

Problem Solved, as usual thank you for your time mflorell. By the way this is a 100% fresh install from ViciBox_v9.x86_64-9.0.1.iso, kind off weird !
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: Time not updating in DB asterisk

Postby drodecker » Thu Sep 23, 2021 3:43 am

BTW- this is a bug in Vicidial-10.0.0 beta; out of the box, a fresh cluster installation shows RED line errors.
VERSION: 2.14-830a
BUILD: 210920-2159

Asterisk Version in Vicidial Server settings installs with the value set as: 1.4.21.2
However it should be set to: 13.38.2-vici

Problem solved.
drodecker
 
Posts: 25
Joined: Wed Oct 09, 2019 11:18 pm

Re: Time not updating in DB asterisk

Postby carpenox » Thu Sep 23, 2021 8:58 am

good post back
Alma Linux 9.3 | Version: 2.14-911a | SVN Version: 3815 | DB Schema Version: 1710 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3
carpenox
 
Posts: 2230
Joined: Wed Apr 08, 2020 2:02 am
Location: Coral Springs, FL


Return to Support

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 85 guests