Page 1 of 1

Server time incorrect

PostPosted: Tue Jun 18, 2013 11:34 pm
by Iz3k34l
My setup in question is as follows;

All-in-one; web/mysql/dialer
O/S: OpenSUSE 12.1
Vicibox: VERSION: 2.6-375a
BUILD: 120831-1523
CPU: 2x Quad Core 2.5 Ghz Xeon
Ram: 16GB

The times shown for MySQL/PHP/Server under the reports page are not synced. The PHP and MySQL times are in sync but the server time is only update during reboot. I have tried setting the timezone in PHP per another threads suggestion but to no avail. I tryed using
Code: Select all
rcntp restart
but that didn't work either. Any help to resolve is greatly appreciated

Re: Server time incorrect

PostPosted: Sun Jun 23, 2013 3:27 pm
by williamconley
You did not share your installer version/method. This issue is unquestionably installer related ... so attempting to resolve without that information would be somewhat pointless.

I'd like to hear a bit more about "the server time is only update during reboot". Details. :)

Re: Server time incorrect

PostPosted: Tue Jun 25, 2013 9:00 am
by Iz3k34l
The install was performed the Vicibox preload 64bit 4.0.
When i say server time, i mean the server's time as its reported on the admin.php page. But yes the time only seems to change when the system is rebooted, the PHP time and the DB time is in sync and is accurate. When i look at the system time from the terminal, it gives me the correct time so...

Re: Server time incorrect

PostPosted: Tue Jul 23, 2013 2:33 am
by russellharrower
would be great if we could get an answer to this, as we are also having the same issue.

Re: Server time incorrect

PostPosted: Tue Jul 23, 2013 10:00 am
by williamconley
we've got hundreds of these installed. i'm going to have to guess you have "linux expertise" and used it to ... break something. (Just a guess, mind you ...)

enter "history" at the command prompt. if there is ANYTHING in history that you changed which pertains to time sync or time zone, undo your changes.

or reinstall and do not make any such changes before checking the time. ...

Also: The latest is 4.0.3, you should be sure you are using the latest. Perhaps posting the actual name of the .iso will clarify this (vagueness while asking for tech support is generally not as helpful as it could be).

Re: Server time incorrect

PostPosted: Sat Sep 07, 2013 1:10 pm
by Iz3k34l
I have tracked the problem to a part of the dialer that updates the 'server_updater' table. So obviously there is something that runs during boot-up that updates that table, can anyone point me in the direction of another script that would be responsible for this otherwise i suppose i would just need to create one. Thanks

Re: Server time incorrect

PostPosted: Mon Sep 09, 2013 4:22 am
by DomeDan
do a "screen -ls" and post the output,
if you got a screen called ASTupdate, then do a "screen -r ASTupdate" to attach to that screen and look if something is going on there, if there is some activity there then its ok,
detach the screen with "Ctrl+A" and then "D"

Just to make sure what times you are talking about, run this one line command (it will print the 3 time values that are related to the time synchronization issue):
Code: Select all
source <(sed 's/\ =>\ /=/g' /etc/astguiclient.conf) && \
echo "SELECT server_ip, UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater" | mysql -u$VARDB_user -p$VARDB_pass -h$VARDB_server -D asterisk && \
source /etc/sysconfig/clock && \
php -r "date_default_timezone_set('$TIMEZONE'); echo 'php time: '.date('U');" && echo ""

and post the output here.

also, the time that is wrong, is it just a few hours behind or is it the same all the time after a reboot?

Re: Server time incorrect

PostPosted: Tue Mar 31, 2020 11:28 am
by irfanshafi
I am facing the same issue server time does not update or sync since rebooting, it only updates the time while rebooting and then gets stuck there, would appreciate any help to solve the issue

Re: Server time incorrect

PostPosted: Wed Apr 01, 2020 9:43 am
by williamconley
irfanshafi wrote:I am facing the same issue server time does not update or sync since rebooting, it only updates the time while rebooting and then gets stuck there, would appreciate any help to solve the issue


1) Welcome to the Party! 8-)

2) As you are obviously new here, I have some suggestions to help us all help you:

When you post, please post your entire configuration including (but not limited to) your installation method (7.X.X?) and vicidial version with build (VERSION: 2.X-XXXx ... BUILD: #####-####).

This IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "manual/from scratch" you must post your operating system with version (and the .iso version from which you installed your original operating system) plus a link to the installation instructions you used. If your installation is "Hosted" list the site name of the host.

If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.

Similar to This:

Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600

3) While this topic may be related to your issue, your approach to a solution has no shortcut. You need to provide the basic information on your system and details on this particular topic. For instance: "server time does not update or sync" is a bit vague. time at the CLI in linux? Time in the expanded link in Reports? Time on agent screens when logged in? Time in the real time screen?

4) In most cases, it's also useful to list the screens listed when you use "screen -list" at the CLI. One of those screens is responsible for updating the server's status in Reports, and without that screen the server will turn red (in a multi-server environment) or just not work (in a single server environment) because without that screen the dialer functions don't work.