Quick NTP Question
Posted: Wed Apr 12, 2017 9:30 am
Hey Gents, I had a quick and most likely, easy question. I finished setting up NTP on my NNA server, however I kept running into small roadblocks I cannot find answers to, or maybe just need explained to me.
I found several forums and a couple Nagios posts that helped me setup NTP. Many of these posts referenced using ntpq -d. In this post https://support.nagios.com/forum/viewto ... tpq#p53678 . When I run ntpq -d I get Name or service known.
To me, this gets weirder...I'll just post some code with questions:
This appears though it's working! However,
This says the daemon isn't working... Ok, I'll start it.
Started, let's try ntpstat:
It works too! Although, if I diagnose ntpd..This now looks like it's not working...
Above, we clearly saw it connected and synchronized.
[root@nagiosna ~]# traceroute 10.10.99.40
traceroute to 10.10.99.40 (10.10.99.40), 30 hops max, 60 byte packets
1 cafarodc1.cafaroco.com (10.10.99.40) 0.324 ms * *
[root@nagiosna ~]# grep 123 /etc/services
ntp 123/tcp
ntp 123/udp # Network Time Protocol
Can you explain to me how ntpd diagnose shows it working when the service is stopped, but it works when I stop the service? Also It is clearly connect to my ntp server but I cannot ntptrace to it? I apologize in advance for vomiting all of this information. I tried to get as much information as possible before posting. I am on CentOS 6. I am certain I just don't know what I'm doing and need help please
I also attached a putty log and my ntp.conf.
I found several forums and a couple Nagios posts that helped me setup NTP. Many of these posts referenced using ntpq -d. In this post https://support.nagios.com/forum/viewto ... tpq#p53678 . When I run ntpq -d I get Name or service known.
To me, this gets weirder...I'll just post some code with questions:
Code: Select all
[root@nagiosna ~]# ntpd -d
ntpd [email protected] Mon Feb 6 07:22:46 UTC 2017 (1)
12 Apr 10:04:52 ntpd[2265]: proto: precision = 0.110 usec
12 Apr 10:04:52 ntpd[2265]: 0.0.0.0 c01d 0d kern kernel time sync enabled
event at 0 0.0.0.0 c01d 0d kern kernel time sync enabled
Finished Parsing!!
restrict: op 1 addr 0.0.0.0 mask 0.0.0.0 mflags 00000000 flags 000005d0
restrict: op 1 addr :: mask 0.0.0.0 mflags 00000000 flags 000005d0
restrict: op 1 addr :: mask :: mflags 00000000 flags 000005d0
restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00000000 flags 0000000 0
restrict: op 1 addr ::1 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff mflags 0000 0000 flags 00000000
restrict: op 1 addr 10.10.99.36 mask 255.255.255.255 mflags 00000000 flags 00000 000
restrict: op 1 addr 10.10.99.0 mask 255.255.255.0 mflags 00000000 flags 00000000
restrict: op 1 addr 192.168.17.40 mask 255.255.255.255 mflags 00000000 flags 000 00000
12 Apr 10:04:52 ntpd[2265]: ntp_io: estimated max descriptors: 1024, initial soc ket boundary: 16
12 Apr 10:04:52 ntpd[2265]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
12 Apr 10:04:52 ntpd[2265]: Listen and drop on 1 v6wildcard :: UDP 123
12 Apr 10:04:52 ntpd[2265]: Listen normally on 2 lo 127.0.0.1 UDP 123
restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00003000 flags 0000000 1
12 Apr 10:04:52 ntpd[2265]: Listen normally on 3 eth0 10.10.99.36 UDP 123
restrict: op 1 addr 10.10.99.36 mask 255.255.255.255 mflags 00003000 flags 00000 001
12 Apr 10:04:52 ntpd[2265]: Listen normally on 4 lo ::1 UDP 123
restrict: op 1 addr ::1 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff mflags 0000 3000 flags 00000001
12 Apr 10:04:52 ntpd[2265]: Listen normally on 5 eth0 fe80::250:56ff:fe81:4e3f U DP 123
restrict: op 1 addr fe80::250:56ff:fe81:4e3f mask ffff:ffff:ffff:ffff:ffff:ffff: ffff:ffff mflags 00003000 flags 00000001
12 Apr 10:04:52 ntpd[2265]: Listening on routing socket on fd #22 for interface updates
key_expire: at 0 associd 44428
peer_clear: at 0 next 1 associd 44428 refid INIT
event at 0 10.10.99.40 8011 81 mobilize assoc 44428
newpeer: 10.10.99.36->10.10.99.40 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000
key_expire: at 0 associd 44429
peer_clear: at 0 next 2 associd 44429 refid INIT
event at 0 10.10.99.44 8011 81 mobilize assoc 44429
newpeer: 10.10.99.36->10.10.99.44 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000
key_expire: at 0 associd 44430
peer_clear: at 0 next 3 associd 44430 refid INIT
event at 0 192.168.17.40 8011 81 mobilize assoc 44430
newpeer: 10.10.99.36->192.168.17.40 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000
12 Apr 10:04:52 ntpd[2265]: 0.0.0.0 c016 06 restart
event at 0 0.0.0.0 c016 06 restart
12 Apr 10:04:52 ntpd[2265]: 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
event at 0 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
12 Apr 10:04:52 ntpd[2265]: 0.0.0.0 c011 01 freq_not_set
event at 0 0.0.0.0 c011 01 freq_not_set
transmit: at 1 10.10.99.36->10.10.99.40 mode 3 len 48
auth_agekeys: at 1 keys 1 expired 0
receive: at 1 10.10.99.36<-10.10.99.40 mode 4 len 48
event at 1 10.10.99.40 8024 84 reachable
clock_filter: n 1 off 0.011408 del 0.004754 dsp 7.945313 jit 0.000000
^C12 Apr 10:04:53 ntpd[2265]: ntpd exiting on signal 2Code: Select all
[root@nagiosna ~]# ntpstat
Unable to talk to NTP daemon. Is it running?Code: Select all
[root@nagiosna ~]# service ntpd start
Starting ntpd: [ OK ]Code: Select all
[root@nagiosna ~]# ntpstat
synchronised to NTP server (10.10.99.40) at stratum 4
time correct to within 1101 ms
polling server every 64 sCode: Select all
[root@nagiosna ~]# ntpstat
synchronised to NTP server (10.10.99.40) at stratum 4
time correct to within 1101 ms
polling server every 64 s
[root@nagiosna ~]# ntpd -d
ntpd [email protected] Mon Feb 6 07:22:46 UTC 2017 (1)
12 Apr 10:06:54 ntpd[2479]: proto: precision = 0.130 usec
12 Apr 10:06:54 ntpd[2479]: 0.0.0.0 c01d 0d kern kernel time sync enabled
event at 0 0.0.0.0 c01d 0d kern kernel time sync enabled
Finished Parsing!!
restrict: op 1 addr 0.0.0.0 mask 0.0.0.0 mflags 00000000 flags 000005d0
restrict: op 1 addr :: mask 0.0.0.0 mflags 00000000 flags 000005d0
restrict: op 1 addr :: mask :: mflags 00000000 flags 000005d0
restrict: op 1 addr 127.0.0.1 mask 255.255.255.255 mflags 00000000 flags 00000000
restrict: op 1 addr ::1 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff mflags 00000000 flags 00000000
restrict: op 1 addr 10.10.99.36 mask 255.255.255.255 mflags 00000000 flags 00000000
restrict: op 1 addr 10.10.99.0 mask 255.255.255.0 mflags 00000000 flags 00000000
restrict: op 1 addr 192.168.17.40 mask 255.255.255.255 mflags 00000000 flags 00000000
12 Apr 10:06:54 ntpd[2479]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
12 Apr 10:06:54 ntpd[2479]: unable to bind to wildcard address 0.0.0.0 - another process may be running - EXITINGCode: Select all
[root@nagiosna ~]# ntptrace 10.10.99.40
10.10.99.40: timed out, nothing received
***Request timed outCode: Select all
[root@nagiosna ~]# ntpq -p 10.10.99.40
10.10.99.40: timed out, nothing received
***Request timed outtraceroute to 10.10.99.40 (10.10.99.40), 30 hops max, 60 byte packets
1 cafarodc1.cafaroco.com (10.10.99.40) 0.324 ms * *
[root@nagiosna ~]# grep 123 /etc/services
ntp 123/tcp
ntp 123/udp # Network Time Protocol
Can you explain to me how ntpd diagnose shows it working when the service is stopped, but it works when I stop the service? Also It is clearly connect to my ntp server but I cannot ntptrace to it? I apologize in advance for vomiting all of this information. I tried to get as much information as possible before posting. I am on CentOS 6. I am certain I just don't know what I'm doing and need help please
I also attached a putty log and my ntp.conf.