SSH and FTP Slow Authentication, DBUS and Logind Restart

Fairly interesting Plesk Onyx, ProFTPD, DBUS and Logind scenario recently.

Had a server sporadically terminating FTP sessions that were working fine previously. After verifying overall connectivity and firewalling were not the issue time to start diging through logs. While I could see the incomplete and terminated FTP sessions, there was nothing incredibly insightful as to why. Seeing the FTP daemon had been up & running without issues for almost two years I decided to just restart the ProFTPD service – sometimes stuff just needs to be kicked and if stuff was working before, that’s an easy step to eliminate before introducing ‘changes’.  Restarted ProFTPD (actually xinetd as it was a Plesk server).

Afterwards I was watching logs and noticed:

proftpd: pam_systemd(proftpd:session): Failed to connect to system bus: No such file or directory

Since that’s normally associated with the DBUS service, I figured I’d restart DBUS too, been 2 years right…

# systemctl restart dbus.service

Everything seems nomral, but now I’m seeing delays in authentication and session failures for SSH, FTP and anything pam related. Geez…

pam_systemd(sshd:session): Failed to create session: Activation of org.freedesktop.login1 timed out

After some more digging around, it seems if you ever restart the dbus service, there’s a really good chance you’ll need to also kick the logind process too to get everything working as it should. So, bounced that…

systemctl restart systemd-logind

Bada bing, everything back to normal, no dbus errors, pam auth delays, session failures. Success !

Leave a Reply

Your email address will not be published. Required fields are marked *