Time synchronization problem (Bug Fix?)

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

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

Time synchronization problem (Bug Fix?)

Postby dcoolypen » Mon Dec 10, 2018 12:56 pm

ViciBox 8.1.2 Fresh Install

Following a fresh install of ViciBox 8.1.2 we were receiving error: "There is a time synchornization problem."

Checking Server, PHP and DB times, we found server time was not updating and ASTupdate was not showing as a detached screen.Further inspection revealed that the Perl script AST_update.pl would crash at line 470 with the following error:

"pattern match timed-out at /usr/share/astguiclient/AST_upate.pl line 470."

The code at line 470 is a "waitfor()" function that is attempting to match the response from the Asterisk server with a regex pattern but the response from the server doesn't match the regex pattern.

Here is the response from server:

Connect to localhost
Escape character is '^]'.
Asterisk Call Manager/2.10.4

And, here is the regex pattern:

'/[0123]\n$/'

In order for the pattern above to work, the last line in the server response would have to end in 0, 1, 2 or 3, so we changed the code at line 470 and also at 534 as follows:

Original: $t-waitfor('/[0123]\n$/]);
Replacement: $t-waitfor('/Asterisk Call Manager.+\n$/');

This appears to have resolved the problem. Server time is now updating and ASTupdate is running as a detached screen.
dcoolypen
 
Posts: 6
Joined: Mon Nov 26, 2018 12:35 pm

Re: Time synchronization problem (Bug Fix?)

Postby dcoolypen » Mon Dec 10, 2018 6:40 pm

Just a quick update to this post.

We found the same issue in other scripts as well:

AST_manager_listen.pl
AST_manager_listenBUFFER.pl
dcoolypen
 
Posts: 6
Joined: Mon Nov 26, 2018 12:35 pm

Re: Time synchronization problem (Bug Fix?)

Postby alo » Mon Dec 10, 2018 8:29 pm

What asterisk version did you have in the admin servers section?
alo
 
Posts: 131
Joined: Wed Jun 20, 2012 10:21 am

Re: Time synchronization problem (Bug Fix?)

Postby Kumba » Tue Dec 11, 2018 12:33 pm

Your SVN version does not support Asterisk v.13. Upgrade to SVN revision 2960 or higher.

This is not a bug, just an oversight on adding a new server :)
Kumba
 
Posts: 812
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida

Re: Time synchronization problem (Bug Fix?)

Postby dcoolypen » Tue Dec 11, 2018 4:10 pm

OK, my error I suppose. I assumed using the latest Vicibox ISO (v8.1.2) would do that.

VERSION: 2.14-695a
BUILD: 181116-1133
Asterisk 13.21.1-vici

I guess I should move this to a support question then as I have no idea how to determine the SVN number.

Thanks
dcoolypen
 
Posts: 6
Joined: Mon Nov 26, 2018 12:35 pm

Re: Time synchronization problem (Bug Fix?)

Postby dcoolypen » Wed Dec 12, 2018 12:46 pm

Thanks for the info Kumba. I purchased the full version manager manual to get a better understanding.
Since I am new to this forum and to Vicidial I am not sure whether or not I should move this to a support question. Please direct me if that would be more appropriate.

This was an ISO install of Vicibox 8.1.2
Version: 2.14b0.5
SVN Version: 3054
Asterisk Version: 13.21.1-vici
DB Schema Version: 1561
DB Schema Update Date: 2018-11-24 00:12:40
Install Date: 2018-11-24

Given that the SVN is greater than 2960 and I found this error with the Perl scripts, should I assume I have a bad install and need to start from scratch? I do note that I had left out the Asterisk version in the server settings when the first time I ran the server settings but later updated that. Could this have caused the problem and if so, would it be best to delete that server and start over?

Thanks for the pointers.
dcoolypen
 
Posts: 6
Joined: Mon Nov 26, 2018 12:35 pm

Re: Time synchronization problem (Bug Fix?)

Postby dspaan » Fri Dec 14, 2018 6:04 pm

Is this a multi server install? How did Kumba know your SVN version when you didn't post it? Why would you remove remove the asterik version from the server settings? Install vicibox on a virtual machine to check if you get the same problems, i would expect not.
Regards, Dennis

Vicibox 8.1.2
Version: 2.14-717a
SVN Version: 3129
DB Schema Version: 1574
Build: 190724-1603
dspaan
 
Posts: 1233
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Time synchronization problem (Bug Fix?)

Postby dcoolypen » Tue Dec 18, 2018 12:08 pm

He must have assumed but the assumption was incorrect. I didn't remove the Asterisk version, I neglected to put it in....that probably created the problem. I will try it on a virtual to see what I get.
dcoolypen
 
Posts: 6
Joined: Mon Nov 26, 2018 12:35 pm

Re: Time synchronization problem (Bug Fix?)

Postby Kumba » Wed Dec 19, 2018 1:43 pm

The AMI portion you posted means the SVN codebase doesn't have Asterisk 13 support, therefore you are running an SVN version before SVN 2960.

So, you need to upgrade your vicidial cluster to SVN version 2960 or above.

The '/[0123]\n$/' regex is only in the AST_update.pl. Asterisk 13 runs from AST_update_AMI2.pl. so either you are running an old code base or you don't have the right asterisk versions set in astguiclient.conf and the servers page, likely because the server was installed with a version of ViciDial that didn't support Asterisk 13.
Kumba
 
Posts: 812
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida

Re: Time synchronization problem (Bug Fix?)

Postby williamconley » Fri Dec 21, 2018 4:30 pm

Code: Select all
svn up

This code does not alter the running scripts. It merely loads the latest copies into the local repository, ready to install. So you can very well have SVN 3054 showing in /usr/src/astguiclient/trunk BUT be running SVN 2090 scripts.

Especially if you performed any Restore functions or copies from other servers.
Vicidial Installation and Repair, plus Hosting and Colocation
SugarCRM integration - Customization and Add-ons - We Bring It All Together.
http://www.PoundTeam.com # 352-269-0000 # +44 (203) 769-2294 # +506 4001-8914
williamconley
 
Posts: 18992
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Time synchronization problem (Bug Fix?)

Postby dcoolypen » Thu Jan 03, 2019 3:06 pm

Appreciate the input.

It appears I was on SVN 3054. I ran SVN up and it moved me to 3057 with only a few file updates. I also confirmed that the correct "AMI2" scripts are (now) running. At this point, I can only assume the wrong scripts were running because I neglected fill in the Asterisk version number in the Admin server setup when I first setup the server.


Thanks
dcoolypen
 
Posts: 6
Joined: Mon Nov 26, 2018 12:35 pm

Re: Time synchronization problem (Bug Fix?)

Postby williamconley » Thu Jan 03, 2019 3:16 pm

live and learn. do a few 'virtual' installs on a vm. Get used to the install and script locations. May make you more able to cope in the future. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
SugarCRM integration - Customization and Add-ons - We Bring It All Together.
http://www.PoundTeam.com # 352-269-0000 # +44 (203) 769-2294 # +506 4001-8914
williamconley
 
Posts: 18992
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 2 guests