Author Topic: NTP Not Working Only Polls Time Server Once  (Read 1052 times)

0 Members and 1 Guest are viewing this topic.

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 210
    • Woodmar Weather
NTP Not Working Only Polls Time Server Once
« on: October 20, 2023, 10:21:08 AM »
I notice that NTP works once at save then never runs again.
I've tried changing the interval to as low as 30 minutes.
I see this as I run chronyd as my source for all LAN devices that need time.
While everything else polls the time server regularly, my WiFiLogger2 does not.
Currently it is set for 30 minute update (was 60 minute) and last polled the server 37 hours ago. That is when I changed the polling interval as I saw it had not polled the server in over 90 days.
If I change the interval and save, it does poll the server, but never again.

I'm on 2.42

Any ideas?
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5523
    • KomokaWeather
Re: NTP Not Working Only Polls Time Server Once
« Reply #1 on: October 20, 2023, 01:17:17 PM »
Hi,
I am not very familiar with this but my settings are:
NTP Settings

NTP Server:   pool.ntp.org
Update:   720  minutes (0=disable)

and Network Information (I have set Auto reboot time as 7:02
Station Time:   2023-10-20 1:08:36 p.m.
NTP Time:   2023-10-20 1:08:49 p.m.
Last sync:   2023-10-20 7:02:38 a.m.
Uptime:   0 days 6:6:14
Last boot:   2023-10-20 7:02:38 a.m.

and station time and NTP time update every few seconds

What is your station name on Real Time Data wifilogger.net ?

Enjoy,
Paul
« Last Edit: October 20, 2023, 01:19:21 PM by PaulMy »

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 210
    • Woodmar Weather
Re: NTP Not Working Only Polls Time Server Once
« Reply #2 on: October 21, 2023, 05:19:00 PM »
I don't think yours is working either.
The Station and NTP time are 'running' but are just a clock reading.
The Last sync is what I'm after. That is when the device polls the NTP server for the correct/exact time.

That is also strange as it doesn't actually sync to the server. There must be an amount of time the logger has to be 'off' the NTP server time to do the time setting.

Yours is off by 13 seconds about 5 hours after it 'synced' to the NTP server.
Mine is 4 seconds off after about a day.

The fact that you are rebooting the logger daily means you'd have to look 12 hours after the reboot to see if the Last sync time changes.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 210
    • Woodmar Weather
Re: NTP Not Working Only Polls Time Server Once
« Reply #3 on: October 25, 2023, 06:16:25 PM »
So, it is the fact that I have WeeWX running that stops NTP from syncing.
Sometimes the connect makes it, normally it doesn't.

No problem, working as designed.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline thehay95

  • Member
  • *
  • Posts: 1
Re: NTP Not Working Only Polls Time Server Once
« Reply #4 on: November 29, 2023, 06:20:20 PM »
Ensure that your WiFiLogger2 device has consistent and stable network connectivity. Network issues can sometimes disrupt the NTP synchronization process.

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 210
    • Woodmar Weather
Re: NTP Not Working Only Polls Time Server Once
« Reply #5 on: November 29, 2023, 06:21:44 PM »
No, this was due to the connection to WeeWX.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline WiFiLogger

  • Forecaster
  • *****
  • Posts: 733
Re: NTP Not Working Only Polls Time Server Once
« Reply #6 on: February 28, 2024, 06:54:17 AM »
No, this was due to the connection to WeeWX.

When a program initiates transmission on TCP port 22222, a direct tunnel is created between the PC software and the Davis console. This is a Point-to-Point mechanism, which is natural for RS232, USB connections for which the Davis console was designed. Software such as Cumulus, WeeWX, and especially WeatherLink PC, do not tolerate interruptions in transmission. Therefore, the tunnel is sacred and must not be interrupted. For example, a 5-minute software update for the console could be conducted through the same tunnel based on a TCP connection on port 22222, and no one would want to interrupt this process with other functions.

The NTP mechanism exists mainly to check if the clock on the console is correct. We all know that after a power outage, the clock in the VP2 console does not set itself. However, when the WiFilogger reaches the expected time to check the VP2 console clocks via NTP, and the TCP22222 tunnel is in use, due to the sanctity of the TCP tunnel, the NTP procedure is abandoned.