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

sshd does not start on Fedora >=30 #39

Closed
aither64 opened this issue Jul 20, 2019 · 5 comments
Closed

sshd does not start on Fedora >=30 #39

aither64 opened this issue Jul 20, 2019 · 5 comments

Comments

@aither64
Copy link
Member

@aither64 aither64 commented Jul 20, 2019

sshd sometimes does not start on boot on Fedora 30, even though it is enabled. It happens while testing built images and on staging as well. No idea what's going on, there's not even any attempt at starting it, the service is sometimes just ignored.

@GoodMirek
Copy link

@GoodMirek GoodMirek commented Jul 20, 2019

I was original reporter of this issue in Redmine. Let me add some more details here.

It happened again with #13892 and #13894, here is the reproduction scenario:

  1. Create a new VPS from FC30 template
  2. Deploy a public key
  3. Verify it is possible to login via SSH
  4. Enable Docker and FUSE features
  5. After automatic VPS restart, verify that it is not possible to login
  6. Initiate VPS restart
  7. Verify that it is not possible to login via SSH
  8. Generate a root passoword and login from VPS admin via console
  9. Verify that sshd is not running with command systemctl status sshd
  10. Run systemctl enable sshd and systemctl start sshd
  11. Verify that is is possible to login via SSH
  12. Initiate VPS restart
  13. Verify that is is possible to login via SSH

# 5 Updated by Aither 5 days ago
Comment
Yeah it happens regularly on F30. SSHD just doesn't start sometimes and I have no idea why. It is
enabled, but systemd ignores it for some reason. The steps don't matter, every VPS start is like a
lottery ticket.

In two tests, I was able to reproduce that the issue happened only with additional VM features.

@aither64
Copy link
Member Author

@aither64 aither64 commented Oct 30, 2019

I don't think it's connected to any VM features. Just had the same thing happen on Fedora 31. It seems random to me, timing perhaps, still no idea. I've added template for Fedora 31, even though the problem is still there.

@aither64 aither64 changed the title sshd does not start on Fedora 30 sshd does not start on Fedora >=30 Oct 30, 2019
@aither64
Copy link
Member Author

@aither64 aither64 commented Nov 13, 2020

While working on an image for F33, I discovered that this can be solved by... disabling sshd.service. There's still sshd.socket, which seems to work reliably.

systemctl disable sshd.service
systemctl enable sshd.socket

(both are enabled by default, which somehow results in sshd sometimes not being started)

@GoodMirek
Copy link

@GoodMirek GoodMirek commented Nov 13, 2020

Thanks!
Let me just share my finding which I forgot to add here - when sshd service was failing at boot, it printed to the console that it could not start as network was down. So there was/is probably a missing dependency somewhere.

@aither64
Copy link
Member Author

@aither64 aither64 commented Nov 14, 2020

Ah, I never noticed it. Well, it would definitely be better to have sshd.service enabled and functional, socket-activated ssh sucks when you're running out of memory, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants