but doing:
sudo service ntp stop
sudo ntpdate -s time.nist.gov
sudo service ntp start
does not correctly set up the time. So doing the manual ntpdate does not work.
Starting Nmap 6.40 ( http://nmap.org ) at 2016-02-25 16:45 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000068s latency).
PORT STATE SERVICE
123/udp closed ntp
yes, ntpd is installed @linuxdev the problem is that ntpd -gq does not work even manually from the console, it just hangs silently, this is the syslog :
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: ntpd 4.2.6p5@1.2349-o Wed Oct 9 18:59:40 UTC 2013 (1)
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: proto: precision = 0.500 usec
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: Listen and drop on 1 v6wildcard :: UDP 123
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: Listen normally on 2 lo 127.0.0.1 UDP 123
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: Listen normally on 3 eth0 172.21.0.83 UDP 123
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: Listen normally on 4 lo ::1 UDP 123
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: Listen normally on 5 eth0 fe80::204:4bff:fe3a:db6d UDP 123
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: peers refreshed
Feb 20 09:33:48 tegra-ubuntu ntpd[3002]: Listening on routing socket on fd #22 for interface updates
Feb 20 09:33:56 tegra-ubuntu kernel: [ 4528.014825] Timed out waiting for pll_m lock bit ([0x90] = 0x44004d01)
Feb 20 09:33:58 tegra-ubuntu kernel: [ 4529.983538] Timed out waiting for pll_m lock bit ([0x90] = 0x44004d01)
Feb 20 09:33:59 tegra-ubuntu kernel: [ 4531.108547] Timed out waiting for pll_m lock bit ([0x90] = 0x44004d01)
Feb 20 09:33:59 tegra-ubuntu kernel: [ 4531.249190] Timed out waiting for pll_m lock bit ([0x90] = 0x44004d01)
Feb 20 09:34:11 tegra-ubuntu kernel: [ 4542.885520] Timed out waiting for pll_m lock bit ([0x90] = 0x44004d01)
Feb 20 09:34:12 tegra-ubuntu kernel: [ 4544.151141] Timed out waiting for pll_m lock bit ([0x90] = 0x44004d01)
Re-reading your original post, it sounds like your Jetson is not finding the external NTP server “time.nist.gov”
You say it is at IP address 128.138.141.172
Can you ping it successfully ?
You say your laptop updates the time correctly - but this could be due to a battery backed RTC.
You could try changing the time on your laptop and see if the time corrects itself after waiting many minutes (try 15min).
You can check the RTC time with
sudo hwclock --show
(FYI the Jetson RTC does not have a battery attached).
I think your issue is likely to be finding an external NTP server and configuring the Jetson to use it. Does the default “ubuntu.pool.ntp.org” work?
Failing that, install ntpd on another machine and configure the Jetson to use it for ntp, the ntpd can also act as a ntp local server.
In addition to what @GE_Chen said, note that DHCP can set up an IP address correctly, yet DNS can still fail setup…which would cause ntpd to fail when trying to reach a named address (versus the dotted-decimal address mentioned by @GE_Chen). There are other things of course, but I’m now also very curious about ping to the address he gave. The original script I noted with the “sleep” is actually to give DNS an extra second to be added to routing setup (which was not trying to deal with route failure so much as it was dealing with the simple mechanics of how route can be a laggy remote network response when first set up).
Thanks
yes, I can ping it ok.
ping 128.138.141.172
PING 128.138.141.172 (128.138.141.172) 56(84) bytes of data.
64 bytes from 128.138.141.172: icmp_seq=1 ttl=46 time=166 ms
64 bytes from 128.138.141.172: icmp_seq=2 ttl=46 time=166 ms
64 bytes from 128.138.141.172: icmp_seq=3 ttl=46 time=167 ms
ping 0.ubuntu.pool.ntp.org
PING 0.ubuntu.pool.ntp.org (193.145.15.15) 56(84) bytes of data.
64 bytes from ntp.redimadrid.es (193.145.15.15): icmp_seq=1 ttl=57 time=9.94 ms
64 bytes from ntp.redimadrid.es (193.145.15.15): icmp_seq=2 ttl=57 time=9.73 ms
strangely port 123 seems to be open/closed intermittently, in two subsequent nmaps I get:
sudo nmap -p123 -sU -P0 localhost
[sudo] password for ubuntu:
Starting Nmap 6.40 ( http://nmap.org ) at 2016-02-29 09:32 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00011s latency).
PORT STATE SERVICE
123/udp open ntp
sudo nmap -p123 -sU -P0 localhost
Starting Nmap 6.40 ( http://nmap.org ) at 2016-02-29 09:37 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000063s latency).
PORT STATE SERVICE
123/udp closed ntp
Nmap done: 1 IP address (1 host up) scanned in 1.16 seconds
I might check today from the home network to see if it works there.
I’m having issues with the forum software, so the short answer is that you have your dotted-decimal address correctly assigned by DHCP, but named addresses fail lookup…this is the DNS which needs further setup.