Time Synchronization error
Posted:
Tue Feb 26, 2019 7:18 pm
by mrgunston
I am seeing an error popup on a relatively new system stating:
"There is a time synchronization problem with your system, please tell your system administrator"
NTP is configured to sync our database and diallers and I can see that they are all in sync however, "PHP time" is about 6 seconds out.
What can I do to sync PHP time?
ViciBox: 8.1.2 | VERSION: 2.14b0.5 | SVN: 3063 | Clusters: 1 DB / 3 Web/Asterisk
Re: Time Synchronization error
Posted:
Wed Feb 27, 2019 1:32 pm
by omarrodriguezt
Hello, don't forget to post your system specifications including Vicidial Version.
Have you restarted all your servers?
"NTP is configured to sync our database and diallers"
Are you syncing the dialers against the DB?
Re: Time Synchronization error
Posted:
Wed Feb 27, 2019 6:51 pm
by mrgunston
omarrodriguezt wrote:Hello, don't forget to post your system specifications including Vicidial Version.
Have you restarted all your servers?
"NTP is configured to sync our database and diallers"
Are you syncing the dialers against the DB?
Vicidial Version is ViciBox: 8.1.2
I have tried restarting everything, but this didn't work. Also, all of the servers are syncing with our Sophos Firewall.
Re: Time Synchronization error
Posted:
Wed Feb 27, 2019 6:59 pm
by williamconley
mrgunston wrote:I can see that they are all in sync however, "PHP time" is about 6 seconds out.k
OK: Ya lost me there bud. Are you saying that the DB and the Web server (which is where php resides, of course) do not have the same time, but they are on the same server? I strongly suspect that those two roles are on different servers and those two servers have different times.
Re: Time Synchronization error
Posted:
Fri Mar 01, 2019 10:58 am
by dreedy
It sounds like you are stating that the ntp from all server are pointed to a single source. If the reports section of the vici web are coming out of sync then is sounds like you might want to look at the mananger.conf int /etc/asterisk and update the contents. I have had a similar issue happen when loading up a fresh box. Here is the manager.conf that works for me.
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
[cron]
secret = 1234
read = system,call,log,verbose,command,agent,user,originate
write = system,call,log,verbose,command,agent,user,originate
[updatecron]
secret = 1234
read = command,reporting
write = command,reporting
eventfilter=Event: CoreShowChannel
[listencron]
secret = 1234
read = system,call,log,verbose,command,agent,user,dtmf
write = command
eventfilter=Event: Shutdown
eventfilter=Event: DTMFBegin
eventfilter=Event: DTMFEnd
eventfilter=Event: NewCallerid
eventfilter=Event: Newstate
eventfilter=Event: Hangup
eventfilter=!Event: HangupRequest
[sendcron]
secret = 1234
read = command
write = system,call,log,verbose,command,agent,user,originate
Re: Time Synchronization error
Posted:
Sun Mar 03, 2019 7:41 pm
by mrgunston
williamconley wrote:mrgunston wrote:I can see that they are all in sync however, "PHP time" is about 6 seconds out.k
OK: Ya lost me there bud. Are you saying that the DB and the Web server (which is where php resides, of course) do not have the same time, but they are on the same server? I strongly suspect that those two roles are on different servers and those two servers have different times.
They are not the same server. The DB is it's own server & I have 2 separate severs, and they are both Webservers and diallers.
Re: Time Synchronization error
Posted:
Sun Mar 03, 2019 7:50 pm
by mrgunston
dreedy wrote:It sounds like you are stating that the ntp from all server are pointed to a single source. If the reports section of the vici web are coming out of sync then is sounds like you might want to look at the mananger.conf int /etc/asterisk and update the contents. I have had a similar issue happen when loading up a fresh box. Here is the manager.conf that works for me.
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
[cron]
secret = 1234
read = system,call,log,verbose,command,agent,user,originate
write = system,call,log,verbose,command,agent,user,originate
[updatecron]
secret = 1234
read = command,reporting
write = command,reporting
eventfilter=Event: CoreShowChannel
[listencron]
secret = 1234
read = system,call,log,verbose,command,agent,user,dtmf
write = command
eventfilter=Event: Shutdown
eventfilter=Event: DTMFBegin
eventfilter=Event: DTMFEnd
eventfilter=Event: NewCallerid
eventfilter=Event: Newstate
eventfilter=Event: Hangup
eventfilter=!Event: HangupRequest
[sendcron]
secret = 1234
read = command
write = system,call,log,verbose,command,agent,user,originate
Thanks for the advice. Do I do this on the DB ? or the websevers/diallers?
Re: Time Synchronization error
Posted:
Sun Mar 03, 2019 8:58 pm
by williamconley
mrgunston wrote:williamconley wrote:mrgunston wrote:I can see that they are all in sync however, "PHP time" is about 6 seconds out.k
OK: Ya lost me there bud. Are you saying that the DB and the Web server (which is where php resides, of course) do not have the same time, but they are on the same server? I strongly suspect that those two roles are on different servers and those two servers have different times.
They are not the same server. The DB is it's own server & I have 2 separate severs, and they are both Webservers and diallers.
williamconley wrote:I strongly suspect that those two roles are on different servers and those two servers have different times.
OK: Do They Have Different Times?
Re: Time Synchronization error
Posted:
Mon Mar 04, 2019 12:52 am
by mrgunston
This is what I see under "Reports":
- Code: Select all
+------------------+---------------------+
| Server | Time |
+------------------+---------------------+
| Db Server | BLANK |
| Dialler / Web 01 | 2019-03-04 15:44:31 |
| Dialler / Web 02 | 2019-03-04 15:44:31 |
| PHP Time | 2019-03-04 15:44:23 |
| DB Time | 2019-03-04 15:44:31 |
+------------------+---------------------+
Re: Time Synchronization error
Posted:
Mon Mar 04, 2019 8:55 am
by dreedy
You will need to apply this only to the DIalers "Telephony" servers. This does not need to be done in the DB.
make a copy of the /etc/asterisk/manager.conf
Then open your text editor to alter the contents of the /etc/asterisk/manager.conf and updated the contents with what i have patsed in my previous post.
Re: Time Synchronization error
Posted:
Mon Mar 04, 2019 11:16 am
by williamconley
mrgunston wrote:This is what I see under "Reports":
- Code: Select all
+------------------+---------------------+
| Server | Time |
+------------------+---------------------+
| Db Server | BLANK |
| Dialler / Web 01 | 2019-03-04 15:44:31 |
| Dialler / Web 02 | 2019-03-04 15:44:31 |
| PHP Time | 2019-03-04 15:44:23 |
| DB Time | 2019-03-04 15:44:31 |
+------------------+---------------------+
fair enough. Now: What times do you see on the console of each server? Apparently, one of them is off by 8 seconds and needs a push to be the correct time.
Re: Time Synchronization error
Posted:
Sun Mar 10, 2019 11:06 pm
by mrgunston
williamconley wrote:mrgunston wrote:This is what I see under "Reports":
- Code: Select all
+------------------+---------------------+
| Server | Time |
+------------------+---------------------+
| Db Server | BLANK |
| Dialler / Web 01 | 2019-03-04 15:44:31 |
| Dialler / Web 02 | 2019-03-04 15:44:31 |
| PHP Time | 2019-03-04 15:44:23 |
| DB Time | 2019-03-04 15:44:31 |
+------------------+---------------------+
fair enough. Now: What times do you see on the console of each server? Apparently, one of them is off by 8 seconds and needs a push to be the correct time.
Interestingly, all of the servers have different times at the OS level.
Re: Time Synchronization error
Posted:
Sun Mar 10, 2019 11:34 pm
by williamconley
Thus, time sync error. So get ntp working properly using ONE local server as the iBurst master and that ONE server will reach out to the net to actually get the time.
Note that it's more important that they all agree than actually having the right time. Thus a local master makes them agree. They all have ntp client and server running if you used Vicibox to configure them. Doesn't matter which one you use as master. It doesn't even need to be one of the Vicidial servers if you have another server available. But local for that one master.