Page 1 of 1

Time synchronization problem (Bug Fix?)

PostPosted: Mon Dec 10, 2018 12:56 pm
by dcoolypen
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.

Re: Time synchronization problem (Bug Fix?)

PostPosted: Mon Dec 10, 2018 6:40 pm
by dcoolypen
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

Re: Time synchronization problem (Bug Fix?)

PostPosted: Mon Dec 10, 2018 8:29 pm
by alo
What asterisk version did you have in the admin servers section?

Re: Time synchronization problem (Bug Fix?)

PostPosted: Tue Dec 11, 2018 12:33 pm
by Kumba
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 :)

Re: Time synchronization problem (Bug Fix?)

PostPosted: Tue Dec 11, 2018 4:10 pm
by dcoolypen
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

Re: Time synchronization problem (Bug Fix?)

PostPosted: Wed Dec 12, 2018 12:46 pm
by dcoolypen
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.

Re: Time synchronization problem (Bug Fix?)

PostPosted: Fri Dec 14, 2018 6:04 pm
by dspaan
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.

Re: Time synchronization problem (Bug Fix?)

PostPosted: Tue Dec 18, 2018 12:08 pm
by dcoolypen
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.

Re: Time synchronization problem (Bug Fix?)

PostPosted: Wed Dec 19, 2018 1:43 pm
by Kumba
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.

Re: Time synchronization problem (Bug Fix?)

PostPosted: Fri Dec 21, 2018 4:30 pm
by williamconley
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.

Re: Time synchronization problem (Bug Fix?)

PostPosted: Thu Jan 03, 2019 3:06 pm
by dcoolypen
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

Re: Time synchronization problem (Bug Fix?)

PostPosted: Thu Jan 03, 2019 3:16 pm
by williamconley
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-)