[systemd-devel] Socket is dying, how to automatically restart it?

Koen Kooi koen at dominion.thruhere.net
Thu May 9 00:13:13 PDT 2013


Op 23 apr. 2013, om 23:03 heeft George McCollister <george.mccollister at gmail.com> het volgende geschreven:

> On 04/20/2013 08:04 AM, Koen Kooi wrote:
>> Op 18 apr. 2013, om 19:18 heeft George McCollister<george.mccollister at gmail.com>  het volgende geschreven:
>> 
>>> On 04/10/2013 12:03 PM, Koen Kooi wrote:
>>>> Hi,
>>>> 
>>>> I have a bit of a heisenbug where dropbear.socket will just die and needs a systemctl restart dropbear.socket. I can't tell why it's dying, just that it does within 3 days of uptime. After restarting it it seems to be rock solid again for at least some weeks.
>>>> 
>>>> The real way to fix this is to find out why it dies, but till someone figures that out I'm looking to a way to automatically restart the socket when it fails, kinda like Restart=Always for services. Is such a thing possible? This is with 195 and 196, haven't tried 201 yet.
>>> I'm having exactly the same problem with sshd.socket (openssh) with systemd 197. I've done a netstat after it dies (just says dead no useful information) and port 22 still shows up under listening. systemctl start sshd.socket fixes the problem. I just upgraded to systemd 201 so I'll let you know if the problem shows up again. The problem happens intermittently so its been a bit elusive.
>> It is indeed elusive, it hasn't happened to me in the past week, so progress is slow on this.
>> ¸
>> regards,
>> 
>> Koen
> This is really strange but I think I just accidentally found a way to reproduce the problem.
> 1) Reboot
> 2) Verify ssh works
> 3) login as root and run: systemctl --system daemon-reload
> 
> Can't ssh anymore.
> 
> If I do 'systemctl start sshd.socket' I can ssh again and doing 'systemctl --system daemon-reload' again doesn't seem to break it.

I did a daemon reload the past week as well after reboot and yesterday my workstation suspended and dropped the connection, so I had to reconnect, which failed.

regards,

Koen




More information about the systemd-devel mailing list