You are not logged in.
Hi,
Does anyone know the solution for FS#31250 - [openssh] shutdown of systemd install doesn't notify/close client connections?
I tried both sshd.socket and sshd.service, first one does sometimes(!!) log the clients out, but most of the time they hang until timeout.
sshd.service does always produce hang.
Network ist configured via NetworkManager.
Please give a solution for this, this is really annoying. I like systemd, but i have this little bug on all my machines.
Or do I have to use the solution from wiki? I never needed that with old initscripts.
Thx
Last edited by Evilandi666 (2012-09-26 08:41:29)
Offline
I've always had to
sudo reboot && exit
on the remote or the connection would hang.
You're just jealous because the voices only talk to me.
Offline
Really no one knows a real solution?
Dave said that he "cannot reproduce any hang with the single daemon process." .. can you please tell us, how you achieve this?
Last edited by Evilandi666 (2012-09-26 08:38:28)
Offline
bump
Offline
Adding After=network.target should (theoretically) fix your problem as it should (theoretically) cause sshd to be stopped before networkmanager. If that doesn't work, you could try adding After=NetworkManager.service.
Offline
I tried it both (copied original file to /etc/systemd/system/ and added one of those lines), none of them helped.
So I am still looking for a solution ....
Offline
So I am still looking for a solution ....
Same here
Offline
Push
Offline
Hi guys,
The solution is to make a copy of systemd-user-sessions.service in /etc/systemd/system and add "After=network.target" to it.
This way all user sessions are started after, and more importantly, shut down before the network connection comes up/is dropped.
The reason it is not correct to add this to the ssh service itself is that the user sessions are split off from the ssh service, so even if the daemon goes down they stay around.
I'll be looking at sorting this out properly upstream, but haven't gotten around to it yet.
HTH
Offline
I've always just used the short cut keys ~.
Offline
Had the same issue; tomegun's solution works fine for me. Bit of a bother to hunt this down but at least I'm understanding systemd better through the process. Cheers.
arch + gnome on dell xps13
Offline
Kinda an old topic, but I'm having the same issue as described. Any news on a fix, as I don't have a systemd-user-sessions.service file in /ets/systemd/system and therefore cannot use the proposed workaround. Thanks.
Last edited by zombyrad (2013-04-12 10:11:10)
Offline
Maybe it’s a bit later, but actually the solution is a bit simpler.
Just do:
# nano /usr/lib/systemd/system/systemd-user-sessions.service
Comment the «After» line, and replace it by «After=network.target». Now, the file must be like that:
[…]
[Unit]
Description=Permit User Sessions
Documentation=man:systemd-user-sessions.service(8)
#After=remote-fs.target
After=network.target
[Service]
[…]
Now, just reboot (the modification takes effect immediately because each time systemd need to do something it reads files) and enjoy no more hangs:
Connection to xxx.xx closed by remote host.
Connection to xxx.xx closed.
Maybe I’ll put it on the wiki if someone can confirm that it’s not crappy.
Last edited by Sinma (2013-05-10 21:12:29)
Offline
Hi,
your solution is working for me.
But I needed a reboot to apply the change.
Thanks for you help.
Offline
Hi,
your solution is working for me.
But I needed a reboot to apply the change.Thanks for you help.
You could have done a systemctl daemon-reload instead.
PS: Don't remove After=remote-fs.target, just add network.target, too, I think.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
You should all be aware that the files in /usr/lib/systemd/system are not meant to be modified. They will be overwritten by an update.
Offline
I've seen this after my last update :-(
Is there any other/better way to fix this.
Unfortunately the bug (https://bugs.archlinux.org/task/31250) is closed with "Won't fix".
Offline