Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set Restart=always for a socket unit? #11553

Open
lahwaacz opened this issue Jan 25, 2019 · 1 comment
Open

How to set Restart=always for a socket unit? #11553

lahwaacz opened this issue Jan 25, 2019 · 1 comment
Labels
pid1 RFE 🎁 Request for Enhancement, i.e. a feature request

Comments

@lahwaacz
Copy link

Even socket units may fail, e.g. due to an out-of-memory situation, which may trigger errors like

systemd[1]: sshd.socket: Failed to fork off accept stub process: Cannot allocate memory

(The unit comes from Arch Linux openssh package.)

Since there is no "nice way to fix the root cause", setting Restart=always for the unit is needed to prevent losing access to headless hosts with difficult physical access, but that clause is valid only for services. Is there another way to have socket units always restart on failure?

@poettering poettering added RFE 🎁 Request for Enhancement, i.e. a feature request pid1 labels Jan 26, 2019
@mailinglists35
Copy link

mailinglists35 commented Mar 12, 2023

what is the workaround until a native solution is provided? create a service to check and restart the socket unit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pid1 RFE 🎁 Request for Enhancement, i.e. a feature request
Development

No branches or pull requests

3 participants