Time taken to connect to VPN is inconsistent and long
-
Hi devs
Im running v0.50 of the software suite on VOXL. I have my own OpenVPN server and am using the LTEv2 board on the VOXL.
I noticed that the time taken for the modem and time-sync (needed so that OpenVPN can validate the certs) services to complete is inconsistent and long. Sometimes it takes 2mins and at times up to 4mins.
I also noticed that the voxl-time-sync service takes a very long time to complete; almost 1-1.5mins.
May i know if there is a way to speed up the process?
I noticed that while /etc/systemd/timesyncd.conf exists, ntpd.service does not exist?
ntpd.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)Hope you guys can help!
-
@hmlow Yes, it is the ntp time sync service that takes so long. And you cannot connect to the VPN until you have a reasonable system time otherwise the certificate authentication will fail. If you could figure out how to make it happen faster that would be great!
-
@Eric-Katzfey but what does VOXL actually uses for the time sync?
If I'm not mistaken voxl-time-sync is just a simple python script to grab updated system date and time?
-
@hmlow chronyd:
● chronyd.service - NTP client/server Loaded: loaded (/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 1970-01-01 00:00:08 UTC; 1min 16s ago Process: 2334 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS) Main PID: 2350 (chronyd) CGroup: /system.slice/chronyd.service └─2350 /usr/sbin/chronyd Jan 01 00:00:07 apq8096 systemd[1]: Starting NTP client/server... Jan 01 00:00:08 apq8096 chronyd[2350]: chronyd version 2.4 starting (+CMDMON +NTP +REFCLOCK +RTC -PRIVDROP -SCFILTER -SECHASH +ASYNCDNS +IPV6 -DEBUG) Jan 01 00:00:08 apq8096 systemd[1]: Started NTP client/server.
-
@Eric-Katzfey said in Time taken to connect to VPN is inconsistent and long:
@hmlow Yes, it is the ntp time sync service that takes so long. And you cannot connect to the VPN until you have a reasonable system time otherwise the certificate authentication will fail. If you could figure out how to make it happen faster that would be great!
I think the process is long because chronyd is meant to make small adjustments over time. So when the VOXL boots up with a sys date as 1970, chronyd (even with makestep) doesnt work well.
I installed ntpd and ran it with the -q command to make that one large stepped correction when the modem is connected. chronyd.service starts only after ntpd -q completes and takes over to track and correct for time difference for the remainder of the flight.
Time taken from boot to openvpn connection is now about 1min 45s which is good enough for me.
-
@hmlow Great, thanks for looking into that!