You are not logged in.
Hi there!
First, sorry for my English. I'm mexican, but actually I'm learning.
I have had installed Arch for about 7 months and I'm very satisfied, but 2 or 3 weeks ago I installed NTP. At first everything was fine but the problems
began later. I noticed that when i turned off the system I got a message that delayed shutdown a lot saying:
"A stop job is running for Network Time Service...".
Then, after waiting for one or two minutes, the computer shutdowns.
The interesting thing is that I only get the message when I turn off the computer using KDE. If I turn it off using Cinnamon it simply does not appear.
Also, I noticed that when I try to change the date and time settings in KDE to allow server time, I get another message saying that is unable to contact the server.
Although I have learned a lot about Archlinux, I just can't solve this problem; so I would greatly appreciate if you help me.
P.S. I enabled "ntpd" and my system is updated.
More info:
"Output of uname -a"
Linux Jesus-Arch-Linux 3.11.6-1-ARCH #1 SMP PREEMPT Fri Oct 18 23:22:36 CEST 2013 x86_64 GNU/LinuxLast edited by Pshack (2013-11-12 23:58:16)
Offline
I will post more info.
Last edited by Pshack (2013-11-11 22:45:05)
Offline
Also, my /etc/ntp.conf :
# With the default settings below, ntpd will only synchronize your clock.
#
# For details, see:
# - the ntp.conf man page
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
# Associate to public NTP pool servers; see http://www.pool.ntp.org/
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
# Only allow read-only access from localhost
restrict default noquery nopeer
restrict 127.0.0.1
restrict ::1
# Location of drift file
driftfile /var/lib/ntp/ntp.driftOffline
First of all, your English is great! So don't worry about that. No one would have ever been able to tell had you not mentioned it. In fact, we sometimes get people who are native speakers who can't seem to properly post a question, so you're doing pretty great with your second (or maybe third or fourth) language.
Regarding your issue, I think you need to check out the logs to see if you can find where it is hanging. With journalctl, there is a really neat feature that allows you to specify which boot to show. So for example, using '-b' would show you the journal from your running boot only. If you use '-b -1' then it would show your previous boot, and '-b -2' would show two boots previous, etc.
So go through that and see if you can find any clues. Don't forget that the journal is split between user and system journals. So you will either have to run journalctl as root, or make your user part of the 'systemd-journal' group to see everything.
Offline
Thanks WonderWoofy, I couldn't find anything wrong in journalctl -b output, anyway, this is what i found that involves ntpd:
nov 11 13:44:38 Jesus-Arch-Linux kernel: IPv6: wlp2s0: IPv6 duplicate address fe80::22c9:d0ff:fec0:2d75 detected!
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: NetworkManager-wait-online.service: main process exited, code=exited, status=1/FAILURE
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Failed to start Network Manager Wait Online.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Unit NetworkManager-wait-online.service entered failed state.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Starting Network.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Reached target Network.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Starting Network Time Service...
nov 11 13:44:41 Jesus-Arch-Linux ntpd[729]: ntpd 4.2.6p5@1.2349-o Thu Aug 1 03:29:01 UTC 2013 (1)
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: proto: precision = 0.102 usec
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Listen and drop on 1 v6wildcard :: UDP 123
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Listen normally on 2 lo 127.0.0.1 UDP 123
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Listen normally on 3 lo ::1 UDP 123
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: peers refreshed
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Listening on routing socket on fd #20 for interface updates
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Deferring DNS for 0.pool.ntp.org 1
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Deferring DNS for 1.pool.ntp.org 1
nov 11 13:44:41 Jesus-Arch-Linux ntpd[730]: Deferring DNS for 2.pool.ntp.org 1
nov 11 13:44:41 Jesus-Arch-Linux ntpd[731]: signal_no_reset: signal 17 had flags 4000000
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Started Network Time Service.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Starting Multi-User System.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Reached target Multi-User System.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Starting Graphical Interface.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Reached target Graphical Interface.
nov 11 13:44:41 Jesus-Arch-Linux systemd[1]: Startup finished in 8.161s (kernel) + 54.900s (userspace) = 1min 3.062s.Would my problem leave a log there if I got the message when I shutdown my computer?
Offline
You didn't read my post carefully enough. Using only '-b' will show you the current boot. For the boot previous (the one before what you are currently running), you will need to use '-b -1' (which I read as "this boot, minus 1").
What you have posted there is regarding the boot process, while I am fairly certain from your first post that you are looking for information from the shutdown.
Offline
Ok, sorry, I was confused about the "-1" option. Now, this is what I found containing "ntpd":
nov 10 17:23:31 Jesus-Arch-Linux ntpd[892]: ntpd 4.2.6p5@1.2349-o Thu Aug 1 03:29:01 UTC 2013 (1)
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: proto: precision = 0.117 usec
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Listen and drop on 1 v6wildcard :: UDP 123
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Listen normally on 2 lo 127.0.0.1 UDP 123
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Listen normally on 3 lo ::1 UDP 123
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: peers refreshed
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Listening on routing socket on fd #20 for interface updates
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Deferring DNS for 0.pool.ntp.org 1
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Deferring DNS for 1.pool.ntp.org 1
nov 10 17:23:31 Jesus-Arch-Linux ntpd[893]: Deferring DNS for 2.pool.ntp.org 1
nov 10 17:23:31 Jesus-Arch-Linux ntpd[894]: signal_no_reset: signal 17 had flags 4000000
nov 10 17:23:33 Jesus-Arch-Linux ntpd_intres[894]: host name not found: 0.pool.ntp.org
nov 10 17:23:33 Jesus-Arch-Linux ntpd_intres[894]: host name not found: 1.pool.ntp.org
nov 10 17:23:33 Jesus-Arch-Linux ntpd_intres[894]: host name not found: 2.pool.ntp.org
nov 10 17:23:36 Jesus-Arch-Linux ntpd[893]: Listen normally on 4 wlp2s0 192.168.1.66 UDP 123
nov 10 17:23:36 Jesus-Arch-Linux ntpd[893]: peers refreshed
nov 10 17:23:36 Jesus-Arch-Linux ntpd[893]: new interface(s) found: waking up resolver
nov 10 17:23:38 Jesus-Arch-Linux ntpd_intres[894]: DNS 0.pool.ntp.org -> 132.248.30.3
nov 10 17:23:38 Jesus-Arch-Linux ntpd_intres[894]: DNS 1.pool.ntp.org -> 66.175.216.101
nov 10 17:23:38 Jesus-Arch-Linux ntpd_intres[894]: DNS 2.pool.ntp.org -> 217.147.208.1
nov 10 23:26:33 Jesus-Arch-Linux ntpd[893]: Deleting interface #4 wlp2s0, 192.168.1.66#123, interface stats: received=392, sent=412, dropped=0, active_time=17789 secs
nov 10 23:26:33 Jesus-Arch-Linux ntpd[893]: 217.147.208.1 interface 192.168.1.66 -> (none)
nov 10 23:26:33 Jesus-Arch-Linux ntpd[893]: 66.175.216.101 interface 192.168.1.66 -> (none)
nov 10 23:26:33 Jesus-Arch-Linux ntpd[893]: 132.248.30.3 interface 192.168.1.66 -> (none)
nov 10 23:26:33 Jesus-Arch-Linux ntpd[893]: peers refreshed
nov 10 23:27:08 Jesus-Arch-Linux ntpd[893]: Listen normally on 5 wlp2s0 192.168.1.66 UDP 123
nov 10 23:27:08 Jesus-Arch-Linux ntpd[893]: peers refreshed
nov 10 23:27:08 Jesus-Arch-Linux ntpd[893]: new interface(s) found: waking up resolver
nov 10 23:37:28 Jesus-Arch-Linux systemd[1]: ntpd.service stopping timed out. Killing.
nov 10 23:37:28 Jesus-Arch-Linux systemd[1]: ntpd.service: main process exited, code=killed, status=9/KILL
nov 10 23:37:28 Jesus-Arch-Linux systemd[1]: Unit ntpd.service entered failed state.It seems like systemd kills the process after some time, but certainly I'm a newbie. ![]()
Last edited by Pshack (2013-11-11 23:49:29)
Offline
I think you need to be looking at more than just the ntpd stuff. You are looking for what is being help up and why. For that you have to have a frame of reference about what else might be going on as well. Services, like packages, have dependencies. So it may be that something that the ntpd.service relies on is being shut down before ntpd itself has a chance to exit cleanly. Thus it hangs until systemd says "enough!" and kills the poor thing.
Offline
The full log is here:
I will search harder
Last edited by Pshack (2013-11-11 23:55:16)
Offline
And What do you think about the KDE subject?
Offline
Honestly, I have no idea about KDE, and if that ends up having something to do with the situation, I am probably not going to be able to actually help you. I am not a kde user, nor a desktop environment user in general. So I might not be the best person for DE troubles. But I figured I could at least show you where to look.
You should scroll through those logs and see if you can find anything relevant. These forums are full of people happy to give assistance, but there should be no expectation of hand holding. That is, where some other forums might ask a user to post logs so that they can be scrolled through by someone else, and the original poster will never have to debug a thing, more is expected from the OP here. So go through and see if you can find anything interesting, and post about it when you do. Typically when something is hanging during boot or shutdown, you can find a large gap in timestamps in the logs.
Offline
You can be sure I have searched and I will keep on do it.
I posted the logs after I read them becouse I couldn't find anything but I'd like to learn, and I hope solve my problem and post that solution here to help other users
I'm very happy to see people wanting to help anothers, so I appreciate your help a lot WonderWoofy.
On the other hand, I read something about a bug with KDE and I add the "iburst" option to my servers in /etc/ntp.conf, but it didn't work.
So I'm going to reinstall ntp and see what happens.
Greetings from Mexico!!
Offline
I have read that you should use the iburst option in general if syncing to online time servers. This apparently prevents your system from abusing the server or something like that.
I scrolled through your logs (or the shutdown anyway), and I couldn't see anything out of the ordinary either, other than the fact that there is that sigkill being sent to ntpd. You say that if you don't use kde, things are normal, so maybe you should compare the logs of the successful cinnamon shutdown with the stalled shutdown of kde.
If all else fails, boot with systemd.log_level=debug on the kernel command line to get debug info in the journal (see the kenrel-command-line man page for more info).
Offline
Great idea!! I will compare both logs (From cinnamon and KDE) and I will use that kernel parameter.
I hope that solves the problem.
Offline
Well, simply looking through the logs is not going to solve your issue, but hopefully it will point your in the right direction. ![]()
Offline
Well, I have been reading a lot about KDE and NTP and I could understand my little problem.
Apparently there is a conflict (maybe also a bug) between the KDE configuration of server time (using ntpdate), and ntpd system configuration.
Supposedly there are 2 possible solutions:
a)Disable ntpd at system level and let KDE take care of business (Will only work with KDE)
b)Let ntpd enabled and disable the KDE config. (Will work at system level)
I tried both but the second just didn't work for me (perhaps because of the bug).
More info about the problem that can help other users with the same problem:
The possible bug
Differences between the two possible solutions
Info from Slackware Wiki
Another post in this forum
P.S. You were right WonderWoofy, the problem didn't solve itself. ![]()
Thanks, it was nice to post in this forum.
Offline
Great Work Pshack! I would have never been able to guide you in that direction, so I'm glad you got this figured out.
It is too bad you were not able to have this functional on a system level. The idea of "KDE sets time, or NO ONE SETS TIME!" just seems wrong to me. But better working somehow than not working at all!
Offline
Yes, I was disappointed too, but something is better than nothing.
So, I will mark the post as solved to conclude it.
Offline
Excellent, please do mark it as [Solved]!
Offline