Solved Troubleshooting client network disconnections.

Status
Not open for further replies.

Hazmoid

Bronze Partner
Joined
May 27, 2020
Messages
9
Reaction score
2
Had an issue recently with a client configured on a debian install of 3cx.
The client was getting constant "network disconnected" messages, particularly when they attempted to take a call.
They used a combination of softphone and handsets, with some using the Chrome client and others using the windows client.
Looking at the logs, extensions appeared to be registering and deregistering every few minutes, and calls were showing as failed in the activity log.
firewall checker was showing random ports as failing the Full cone test. Watchguard firewall had all ports required open as per the documentation for 3CX.
The activity graph on the dashboard was the giveaway though, appeared to have "looping" ie multiple activities over the same time span.
The 3CX install was setup as a VM on a Hyper-V server.
And here we found the error. The Hyper-V server was providing time sync to the VMs and when the time on the Hyper-V server was checked against a known good source it was found to be incorrect. To remedy this, the alternatives were to:
1. install an NTP service on the Debian client, and ensure that the Hyper-V was not providing time sync services (under settings for the client server on the Hyper-V manager, under Integration services, un-tick the time synchronization service) ,
2. Better still make sure that the Hyper-V service was retrieving time from a known good source.
To complete option 2, run the following commands on the hyper-V server

net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"
w32tm /config /reliable:yes
net start w32time

This stops the windows time service, configures it to check with the pool.ntp.org servers ( please set these server names to the appropriate ones for your zone e.g. the ones above are for North America but other zones can be found at https://www.ntppool.org/en/)
It then sets your hyper-v server as a reliable source and finally restarts the windows time service to put the changes into effect.
With this in place, our 3cx server was able to pass the firewall test with no errors, and we think this has also prevented the issues with client disconnects.
So an additional step installing new servers should be to ensure that time sources are accurate and that your 3cx server is referencing these.
 
  • Like
Reactions: Hazmoid
  • Like
Reactions: Hazmoid
Installing ntp on Debian hyper-v, is part of the installation instructions

https://www.3cx.com/docs/installing-microsoft-hyper-v/
NTP service was installed on Debian. The whole point of the post was to highlight that weird shit happening was the result of time on the 3cx server being constantly reset by the time service on the Hyper-V server (incorrect), and the NTP service on Debian then resetting it to the correct time.
Nowhere does it say in the install document that you need to check that the time source on the Hyper-V server is accurate. Normally this would be a no-brainer when setting up a Hyper-V server, however this server already existed before the 3cx server was installed ( and I didn't do the install of either).

As I said, I was coming at this from the management console up.
Given that this is only the 2nd or 3rd 3CX install I have been involved with, I'm happy that I tracked the issue down so quickly.

Also this post was to give some aid to those who also might run into weird issues happening with 3CX client network disconnects. My Google-fu turned up a couple of different answers that sort of pointed in the right direction.
 
Last edited:
ive just had exactly the same issue. Spent a few days thinking i have anetwork reliablity issue, as we were dropping calls and 3cx client disconnecting.

Eventually saw this post and realised my host time was a minute out, and because NTP was installed it was fighting with hyper-v for the correct time, so it would go forward and back.

Ive corrected the time and setup the sync as above.

It appears that hyper-v will sync the time every 5 seconds (check /var/logs/syslog). so there is no need at all for the NTP to be installed on the VM.



What i now dont understand is that in april had to install NTP to resolve a timing issue where calls were dropping. Has there been an update (auto installed by 3cx/or MS) which had made debian sync the time with hyper-v?


Just to be clear
Months to April 2020 no issues
April 2020 calls dropped, installed NTP to resolve issues
26th May 2020 calls dropping - correcting hyper-v time resolves issue, but also notice this syncs every 5 seconts so NTP isnt needed?

so confused.
 
Straight from the guide as linked by @Saqqara on the 2nd post:

1590752570600.png
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,952
Messages
589,894
Members
164,844
Latest member
abctel2