tetrapod Posted March 24, 2021 Share Posted March 24, 2021 I noticed that the time on the server was way of and have been playing with the date & time settings. I have since server start been on default with using NTP and the servers set to time*.google.com If I change the Time Zone the time on the server will change relative to what the (wrong) current time is. I can choose to not use NTP and set a new time. If I then switch back to NTP my new time will not change, no matter if I have set it to correct time local time with correct Time Zone or set it totally wrong. I have tried entering different time servers with no change in behavior and I have tested that I can ping the servers from the terminal. Any ideas? Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 NTP still doesn't work. Anyone having an idea regarding this? I installed a Ubuntu VM on the Unraid server and now set default NTP server to time.google.com on both of them. On Ubuntu VM time is set, on Unraid not. As I described I can set the time manually, but I like NTP to work. Quote Link to comment
Vr2Io Posted April 30, 2021 Share Posted April 30, 2021 (edited) Does plugin update work, it indicate internet traffic accessible or not. 50 minutes ago, tetrapod said: On Ubuntu VM time is set, on Unraid not. This normal, you are update the time in VM. Edited April 30, 2021 by Vr2Io Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 I stopped the service and started it again with higher log level. Can the bind error be a clue? https://pastebin.com/g2dV3p9T Quote Link to comment
Vr2Io Posted April 30, 2021 Share Posted April 30, 2021 7 minutes ago, tetrapod said: I stopped the service and started it again with higher log level. Can the bind error be a clue? https://pastebin.com/g2dV3p9T Could you post the message here instead extra link Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 (edited) At the time of this test the server clock was som 9 minutes ahead /usr/sbin/ntpd -gd -u ntp:ntp 30 Apr 12:20:06 ntpd[11200]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting 30 Apr 12:20:06 ntpd[11200]: Command line: /usr/sbin/ntpd -gd -u ntp:ntp 30 Apr 12:20:06 ntpd[11200]: ---------------------------------------------------- 30 Apr 12:20:06 ntpd[11200]: ntp-4 is maintained by Network Time Foundation, 30 Apr 12:20:06 ntpd[11200]: Inc. (NTF), a non-profit 501(c)(3) public-benefit 30 Apr 12:20:06 ntpd[11200]: corporation. Support and training for ntp-4 are 30 Apr 12:20:06 ntpd[11200]: available at https://www.nwtime.org/support 30 Apr 12:20:06 ntpd[11200]: ---------------------------------------------------- 30 Apr 12:20:06 ntpd[11200]: proto: precision = 0.090 usec (-23) Finished Parsing!! 30 Apr 12:20:06 ntpd[11200]: basedate set to 2020-10-08 30 Apr 12:20:06 ntpd[11200]: gps base set to 2020-10-11 (week 2127) hack_restrict: op RESTRICT_FLAGS addr 0.0.0.0 mask 0.0.0.0 ippeerlimit -1 mflags 00000000 rflags 00000bd0 hack_restrict: op RESTRICT_FLAGS addr :: mask :: ippeerlimit -1 mflags 00000000 rflags 00000bd0 hack_restrict: op RESTRICT_FLAGS addr :: mask :: ippeerlimit -1 mflags 00000000 rflags 00000bd0 hack_restrict: op RESTRICT_FLAGS addr 127.0.0.1 mask 255.255.255.255 ippeerlimit -1 mflags 00000000 rflags 00000000 hack_restrict: op RESTRICT_FLAGS addr ::1 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ippeerlimit -1 mflags 00000000 rflags 00000000 move_fd: estimated max descriptors: 40960, initial socket boundary: 16 30 Apr 12:20:06 ntpd[11200]: bind(16) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use 30 Apr 12:20:06 ntpd[11200]: unable to create socket on lo (0) for 127.0.0.1#123 30 Apr 12:20:06 ntpd[11200]: failed to init interface for address 127.0.0.1 30 Apr 12:20:06 ntpd[11200]: bind(16) AF_INET6 ::1#123 flags 0x5 failed: Address already in use 30 Apr 12:20:06 ntpd[11200]: unable to create socket on lo (1) for ::1#123 30 Apr 12:20:06 ntpd[11200]: failed to init interface for address ::1 30 Apr 12:20:06 ntpd[11200]: Listening on routing socket on fd #16 for interface updates newpeer(127.127.1.0) - ippeerlimit -1 ignored key_expire: at 0 associd 17054 peer_clear: at 0 next 1 associd 17054 refid INIT event at 0 LOCAL(0) 8011 81 mobilize assoc 17054 newpeer: <null>->127.127.1.0 mode 3 vers 4 poll 6 6 flags 0x9 0x1 ttl 0 key 00000000 newpeer(192.168.178.1) - ippeerlimit -1 ignored key_expire: at 0 associd 17055 peer_clear: at 0 next 2 associd 17055 refid INIT event at 0 192.168.178.1 8011 81 mobilize assoc 17055 newpeer: <null>->192.168.178.1 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000 kernel loop status 0x2041 (Clock Unsynchronized) 30 Apr 12:20:06 ntpd[11200]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized event at 0 0.0.0.0 c01d 0d kern kernel time sync enabled kernel loop status 0x2041 (Clock Unsynchronized) 30 Apr 12:20:06 ntpd[11200]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized event at 0 0.0.0.0 c012 02 freq_set kernel 0.000 PPM event at 0 0.0.0.0 c011 01 freq_not_set event at 0 0.0.0.0 c016 06 restart peer_name_resolved(time.google.com) rescode 0 newpeer(216.239.35.0) - ippeerlimit -1 ignored key_expire: at 0 associd 17056 peer_clear: at 0 next 3 associd 17056 refid INIT event at 0 216.239.35.0 8011 81 mobilize assoc 17056 newpeer: <null>->216.239.35.0 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000 peer_name_resolved(ntp.pool.org) rescode 0 newpeer(64.99.80.121) - ippeerlimit -1 ignored key_expire: at 0 associd 17057 peer_clear: at 0 next 0 associd 17057 refid INIT event at 0 64.99.80.121 8011 81 mobilize assoc 17057 newpeer: <null>->64.99.80.121 mode 3 vers 4 poll 6 10 flags 0x101 0x1 ttl 0 key 00000000 refclock_transmit: at 1 127.127.1.0 refclock_receive: at 1 127.127.1.0 event at 1 LOCAL(0) 8014 84 reachable refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 1 off 0.000000 del 0.000000 dsp 7.937500 jit 0.000000 auth_agekeys: at 1 keys 0 expired 0 30 Apr 12:20:08 ntpd[11200]: bind(19) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use 30 Apr 12:20:08 ntpd[11200]: unable to create socket on lo (2) for 127.0.0.1#123 30 Apr 12:20:08 ntpd[11200]: failed to init interface for address 127.0.0.1 30 Apr 12:20:08 ntpd[11200]: bind(19) AF_INET6 ::1#123 flags 0x5 failed: Address already in use 30 Apr 12:20:08 ntpd[11200]: unable to create socket on lo (3) for ::1#123 30 Apr 12:20:08 ntpd[11200]: failed to init interface for address ::1 refclock_transmit: at 65 127.127.1.0 refclock_receive: at 65 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 2 off 0.000000 del 0.000000 dsp 3.937740 jit 0.000000 refclock_transmit: at 129 127.127.1.0 refclock_receive: at 129 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 3 off 0.000000 del 0.000000 dsp 1.937980 jit 0.000000 refclock_transmit: at 193 127.127.1.0 refclock_receive: at 193 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 4 off 0.000000 del 0.000000 dsp 0.938160 jit 0.000000 refclock_transmit: at 257 127.127.1.0 refclock_receive: at 257 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 5 off 0.000000 del 0.000000 dsp 0.438280 jit 0.000000 30 Apr 12:25:08 ntpd[11200]: bind(19) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use 30 Apr 12:25:08 ntpd[11200]: unable to create socket on lo (4) for 127.0.0.1#123 30 Apr 12:25:08 ntpd[11200]: failed to init interface for address 127.0.0.1 30 Apr 12:25:08 ntpd[11200]: bind(19) AF_INET6 ::1#123 flags 0x5 failed: Address already in use 30 Apr 12:25:08 ntpd[11200]: unable to create socket on lo (5) for ::1#123 30 Apr 12:25:08 ntpd[11200]: failed to init interface for address ::1 refclock_transmit: at 321 127.127.1.0 refclock_receive: at 321 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 6 off 0.000000 del 0.000000 dsp 0.188355 jit 0.000000 select: combine offset 0.000000000 jitter 0.000000000 event at 321 LOCAL(0) 901a 8a sys_peer clock_update: at 321 sample 321 associd 17054 event at 321 0.0.0.0 c514 04 freq_mode local_clock: offset 0.000000000 jit 0.000000119 freq 0.000 stab 0.000 poll 6 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 refclock_transmit: at 385 127.127.1.0 refclock_receive: at 385 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 7 off 0.000000 del 0.000000 dsp 0.063400 jit 0.000000 select: combine offset 0.000000000 jitter 0.000000000 clock_update: at 385 sample 385 associd 17054 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 refclock_transmit: at 449 127.127.1.0 refclock_receive: at 449 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 8 off 0.000000 del 0.000000 dsp 0.000926 jit 0.000000 select: combine offset 0.000000000 jitter 0.000000000 clock_update: at 449 sample 449 associd 17054 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 refclock_transmit: at 513 127.127.1.0 refclock_receive: at 513 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 8 off 0.000000 del 0.000000 dsp 0.000926 jit 0.000000 select: combine offset 0.000000000 jitter 0.000000000 clock_update: at 513 sample 513 associd 17054 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 refclock_transmit: at 577 127.127.1.0 refclock_receive: at 577 127.127.1.0 refclock_sample: n 1 offset 0.000000 disp 0.010000 jitter 0.000000 clock_filter: n 8 off 0.000000 del 0.000000 dsp 0.000926 jit 0.000000 select: combine offset 0.000000000 jitter 0.000000000 clock_update: at 577 sample 577 associd 17054 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 select: combine offset 0.000000000 jitter 0.000000000 30 Apr 12:30:08 ntpd[11200]: bind(19) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use 30 Apr 12:30:08 ntpd[11200]: unable to create socket on lo (6) for 127.0.0.1#123 30 Apr 12:30:08 ntpd[11200]: failed to init interface for address 127.0.0.1 30 Apr 12:30:08 ntpd[11200]: bind(19) AF_INET6 ::1#123 flags 0x5 failed: Address already in use 30 Apr 12:30:08 ntpd[11200]: unable to create socket on lo (7) for ::1#123 30 Apr 12:30:08 ntpd[11200]: failed to init interface for address ::1 Edited April 30, 2021 by tetrapod Readability Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 2 hours ago, Vr2Io said: Does plugin update work, it indicate internet traffic accessible or not. I don't have a plugin named "update". What do you mean? But the server works fine with a bunch of dockers, services and VMs Quote Link to comment
Vr2Io Posted April 30, 2021 Share Posted April 30, 2021 2 minutes ago, tetrapod said: I don't have a plugin named "update". What do you mean? But the server works fine with a bunch of dockers, services and VMs I means plugin - "check for update" Quote Link to comment
Vr2Io Posted April 30, 2021 Share Posted April 30, 2021 (edited) I have make a simple test before, setting wrong time in advance 1hrs, the log as below, once I re-enable NTP setting, it sync in several seconds later. By compare, it seems something wrong in your log, it likely you have setting somthing in network setting. hack_restrict: op RESTRICT_FLAGS addr 0.0.0.0 mask 0.0.0.0 ippeerlimit -1 mflags 00000000 rflags 00000bd0 hack_restrict: op RESTRICT_FLAGS addr :: mask :: ippeerlimit -1 mflags 00000000 rflags 00000bd0 hack_restrict: op RESTRICT_FLAGS addr :: mask :: ippeerlimit -1 mflags 00000000 rflags 00000bd0 hack_restrict: op RESTRICT_FLAGS addr 127.0.0.1 mask 255.255.255.255 ippeerlimit -1 mflags 00000000 rflags 00000000 hack_restrict: op RESTRICT_FLAGS addr ::1 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ippeerlimit -1 mflags 00000000 rflags 00000000 My log : Apr 30 17:09:47 X299 crond[2375]: time disparity of 60 minutes detected Apr 30 17:10:09 X299 emhttpd: shcmd (520): ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime-copied-from Apr 30 17:10:09 X299 emhttpd: shcmd (521): cp /etc/localtime-copied-from /etc/localtime Apr 30 17:10:09 X299 emhttpd: shcmd (522): /usr/local/emhttp/webGui/scripts/update_access Apr 30 17:10:09 X299 sshd[12175]: Received signal 15; terminating. Apr 30 17:10:10 X299 sshd[13258]: Server listening on 0.0.0.0 port 22. Apr 30 17:10:10 X299 sshd[13258]: Server listening on :: port 22. Apr 30 17:10:11 X299 emhttpd: shcmd (523): /etc/rc.d/rc.ntpd restart Apr 30 17:10:11 X299 root: Stopping NTP daemon... Apr 30 17:10:12 X299 ntpd[13275]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting Apr 30 17:10:12 X299 ntpd[13275]: Command line: /usr/sbin/ntpd -g -u ntp:ntp Apr 30 17:10:12 X299 ntpd[13275]: ---------------------------------------------------- Apr 30 17:10:12 X299 ntpd[13275]: ntp-4 is maintained by Network Time Foundation, Apr 30 17:10:12 X299 ntpd[13275]: Inc. (NTF), a non-profit 501(c)(3) public-benefit Apr 30 17:10:12 X299 ntpd[13275]: corporation. Support and training for ntp-4 are Apr 30 17:10:12 X299 ntpd[13275]: available at https://www.nwtime.org/support Apr 30 17:10:12 X299 ntpd[13275]: ---------------------------------------------------- Apr 30 17:10:13 X299 ntpd[13277]: proto: precision = 0.038 usec (-25) Apr 30 17:10:13 X299 ntpd[13277]: basedate set to 2020-10-08 Apr 30 17:10:13 X299 ntpd[13277]: gps base set to 2020-10-11 (week 2127) Apr 30 17:10:13 X299 ntpd[13277]: Listen normally on 0 lo 127.0.0.1:123 Apr 30 17:10:13 X299 ntpd[13277]: Listen normally on 1 br0 192.168.9.182:123 Apr 30 17:10:13 X299 ntpd[13277]: Listen normally on 2 lo [::1]:123 Apr 30 17:10:13 X299 ntpd[13277]: Listening on routing socket on fd #19 for interface updates Apr 30 17:10:13 X299 ntpd[13277]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized Apr 30 17:10:13 X299 ntpd[13277]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized Apr 30 17:10:13 X299 root: Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp Apr 30 16:10:37 X299 nginx: 2021/04/30 16:10:37 [error] 9603#9603: nchan: A message from the past has just been published. Unless the system time has been adjusted, this should never happen. Apr 30 16:10:57 X299 nginx: 2021/04/30 16:10:57 [error] 9603#9603: nchan: A message from the past has just been published. Unless the system time has been adjusted, this should never happen. Apr 30 16:10:58 X299 emhttpd: cmd: /usr/local/emhttp/plugins/dynamix/scripts/tail_log syslog Apr 30 16:14:48 X299 dhcpcd[2276]: br0: failed to renew DHCP, rebinding Apr 30 16:15:58 X299 ntpd[13277]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized Apr 30 16:17:02 X299 nginx: 2021/04/30 16:17:02 [error] 9603#9603: nchan: A message from the past has just been published. Unless the system time has been adjusted, this should never happen. Edited April 30, 2021 by Vr2Io Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 23 minutes ago, Vr2Io said: I means plugin - "check for update" Ahhh, sorry, yes that works Thank you for testing! 👍 I think your log is the syslog - right? My log above if from standard out and I'm running with higher log level (-d). The lines without timestamp do not end up in the syslog Still, you have: Listen normally on 0 lo 127.0.0.1:123 Listen normally on 1 br0 192.168.9.182:123 Listen normally on 2 lo [::1]:123 I instead have: bind(16) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use unable to create socket on lo (0) for 127.0.0.1#123 failed to init interface for address 127.0.0.1 bind(16) AF_INET6 ::1#123 flags 0x5 failed: Address already in use unable to create socket on lo (1) for ::1#123 failed to init interface for address ::1 Listening on routing socket on fd #16 for interface updates So something network is fishy, but I can't imagine why. That's why I gave the Ubuntu example from where seen from outside the Unraid box they are on the same network. I change the config of the time server with time1.google.com. I stop the ntp service and manually change the clock to "wrong" time. Start the service again and the time will be changed. May I ask which time servers you have set? Quote Link to comment
Vr2Io Posted April 30, 2021 Share Posted April 30, 2021 (edited) 32 minutes ago, tetrapod said: May I ask which time servers you have set? I set NTP1 : 192.168.9.19 a local server, sorry I should mention that NTP2: time3.google.com 32 minutes ago, tetrapod said: I change the config of the time server with time1.google.com. That solve the problem ? What NTP sever setting before ? Edited April 30, 2021 by Vr2Io Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 Ok, thank you for info. I'm pretty new to Unraid. Can I ask where you would think the best place to ask for help in this matter is? Quote Link to comment
Vr2Io Posted April 30, 2021 Share Posted April 30, 2021 2 minutes ago, tetrapod said: I'm pretty new to Unraid. Can I ask where you would think the best place to ask for help in this matter is? You mean problem not solve ? You target it is local/network issue which outside Unraid itself ? Post at "General support" should be fine. Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 No, I still have this problem(?) I don't think I understand what you mean. All other services on my Unraid server that access outside resources have no problem. VM server on Unraid accessing the exact same outside recourses have no problem. I get a bind error from ntpd so that should be the Unraid server Why do you mean that the problem should be outside Unraid? I'm sorry, I do not understand. 8 minutes ago, Vr2Io said: Post at "General support" should be fine. You mean this forum, the one I posted this in - a month ago? Quote Link to comment
itimpi Posted April 30, 2021 Share Posted April 30, 2021 You should provide your system’s diagnostics zip file (obtained via Tools -> Diagnostics) attached to your next post so we can get a better idea of what is going on and how you have everything configured. Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 Perfect! Thank you. Here it is. treebeard-diagnostics-20210430-1429.zip Quote Link to comment
Vr2Io Posted April 30, 2021 Share Posted April 30, 2021 (edited) 1 hour ago, tetrapod said: I stop the ntp service and manually change the clock to "wrong" time. Start the service again and the time will be changed. You said the time will be changed, so I assume NTP sync work. BTW, I haven't much idea which cause the abnormal message in your syslog. Pls check does Unraid can resolve time1.google.com or static the NTP server ( time1.google.com ) IP 216.239.35.0 and try. Apr 30 20:49:40 X299 emhttpd: shcmd (20577): /etc/rc.d/rc.ntpd restart Apr 30 20:49:40 X299 ntpd[23419]: ntpd exiting on signal 1 (Hangup) Apr 30 20:49:40 X299 ntpd[23419]: 127.127.1.0 local addr 127.0.0.1 -> <null> Apr 30 20:49:40 X299 ntpd[23419]: 216.239.35.0 local addr 192.168.9.182 -> <null> Apr 30 20:49:40 X299 root: Stopping NTP daemon... Apr 30 20:49:41 X299 ntpd[2373]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting Apr 30 20:49:41 X299 ntpd[2373]: Command line: /usr/sbin/ntpd -g -u ntp:ntp Apr 30 20:49:41 X299 ntpd[2373]: ---------------------------------------------------- Apr 30 20:49:41 X299 ntpd[2373]: ntp-4 is maintained by Network Time Foundation, Apr 30 20:49:41 X299 ntpd[2373]: Inc. (NTF), a non-profit 501(c)(3) public-benefit Apr 30 20:49:41 X299 ntpd[2373]: corporation. Support and training for ntp-4 are Apr 30 20:49:41 X299 ntpd[2373]: available at https://www.nwtime.org/support Apr 30 20:49:41 X299 ntpd[2373]: ---------------------------------------------------- Apr 30 20:49:41 X299 ntpd[2376]: proto: precision = 0.044 usec (-24) Apr 30 20:49:41 X299 ntpd[2376]: basedate set to 2020-10-08 Apr 30 20:49:41 X299 ntpd[2376]: gps base set to 2020-10-11 (week 2127) Apr 30 20:49:41 X299 ntpd[2376]: Listen normally on 0 lo 127.0.0.1:123 Apr 30 20:49:41 X299 ntpd[2376]: Listen normally on 1 br0 192.168.9.182:123 Apr 30 20:49:41 X299 ntpd[2376]: Listen normally on 2 lo [::1]:123 Apr 30 20:49:41 X299 ntpd[2376]: Listening on routing socket on fd #19 for interface updates Apr 30 20:49:41 X299 ntpd[2376]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized Apr 30 20:49:41 X299 ntpd[2376]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized Apr 30 20:49:41 X299 root: Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp Edited April 30, 2021 by Vr2Io Quote Link to comment
tetrapod Posted April 30, 2021 Author Share Posted April 30, 2021 54 minutes ago, Vr2Io said: You said the time will be changed, so I assume NTP sync work. Yes, this was on the VM. Sorry if that was unclear. root@treebeard:/etc/rc.d# ping time1.google.com PING time1.google.com (216.239.35.0) 56(84) bytes of data. 64 bytes from time1.google.com (216.239.35.0): icmp_seq=1 ttl=109 time=27.1 ms 64 bytes from time1.google.com (216.239.35.0): icmp_seq=2 ttl=109 time=27.7 ms 64 bytes from time1.google.com (216.239.35.0): icmp_seq=3 ttl=109 time=27.7 ms 64 bytes from time1.google.com (216.239.35.0): icmp_seq=4 ttl=109 time=27.3 ms ^C --- time1.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 27.074/27.427/27.650/0.240 ms root@treebeard:/etc/rc.d# ./rc.ntpd restart Stopping NTP daemon... Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp root@treebeard:/etc/rc.d# tail -50 /var/lo local/ lock/ log/ root@treebeard:/etc/rc.d# tail -50 /var/log/syslog Apr 30 15:45:08 treebeard ntpd[29429]: ntpd exiting on signal 1 (Hangup) Apr 30 15:45:09 treebeard ntpd[27358]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting Apr 30 15:45:09 treebeard ntpd[27358]: Command line: /usr/sbin/ntpd -g -u ntp:ntp Apr 30 15:45:09 treebeard ntpd[27358]: ---------------------------------------------------- Apr 30 15:45:09 treebeard ntpd[27358]: ntp-4 is maintained by Network Time Foundation, Apr 30 15:45:09 treebeard ntpd[27358]: Inc. (NTF), a non-profit 501(c)(3) public-benefit Apr 30 15:45:09 treebeard ntpd[27358]: corporation. Support and training for ntp-4 are Apr 30 15:45:09 treebeard ntpd[27358]: available at https://www.nwtime.org/support Apr 30 15:45:09 treebeard ntpd[27358]: ---------------------------------------------------- Apr 30 15:45:09 treebeard ntpd[27360]: proto: precision = 0.040 usec (-24) Apr 30 15:45:09 treebeard ntpd[27360]: basedate set to 2020-10-08 Apr 30 15:45:09 treebeard ntpd[27360]: gps base set to 2020-10-11 (week 2127) Apr 30 15:45:09 treebeard ntpd[27360]: bind(16) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use Apr 30 15:45:09 treebeard ntpd[27360]: unable to create socket on lo (0) for 127.0.0.1#123 Apr 30 15:45:09 treebeard ntpd[27360]: failed to init interface for address 127.0.0.1 Apr 30 15:45:09 treebeard ntpd[27360]: bind(16) AF_INET6 ::1#123 flags 0x5 failed: Address already in use Apr 30 15:45:09 treebeard ntpd[27360]: unable to create socket on lo (1) for ::1#123 Apr 30 15:45:09 treebeard ntpd[27360]: failed to init interface for address ::1 Apr 30 15:45:09 treebeard ntpd[27360]: Listening on routing socket on fd #16 for interface updates Apr 30 15:45:09 treebeard ntpd[27360]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized Apr 30 15:45:09 treebeard ntpd[27360]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized Apr 30 15:45:11 treebeard ntpd[27360]: bind(19) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use Apr 30 15:45:11 treebeard ntpd[27360]: unable to create socket on lo (2) for 127.0.0.1#123 Apr 30 15:45:11 treebeard ntpd[27360]: failed to init interface for address 127.0.0.1 Apr 30 15:45:11 treebeard ntpd[27360]: bind(19) AF_INET6 ::1#123 flags 0x5 failed: Address already in use Apr 30 15:45:11 treebeard ntpd[27360]: unable to create socket on lo (3) for ::1#123 Apr 30 15:45:11 treebeard ntpd[27360]: failed to init interface for address ::1 Thanks for the help so far 👍 Quote Link to comment
tetrapod Posted May 6, 2021 Author Share Posted May 6, 2021 On 4/30/2021 at 2:26 PM, itimpi said: You should provide your system’s diagnostics zip file (obtained via Tools -> Diagnostics) attached to your next post so we can get a better idea of what is going on and how you have everything configured. 90% of my syslog is ntpd. I get this every 5 minutes: May 6 15:12:34 treebeard ntpd[27360]: bind(19) AF_INET 127.0.0.1#123 flags 0x5 failed: Address already in use May 6 15:12:34 treebeard ntpd[27360]: unable to create socket on lo (3628) for 127.0.0.1#123 May 6 15:12:34 treebeard ntpd[27360]: failed to init interface for address 127.0.0.1 May 6 15:12:34 treebeard ntpd[27360]: bind(19) AF_INET6 ::1#123 flags 0x5 failed: Address already in use May 6 15:12:34 treebeard ntpd[27360]: unable to create socket on lo (3629) for ::1#123 May 6 15:12:34 treebeard ntpd[27360]: failed to init interface for address ::1 I must have fucked something up :-$ Quote Link to comment
John_M Posted May 7, 2021 Share Posted May 7, 2021 There isn't really much to set up with ntp. Most of it is done for you and all you have to do is set a timezone, enable ntp and choose up to four time servers. It usually works out of the box. So maybe you have indeed fu- messed something up. Your diagnostics show that you have the following four time servers configured [NTP_SERVER1] => time.google.com [NTP_SERVER2] => ntp.pool.org [NTP_SERVER3] => 192.168.178.1 [NTP_SERVER4] => which don't really seem to be a very good selection. The first one is pobably OK. The second one is incorrect. The third one is a host on your local network, probably your router. The fourth one isn't defined. Try setting them (temporarily) to 0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org and 3.pool.ntp.org and then rebooting. Quote Link to comment
tetrapod Posted May 8, 2021 Author Share Posted May 8, 2021 I know, there isn't much, and I see that I fucked up the servers I had chosen when sending my config. I had tried so many. And yes, getting rid of the wrong one did help with the syslog messages - thank you. But, ntpd still don't set the time? With servers set to the four suggested I have stopped/started the service and stopped/started the server. Originally the server was ca. 10 minutes ahead and I waited 24 hours. It never changed a second. Then I thought that maybe the gap is to wide, but I see that ntpd is started with -g so it should work? Anyway, I changed it manually by stopping the demon and setting time manually in the GUI, this time to one minute behind local time. Started service again, but it still doesn't move the clock a second - I waited another 24 hours. Syslog confirm that ntpd see that the clock isn't synchronized, but doesn't set the time root@treebeard:/etc# cat /var/log/syslog |grep ntpd May 7 09:45:38 treebeard ntpd[2362]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting May 7 09:45:38 treebeard ntpd[2362]: Command line: /usr/sbin/ntpd -g -u ntp:ntp May 7 09:45:38 treebeard ntpd[2362]: ---------------------------------------------------- May 7 09:45:38 treebeard ntpd[2362]: ntp-4 is maintained by Network Time Foundation, May 7 09:45:38 treebeard ntpd[2362]: Inc. (NTF), a non-profit 501(c)(3) public-benefit May 7 09:45:38 treebeard ntpd[2362]: corporation. Support and training for ntp-4 are May 7 09:45:38 treebeard ntpd[2362]: available at https://www.nwtime.org/support May 7 09:45:38 treebeard ntpd[2362]: ---------------------------------------------------- May 7 09:45:38 treebeard ntpd[2364]: proto: precision = 0.080 usec (-23) May 7 09:45:38 treebeard ntpd[2364]: basedate set to 2020-10-08 May 7 09:45:38 treebeard ntpd[2364]: gps base set to 2020-10-11 (week 2127) May 7 09:45:38 treebeard ntpd[2364]: Listen normally on 0 lo 127.0.0.1:123 May 7 09:45:38 treebeard ntpd[2364]: Listen normally on 1 lo [::1]:123 May 7 09:45:38 treebeard ntpd[2364]: Listening on routing socket on fd #18 for interface updates May 7 09:45:38 treebeard ntpd[2364]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized May 7 09:45:38 treebeard ntpd[2364]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized May 7 09:56:19 treebeard ntpd[2364]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized May 7 16:01:28 treebeard emhttpd: shcmd (123): /etc/rc.d/rc.ntpd stop May 7 16:01:28 treebeard ntpd[2364]: ntpd exiting on signal 1 (Hangup) May 7 16:01:28 treebeard ntpd[2364]: 127.127.1.0 local addr 127.0.0.1 -> <null> May 7 16:01:58 treebeard emhttpd: shcmd (129): /etc/rc.d/rc.ntpd restart May 7 16:01:59 treebeard ntpd[8760]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting May 7 16:01:59 treebeard ntpd[8760]: Command line: /usr/sbin/ntpd -g -u ntp:ntp May 7 16:01:59 treebeard ntpd[8760]: ---------------------------------------------------- May 7 16:01:59 treebeard ntpd[8760]: ntp-4 is maintained by Network Time Foundation, May 7 16:01:59 treebeard ntpd[8760]: Inc. (NTF), a non-profit 501(c)(3) public-benefit May 7 16:01:59 treebeard ntpd[8760]: corporation. Support and training for ntp-4 are May 7 16:01:59 treebeard ntpd[8760]: available at https://www.nwtime.org/support May 7 16:01:59 treebeard ntpd[8760]: ---------------------------------------------------- May 7 16:01:59 treebeard ntpd[8762]: proto: precision = 0.030 usec (-25) May 7 16:01:59 treebeard ntpd[8762]: basedate set to 2020-10-08 May 7 16:01:59 treebeard ntpd[8762]: gps base set to 2020-10-11 (week 2127) May 7 16:01:59 treebeard ntpd[8762]: Listen normally on 0 lo 127.0.0.1:123 May 7 16:01:59 treebeard ntpd[8762]: Listen normally on 1 lo [::1]:123 May 7 16:01:59 treebeard ntpd[8762]: Listening on routing socket on fd #18 for interface updates May 7 16:01:59 treebeard ntpd[8762]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized May 7 16:01:59 treebeard ntpd[8762]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized May 7 16:01:59 treebeard root: Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp May 7 16:06:36 treebeard emhttpd: shcmd (133): /etc/rc.d/rc.ntpd stop May 7 16:06:36 treebeard ntpd[8762]: ntpd exiting on signal 1 (Hangup) May 7 16:06:36 treebeard ntpd[8762]: 127.127.1.0 local addr 127.0.0.1 -> <null> May 7 15:58:55 treebeard emhttpd: shcmd (140): /etc/rc.d/rc.ntpd restart May 7 15:58:56 treebeard ntpd[16358]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting May 7 15:58:56 treebeard ntpd[16358]: Command line: /usr/sbin/ntpd -g -u ntp:ntp May 7 15:58:56 treebeard ntpd[16358]: ---------------------------------------------------- May 7 15:58:56 treebeard ntpd[16358]: ntp-4 is maintained by Network Time Foundation, May 7 15:58:56 treebeard ntpd[16358]: Inc. (NTF), a non-profit 501(c)(3) public-benefit May 7 15:58:56 treebeard ntpd[16358]: corporation. Support and training for ntp-4 are May 7 15:58:56 treebeard ntpd[16358]: available at https://www.nwtime.org/support May 7 15:58:56 treebeard ntpd[16358]: ---------------------------------------------------- May 7 15:58:56 treebeard ntpd[16360]: proto: precision = 0.040 usec (-24) May 7 15:58:56 treebeard ntpd[16360]: basedate set to 2020-10-08 May 7 15:58:56 treebeard ntpd[16360]: gps base set to 2020-10-11 (week 2127) May 7 15:58:56 treebeard ntpd[16360]: Listen normally on 0 lo 127.0.0.1:123 May 7 15:58:56 treebeard ntpd[16360]: Listen normally on 1 lo [::1]:123 May 7 15:58:56 treebeard ntpd[16360]: Listening on routing socket on fd #18 for interface updates May 7 15:58:56 treebeard ntpd[16360]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized May 7 15:58:56 treebeard ntpd[16360]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized May 7 15:58:56 treebeard root: Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp May 7 16:09:37 treebeard ntpd[16360]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized I see no files created for configured drift or stats (driftfile /var/lib/ntp/drift, statsdir /var/lib/ntp/stats) Any ideas? Quote Link to comment
John_M Posted May 9, 2021 Share Posted May 9, 2021 On 5/8/2021 at 1:32 PM, tetrapod said: I see no files created for configured drift or stats (driftfile /var/lib/ntp/drift, statsdir /var/lib/ntp/stats) I have a drift file at /boot/config/drift (which allows it to be preserved when rebooting). Quote Link to comment
tetrapod Posted May 10, 2021 Author Share Posted May 10, 2021 11 hours ago, John_M said: I have a drift file at /boot/config/drift (which allows it to be preserved when rebooting). Thank you for answering (Y) So does that mean that you have changed /etc/ntp.conf to point to your drift file? And does it mean that /var/lib/ntp/drift and /var/lib/ntp/stats would be overwritten at a reboot (if they exists)? And yet again, does your server write /var/lib/ntp/drift and /var/lib/ntp/stats and just wanted to change the behavior, or do you not get those files either? Quote Link to comment
John_M Posted May 10, 2021 Share Posted May 10, 2021 2 hours ago, tetrapod said: So does that mean that you have changed /etc/ntp.conf to point to your drift file? No, I haven't made any changes. All I ever did was set my timezone and update the list of time servers. The only file present in the /var/lib/ntp directory is also called drift. There is no stats file. root@Mandaue:~# ls -l /boot/config/drift -rw------- 1 root root 7 Apr 7 22:45 /boot/config/drift root@Mandaue:~# ls -l /var/lib/ntp/ total 4 -rw-r--r-- 1 ntp ntp 7 May 10 11:06 drift root@Mandaue:~# It seems that the /var/lib/ntp/drift file is updated as necessary. I don't know for sure but I would expect that it is copied to /boot/config/drift when the ntp service is shut down and loaded from the same file when the service is started. That would be a customisation set up by the developers of Unraid. One thing you could try is to create a new temporary USB flash boot device using a trial licence and use that to boot your server. Don't try to start the array or configure any storage but set up your timezone and time servers and then leave it for a few hours to see if that works. If it doesn't then there's something strange about your hardware. If it does then the problem is with your configuration. 1 Quote Link to comment
tetrapod Posted May 11, 2021 Author Share Posted May 11, 2021 18 hours ago, John_M said: No, I haven't made any changes Ahh, ok, I read you as you had made a customization. 18 hours ago, John_M said: I don't know for sure but I would expect that it is copied to /boot/config/drift when the ntp service is shut down That seems to bee correct root@treebeard:/boot/config# ls -l /boot/config/drift -rw------- 1 root root 6 May 7 10:45 /boot/config/drift root@treebeard:/boot/config# ls -l /var/lib/ntp/drift -rw-r--r-- 1 ntp ntp 6 May 7 16:58 /var/lib/ntp/drift ntpd service restart - checking syslog root@treebeard:/boot/config# cat /var/log/syslog |grep ntpd May 11 09:24:49 treebeard emhttpd: shcmd (682): /etc/rc.d/rc.ntpd stop May 11 09:24:49 treebeard ntpd[16360]: ntpd exiting on signal 1 (Hangup) May 11 09:24:49 treebeard ntpd[16360]: 127.127.1.0 local addr 127.0.0.1 -> <null> May 11 09:24:48 treebeard emhttpd: shcmd (688): /etc/rc.d/rc.ntpd restart May 11 09:24:49 treebeard ntpd[6699]: ntpd [email protected] Tue Oct 20 18:42:21 UTC 2020 (1): Starting May 11 09:24:49 treebeard ntpd[6699]: Command line: /usr/sbin/ntpd -g -u ntp:ntp May 11 09:24:49 treebeard ntpd[6699]: ---------------------------------------------------- May 11 09:24:49 treebeard ntpd[6699]: ntp-4 is maintained by Network Time Foundation, May 11 09:24:49 treebeard ntpd[6699]: Inc. (NTF), a non-profit 501(c)(3) public-benefit May 11 09:24:49 treebeard ntpd[6699]: corporation. Support and training for ntp-4 are May 11 09:24:49 treebeard ntpd[6699]: available at https://www.nwtime.org/support May 11 09:24:49 treebeard ntpd[6699]: ---------------------------------------------------- May 11 09:24:49 treebeard ntpd[6701]: proto: precision = 0.040 usec (-24) May 11 09:24:49 treebeard ntpd[6701]: basedate set to 2020-10-08 May 11 09:24:49 treebeard ntpd[6701]: gps base set to 2020-10-11 (week 2127) May 11 09:24:49 treebeard ntpd[6701]: Listen normally on 0 lo 127.0.0.1:123 May 11 09:24:49 treebeard ntpd[6701]: Listen normally on 1 lo [::1]:123 May 11 09:24:49 treebeard ntpd[6701]: Listening on routing socket on fd #18 for interface updates May 11 09:24:49 treebeard ntpd[6701]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized May 11 09:24:49 treebeard ntpd[6701]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized May 11 09:24:49 treebeard root: Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp Certainly seem like the /boot/config/drift is overwritten with the /var/lib/ntp/drift from before restart root@treebeard:/boot/config# ls -l /boot/config/drift -rw------- 1 root root 6 May 7 16:58 /boot/config/drift root@treebeard:/boot/config# ls -l /var/lib/ntp/drift /bin/ls: cannot access '/var/lib/ntp/drift': No such file or directory The drift file in all instances is "0.000" Checking in on syslog again, and getting the usual one time ntpd confirming clock unsynchronized. root@treebeard:/boot/config# tail -3 /var/log/syslog May 11 09:24:49 treebeard ntpd[6701]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized May 11 09:24:49 treebeard root: Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp May 11 09:35:30 treebeard ntpd[6701]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized After an hour I'll get a new drift file root@treebeard:/boot/config# ls -l /var/lib/ntp/drift -rw-r--r-- 1 ntp ntp 6 May 11 10:24 /var/lib/ntp/drift ...nothing more in syslog and the file is still "0.000" Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.