davigre Posted January 23, 2016 Share Posted January 23, 2016 Scenario 1:[router]<--(ethernet)-->[pcDuino3] pcDuino3 IP: 192.168.1.5 root@pcduino3nano:~# dpkg-reconfigure tzdata Current default time zone: 'America/Bogota' Local time is now: Wed Dec 31 20:48:49 COT 1969. Universal Time is now: Thu Jan 1 01:48:49 UTC 1970. root@pcduino3nano:~# date Wed Dec 31 20:49:01 COT 1969 root@pcduino3nano:~# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== yak.osoal.org.n .INIT. 16 u - 64 0 0.000 0.000 0.000 bunny.zeroloop. .INIT. 16 u - 64 0 0.000 0.000 0.000 pfsense01.steam .INIT. 16 u - 64 0 0.000 0.000 0.000 strange.atfg.or .INIT. 16 u - 64 0 0.000 0.000 0.000 Scenario 2:[router]<--(wifi)-->[Desktop PC]<--(ethernet)(Internet Connection Sharing)-->[pcDuino3] pcDuino3 IP: 192.168.137.28 desktop IP: 192.168.1.48 root@pcduino3nano:~# dpkg-reconfigure tzdata Current default time zone: 'America/Bogota' Local time is now: Fri Jan 22 19:29:53 COT 2016. Universal Time is now: Sat Jan 23 00:29:53 UTC 2016. root@pcduino3nano:~# date Fri Jan 22 19:30:00 COT 2016 root@pcduino3nano:~# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== clock.trit.net 198.60.22.240 2 u 15 64 1 147.790 8.179 3.518 198.60.22.240 .GPS. 1 u 14 64 1 113.789 -7.578 1.451 alta.fancube.co 173.34.166.174 2 u 13 64 1 163.642 -1.537 1.701 www.mindstudios 145.238.203.14 2 u 12 64 1 179.211 -3.671 3.452 Note that in scenario 1 the pcDuino don't get the correct date. I use the scenario 2 to configure the pcDuino3 but I need that pcDuino3 get the correct date in scenario 1. pcDuino iptables rules: root@pcduino3nano:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination root@pcduino3nano:~# Thank's. Link to comment Share on other sites More sharing options...
zador.blood.stained Posted January 23, 2016 Share Posted January 23, 2016 In the first log your (initial) date is around 1969-1970, in the second log your date is around 2016. You may be experiencing this issue if you recently upgraded your kernel, so you need to install "fake-hwclock" package. Link to comment Share on other sites More sharing options...
davigre Posted January 24, 2016 Author Share Posted January 24, 2016 No previous upgrade of any kind, original 'http://mirror.igorpecovnik.com/Armbian_4.5_Pcduino3nano_Debian_jessie_4.2.3.zip'image installed. I do 3 things: 1. Install a ntp client/server in my router. 2. Update system: apt-get update apt-get upgrade Start-Date: 2016-01-22 21:11:01 Commandline: apt-get upgrade Upgrade: libgssapi-krb5-2:armhf (1.12.1+dfsg-19, 1.12.1+dfsg-19+deb8u1), tzdata:armhf (2015f-0+deb8u1, 2015g-0+deb8u1), libdpkg-perl:armhf (1.17.25, 1.17.26), perl-modules:armhf (5.20.2-3+deb8u1, 5.20.2-3+deb8u2), libirs-export91:armhf (9.9.5.dfsg-9+deb8u2, 9.9.5.dfsg-9+deb8u5), libkrb5-3:armhf (1.12.1+dfsg-19, 1.12.1+dfsg-19+deb8u1), libk5crypto3:armhf (1.12.1+dfsg-19, 1.12.1+dfsg-19+deb8u1), subversion:armhf (1.8.10-6+deb8u1, 1.8.10-6+deb8u2), perl:armhf (5.20.2-3+deb8u1, 5.20.2-3+deb8u2), libdns-export100:armhf (9.9.5.dfsg-9+deb8u2, 9.9.5.dfsg-9+deb8u5), libxml2:armhf (2.9.1+dfsg1-5, 2.9.1+dfsg1-5+deb8u1), fuse:armhf (2.9.3-15+deb8u1, 2.9.3-15+deb8u2), linux-image-next-sunxi:armhf (4.5, 4.81), dpkg:armhf (1.17.25, 1.17.26), libssl-dev:armhf (1.0.1k-3+deb8u1, 1.0.1k-3+deb8u2), linux-headers-next-sunxi:armhf (4.5, 4.81), openssh-sftp-server:armhf (6.7p1-5, 6.7p1-5+deb8u1), dpkg-dev:armhf (1.17.25, 1.17.26), libpng12-0:armhf (1.2.50-2+b2, 1.2.50-2+deb8u2), sudo:armhf (1.8.10p3-1+deb8u2, 1.8.10p3-1+deb8u3), openssh-server:armhf (6.7p1-5, 6.7p1-5+deb8u1), isc-dhcp-client:armhf (4.3.1-6, 4.3.1-6+deb8u2), libisc-export95:armhf (9.9.5.dfsg-9+deb8u2, 9.9.5.dfsg-9+deb8u5), libssl-doc:armhf (1.0.1k-3+deb8u1, 1.0.1k-3+deb8u2), libkrb5support0:armhf (1.12.1+dfsg-19, 1.12.1+dfsg-19+deb8u1), libfuse2:armhf (2.9.3-15+deb8u1, 2.9.3-15+deb8u2), linux-jessie-root-next-pcduino3nano:armhf (4.5, 4.81), perl-base:armhf (5.20.2-3+deb8u1, 5.20.2-3+deb8u2), ntp:armhf (4.2.6.p5+dfsg-7, 4.2.6.p5+dfsg-7+deb8u1), openssl:armhf (1.0.1k-3+deb8u1, 1.0.1k-3+deb8u2), linux-libc-dev:armhf (3.16.7-ckt11-1+deb8u4, 3.16.7-ckt20-1+deb8u3), linux-dtb-next-sunxi:armhf (4.5, 4.81), openssh-client:armhf (6.7p1-5, 6.7p1-5+deb8u1), unzip:armhf (6.0-16, 6.0-16+deb8u2), mysql-common:armhf (5.5.44-0+deb8u1, 5.5.46-0+deb8u1), git:armhf (2.1.4-2.1, 2.1.4-2.1+deb8u1), libicu52:armhf (52.1-8+deb8u2, 52.1-8+deb8u3), libmysqlclient18:armhf (5.5.44-0+deb8u1, 5.5.46-0+deb8u1), libisccfg-export90:armhf (9.9.5.dfsg-9+deb8u2, 9.9.5.dfsg-9+deb8u5), isc-dhcp-common:armhf (4.3.1-6, 4.3.1-6+deb8u2), wpasupplicant:armhf (2.3-1+deb8u1, 2.3-1+deb8u3), linux-firmware-image-next-sunxi:armhf (4.5, 4.81), libssl1.0.0:armhf (1.0.1k-3+deb8u1, 1.0.1k-3+deb8u2), libsvn1:armhf (1.8.10-6+deb8u1, 1.8.10-6+deb8u2), git-man:armhf (2.1.4-2.1, 2.1.4-2.1+deb8u1) End-Date: 2016-01-22 21:26:47 Note 'tzdata' package update. 3. Change the following lines in '/etc/ntp.conf' #server 0.debian.pool.ntp.org iburst #server 1.debian.pool.ntp.org iburst #server 2.debian.pool.ntp.org iburst #server 3.debian.pool.ntp.org iburst server 192.168.1.1 And now... root@pcduino3nano:~# dpkg-reconfigure tzdata Current default time zone: 'America/Bogota' Local time is now: Sun Jan 24 09:49:21 COT 2016. Universal Time is now: Sun Jan 24 14:49:21 UTC 2016. root@pcduino3nano:~# date Sun Jan 24 09:49:28 COT 2016 root@pcduino3nano:~# ntpq -p localhost: timed out, nothing received ***Request timed out root@pcduino3nano:~# Now it works. But to prove it was the 'upgrade process' I unmade the '/etc/ntp.conf' changes: server 0.debian.pool.ntp.org iburst server 1.debian.pool.ntp.org iburst server 2.debian.pool.ntp.org iburst server 3.debian.pool.ntp.org iburst #server 192.168.1.1 and also work, but can't understand why 'ntpq -p' command fails now: root@pcduino3nano:/var/log/ntpstats# ntpq -p localhost: timed out, nothing received ***Request timed out root@pcduino3nano:/var/log/ntpstats# Thank's. Update: This solution that appears to work really was a fail. As soon as pcDuino disconnect from energy source it refuses to update time again. I think that is not logical that a package can repair the problem, remember that in scenario 2 the date is updated correctly. ideas? Link to comment Share on other sites More sharing options...
davigre Posted May 10, 2016 Author Share Posted May 10, 2016 Finally make it work: I install 'ntpdupd' deprecated command, but this command achieve the date update at boot: First remove 'ntpd' (To prevent conflict): sudo apt-get remove ntp Then install 'ntpdate' sudo apt-get install ntpdate Run command (need -u option): ntpdate -u pool.ntp.org Repair default ntpdate option so it works at boot: On file /etc/default/ntpdate change the line NTPOPTIONS="" to NTPOPTIONS="-u" . And add this lines on file /etc/network/if-up.d/ntpdate : (To prevent double execution) PATH=/sbin:/bin:/usr/sbin:/usr/bin if [ "$IFACE" != eth0 ]; then exit 0 fi Link to comment Share on other sites More sharing options...
Recommended Posts