Jump to content


Photo

NTP force sync option


  • Please log in to reply
45 replies to this topic

#1 Pr2

  • PLi® Contributor
  • 6,070 posts

+257
Excellent

Posted 22 July 2021 - 19:37

Hi,

 

I have started a box without any DVB cable nor network cable connected to it.

So the box start in 1/1/1970 (which is normal) then I realized that I didn't connect the network so I plug the network cable in. Time in the box remains in 1970 so I perform a network test and it was fine.

I them go into the set timezone menu in OpenPLi but i could not find any way to force a new NTP sync.

 

Menu > Parameters > System > GUI parameter > Timezone

 

Would be nice to have a button there to force a NTP sync (for example press Yellow will force a NTP timesync).

 

My only solution was to reboot the box to have time taken from the NTP at boot.

 

Pr2

 

 

 

 

 


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: NTP force sync option #2 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 22 July 2021 - 19:54

That shouldn't be the case, perhaps you're missing something due to long time updates or auto restores?

 

You should have:

lrwxrwxrwx    1 root     root            21 Jul 14 12:55 /etc/network/if-up.d/ntpdate-sync -> /usr/bin/ntpdate-sync

which should do an ntpdate sync as soon as the network goes up;

-rw-r--r--    1 root     root           158 Jul  5 13:14 /etc/default/ntpdate

which contains the default ntp server to sync with, and;

-rw-r--r--    1 root     root            43 Jul 13 19:54 /var/spool/cron/root

containing

30 * * * *    /usr/bin/ntpdate-sync silent

which keeps the time in sync by updating every 30 minutes.

 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: NTP force sync option #3 Pr2

  • PLi® Contributor
  • 6,070 posts

+257
Excellent

Posted 23 July 2021 - 19:32

Hi,
 
The box is clean it was flashed the 11 july and update online, yesterday.
No autorestore at all just install autobouquet maker to create favorite for testing.
 
The test box is the Qviart lunix 4K. I can reproduce the problem, here are evidence that the box is running without the correct time.
 
 
openpli develop lunix4k 

lunix4k login: root
root@lunix4k:~# uptime
01:10:04 up 9 min,  load average: 0.91, 0.79, 0.43
root@lunix4k:~# date
Thu Jan  1 01:10:06 CET 1970
root@lunix4k:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 0C:C6:AC:02:F4:52   
         inet addr:192.168.31.111  Bcast:192.168.31.255  Mask:255.255.255.0
         inet6 addr: fe80::ec6:acff:fe02:f452/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:566 errors:0 dropped:1 overruns:0 frame:0
         TX packets:173 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000  
         RX bytes:108338 (105.7 KiB)  TX bytes:23774 (23.2 KiB)

lo        Link encap:Local Loopback   
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:65536  Metric:1
         RX packets:2 errors:0 dropped:0 overruns:0 frame:0
         TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0  
         RX bytes:140 (140.0 B)  TX bytes:140 (140.0 B)

root@lunix4k:~# crontab -l
crontab: can't open 'root': No such file or directory
root@lunix4k:~# cat /var/spool/cron/root
30 * * * *    /usr/bin/ntpdate-sync silent
root@lunix4k:~# ls /etc/default/ntpdate  
/etc/default/ntpdate
root@lunix4k:~# ls /etc/network/if-up.d/ntpdate-sync
/etc/network/if-up.d/ntpdate-sync

root@lunix4k:~# date
Thu Jan  1 01:15:22 CET 1970
root@lunix4k:~# uptime
 01:15:27 up 15 min,  load average: 0.81, 0.85, 0.57
 

Edited by Pr2, 23 July 2021 - 19:33.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: NTP force sync option #4 Pr2

  • PLi® Contributor
  • 6,070 posts

+257
Excellent

Posted 23 July 2021 - 19:37

Then I start manually the command that should be launched on network status change and it works because I launch it from the command line.
 
root@lunix4k:~# /usr/bin/ntpdate-sync
root@lunix4k:~# date
Thu Jan  1 01:17:01 CET 1970
root@lunix4k:~# date
Fri Jul 23 20:34:31 CEST 2021
So the command is working but it seems that the script is not launched when the network became up with pluging in the network cable.

It is nice to try to setup something automatic but I am still convinced that adding a Yellow button to force NTP sync is needed to easily work-around such situation.

Edited by Pr2, 23 July 2021 - 19:38.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: NTP force sync option #5 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 23 July 2021 - 21:22

Maybe, but unrelated to why it doesn't work.

 

Does this

/etc/network/if-up.d/ntpdate-sync -> /usr/bin/ntpdate-sync

symlink exist?

 

Can you add some debug logging to it, so we can check if it is called? And if ifconfig shows an IP at that point?

 

Also, I need to update crontab I see, it's looking in the wrong location.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: NTP force sync option #6 Pr2

  • PLi® Contributor
  • 6,070 posts

+257
Excellent

Posted 24 July 2021 - 10:38

Hi,
 
Yes it exists:
 
 
ls -Falh /etc/network/if-up.d/ntpdate-sync
lrwxrwxrwx    1 root     root          21 Jan  1  1970 /etc/network/if-up.d/ntpdate-sync -> /usr/bin/ntpdate-sync*
I will take a log later on.

Edited by Pr2, 24 July 2021 - 10:39.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: NTP force sync option #7 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 24 July 2021 - 13:16

...but I am still convinced that adding a Yellow button to force NTP sync is needed to easily work-around such situation.

 

 

 

Me too....

 

Old time-sync plugin had  a "sync now" button 


Enigma is getting old....

 

Spoiler

Re: NTP force sync option #8 jort38

  • Senior Member
  • 644 posts

+8
Neutral

Posted 24 July 2021 - 13:19

...but I am still convinced that adding a Yellow button to force NTP sync is needed to easily work-around such situation.

 
 
Me too....
 
Old time-sync plugin had  a "sync now" button
Still has: third from bottom

Vu+ Ultimo 4K (4 TB HD, DVBS FSB, DVBC FBC & OpenPli 9),

Xtrend ET10000 (1 DVBS works via ethernet & OpenPli 9),

Xtrend ET10000 (DVBT2 & OpenPli 9, located in Thailand). Only latest stable releases.

Xtrend ET10000 (works via ethernet & OpenPli 9) and

Xtrend ET8000 (1 TB HD, 1 DVBT2 & works via ethernet & OpenPli 9)


Re: NTP force sync option #9 Pr2

  • PLi® Contributor
  • 6,070 posts

+257
Excellent

Posted 24 July 2021 - 13:27

 

 

...but I am still convinced that adding a Yellow button to force NTP sync is needed to easily work-around such situation.

 
 
Me too....
 
Old time-sync plugin had  a "sync now" button
Still has: third from bottom

 

 

There is no more needs for a 3rd party tools to have NTP support so please show us a screenshot where you can force a NTP sync in OpenPLi? I guess you are still refering to the systemtime plugin which is not installed in OpenPLi develop since it is no longer needed.


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: NTP force sync option #10 jort38

  • Senior Member
  • 644 posts

+8
Neutral

Posted 24 July 2021 - 13:31

...but I am still convinced that adding a Yellow button to force NTP sync is needed to easily work-around such situation.

 
 
Me too....
 
Old time-sync plugin had  a "sync now" button
Still has: third from bottom
 
There is no more needs for a 3rd party tools to have NTP support so please show us a screenshot where you can force a NTP sync in OpenPLi? I guess you are still refering to the systemtime plugin which is not installed in OpenPLi develop since it is no longer needed.

Sorry, this topic is about the test version. I responded about release 8.0 version.
My bad.

Vu+ Ultimo 4K (4 TB HD, DVBS FSB, DVBC FBC & OpenPli 9),

Xtrend ET10000 (1 DVBS works via ethernet & OpenPli 9),

Xtrend ET10000 (DVBT2 & OpenPli 9, located in Thailand). Only latest stable releases.

Xtrend ET10000 (works via ethernet & OpenPli 9) and

Xtrend ET8000 (1 TB HD, 1 DVBT2 & works via ethernet & OpenPli 9)


Re: NTP force sync option #11 el bandido

  • Senior Member
  • 363 posts

+13
Neutral

Posted 24 July 2021 - 14:31

Adding a new WLAN device caused ntp to quit working. Internet is still working on the second WLAN device. A reboot does not help.

 

 

 

 



Re: NTP force sync option #12 el bandido

  • Senior Member
  • 363 posts

+13
Neutral

Posted 24 July 2021 - 14:31

Adding a new WLAN device caused ntp to quit working. Internet is still working on the second WLAN device. A reboot does not help.

 

 

 

 

Attached Files



Re: NTP force sync option #13 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 24 July 2021 - 14:46

Shouldn't make any difference with regards to running ntpdate-sync or the if-up scripts.

 

It could be a problem if the interface is "half up" and has broken IP routing, for example by overriding or erasing the default gateway.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: NTP force sync option #14 Rudi1

  • Senior Member
  • 162 posts

+1
Neutral

Posted 15 August 2021 - 21:41

This new system time still not work correct.Today I flash latest version and start box with working network  and with iptv channel only but time is not update

only when I swith to satellite channel the time is updated.


VU+Zero

Osmio4K


Re: NTP force sync option #15 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 16 August 2021 - 02:42

Assuming "latest version" is the latest nightly build: did you restore an autobackup?

 

Can you reboot the box, and tell me what the output is of:

cat /etc/default/ntpdate
ls -l /etc/network/if-up.d/
ls -l /usr/bin/ntp*
ls -l /usr/sbin/ntp*
grep ntp /var/log/messages

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: NTP force sync option #16 Rudi1

  • Senior Member
  • 162 posts

+1
Neutral

Posted 16 August 2021 - 07:26

yes,is the latest nightly build.

openpli develop osmio4k

osmio4k login: root
Password:
Last login: Thu Jan  1 01:12:19 CET 1970 on pts/0
root@osmio4k:~# cat /etc/default/ntpdate
# Configuration script used by ntpdate-sync script



NTPSERVERS="pool.ntp.org"

# Set to "yes" to write time to hardware clock on success
UPDATE_HWCLOCK="no"

root@osmio4k:~# ls -l /etc/network/if-up.d/
lrwxrwxrwx    1 root     root            21 Aug 14  2021 ntpdate-sync -> /usr/bin/ntpdate-sync
lrwxrwxrwx    1 root     root            32 Aug 14  2021 wpa-supplicant -> ../../wpa_supplicant/ifupdown.sh
root@osmio4k:~# ls -l /usr/bin/ntp*
-rwxr-xr-x    1 root     root          1117 Aug  3  2021 /usr/bin/ntpdate-sync
root@osmio4k:~# ls -l /usr/sbin/ntp*
lrwxrwxrwx    1 root     root            19 Aug 14  2021 /usr/sbin/ntpd -> /bin/busybox.nosuid
-rwxr-xr-x    1 root     root        133092 Aug  3  2021 /usr/sbin/ntpdate
root@osmio4k:~# grep ntp /var/log/messages
Jan  1 01:00:22 osmio4k user.info kernel: Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Aug 16 08:09:43 osmio4k daemon.notice ntpdate[582]: step time server 89.212.9.180 offset 1629094155.884915 sec
root@osmio4k:~#


Edited by Rudi1, 16 August 2021 - 07:28.

VU+Zero

Osmio4K


Re: NTP force sync option #17 Pr2

  • PLi® Contributor
  • 6,070 posts

+257
Excellent

Posted 16 August 2021 - 09:21

Hi,
 
I also have a strange feeling with the network access after a fresh flash (it also seems to me that the network is not always started).
Since I have some doubt, I go into the Expert menu - Network and perform a network test and then everything is successful.
 
Ensure that you didn't install the old system time plugin (I think it should be removed from the feed if possible) because people doing an autorestore can perhaps have it re-installed automatically.
 
So after you flash are you still able to connect to the box in ssh or telnet?
you can check in the About screen the IP address received by the box.
 
Can you try in command line:
 
 
 nslookup ntp.pool.org
Can you also test this because I find it in the NTP startup script so if the returned value is wrong then NTP won't work.

grep "config.ntp.server" /etc/enigma2/settings | cut -d"=" -f 2

Edited by Pr2, 16 August 2021 - 09:24.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: NTP force sync option #18 Dimitrij

  • PLi® Core member
  • 9,992 posts

+338
Excellent

Posted 16 August 2021 - 10:12

 

Ensure that you didn't install the old system time plugin (I think it should be removed from the feed if possible) because people doing an autorestore can perhaps have it re-installed automatically.

system time plugin use auto start ntpdate only manual save this setting.


Edited by Dimitrij, 16 August 2021 - 10:12.

GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: NTP force sync option #19 Rudi1

  • Senior Member
  • 162 posts

+1
Neutral

Posted 16 August 2021 - 12:45

I didn't install any plugin and I can access to the box(ftp,telnet,web..)After several hours the time is still at 1970.

openpli develop osmio4k

osmio4k login: root
Password:
Last login: Thu Jan  1 01:13:59 CET 1970 on pts/0
root@osmio4k:~#  nslookup ntp.pool.org
Server:         192.168.88.1
Address:        192.168.88.1:53

Non-authoritative answer:
Name:   ntp.pool.org
Address: 64.99.80.121

Non-authoritative answer:

root@osmio4k:~#

after this command nothing happend

root@osmio4k:~# grep "config.ntp.server" /etc/enigma2/settings | cut -d"=" -f 2
root@osmio4k:~#


 

 


VU+Zero

Osmio4K


Re: NTP force sync option #20 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 16 August 2021 - 13:13

root@osmio4k:~# grep ntp /var/log/messages
Jan  1 01:00:22 osmio4k user.info kernel: Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Aug 16 08:09:43 osmio4k daemon.notice ntpdate[582]: step time server 89.212.9.180 offset 1629094155.884915 sec
root@osmio4k:~#

 

This clearly shows that it did call ntpdate when the network became live, and it did set the correct date?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users