This "There is a time synchronization problem with your system, please tell your system administrator" has been bugging me a while and I haven't had time checking it out till now.
It happen all of a sudden when I shut down my NAS server, I could not understand how my NAS had anything to do with time synchronization of the server, did a reboot of the server and everything was fine.
I start digging to see what times the system was checking and wrote this one-line script to check the 3 times in question (last_update,db_time,php-time):
- 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 ""
edit: updated the script to read variables
last_update and db_time stops when i shut down my NAS
using grep I found out that the script AST_update.pl was updating the last_update value,
one part of that script also checks disk usage on the server with the df command,
and that command hangs when it tries to look at the disk-usage of a NFS share that cant be reached.
So I got two options, either change the timeo and retrans options for the fstab entry
to make it timeout faster and let the script continue.
Or I can make some changes to the script, this is what I did:
- Code: Select all
--- AST_update.pl.orig 2013-04-03 21:59:57.695319259 +0200
+++ AST_update.pl 2013-04-03 22:00:14.910192229 +0200
@@ -643 +643 @@
- @serverDISK = `$dfbin -B 1048576`;
+ @serverDISK = `$dfbin -B 1048576 /`;
I just made the script look at the root only and thus prevent it from hanging if I happen to shut down the NAS again.
Hope the next person that encounters this problem finds my post!