Failed to abandon session scope Transport endpoint arkit
Issue reported by user: Logging in to RHEL 7 /Centos 7 server is very slow which is taking around ~30seconds to a single ssh session. After verifying journal logs found below errors. “Failed to abandon session scope Transport endpoint is not connected” arkit
Aug 24 04:06:26 arkitserv02 dbus[84213]: [system] Failed to activate service 'org.freedesktop.login1': timed out Aug 24 04:09:26 arkitserv02 crond[23475]: pam_systemd(crond:session): Failed to create session: Connection timed out
Logind service status as well with errors
root@arkitserv02:~# systemctl status systemd-logind ● systemd-logind.service - Login Service Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static; vendor preset: disabled) Active: active (running) since Wed 2020-08-12 12:32:38 PDT; 1 weeks 4 days ago Docs: man:systemd-logind.service(8) man:logind.conf(5) http://www.freedesktop.org/wiki/Software/systemd/logind http://www.freedesktop.org/wiki/Software/systemd/multiseat Main PID: 2831 (systemd-logind) Status: "Processing requests..." CGroup: /system.slice/systemd-logind.service └─2831 /usr/lib/systemd/systemd-logind Aug 20 06:22:59 arkitserv02 systemd-logind[2831]: Failed to abandon session scope: Transport endpoint is not connected Aug 20 06:22:59 arkitserv02 systemd-logind[2831]: Failed to abandon session scope: Transport endpoint is not connected
How to resolve SSH login slow issue – verify the following
- Verify /etc/hosts contain its own server name 127.0.0.1 and IP address
- Check /etc/resolv.conf has working DNS server entries
- Change DNS lookup value in sshd_config file (UseDNS no)
- Restart sshd service
- Restart systemctl restart systemd-logind & systemctl restart dbus.service
if you still see the issue then do below steps to resolve ssh slowness
Check systems version using below command
# systemctl --version systemd 219 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
This issue can happen because of an “abandoned” user session. You can check with the command
root@arkitserv02:~# systemctl | grep 'of user'| grep 'abandoned' session-18.scope loaded active abandoned Session 18 of user root session-c1.scope loaded active abandoned Session c1 of user user1 session-c2.scope loaded active abandoned Session c2 of user user2
You can delete session directories
# rm -rf /run/systemd/system/sessionscope
Any runtime issues can be fixed by below commands, it will not hamper anything on the system
# systemctl daemon-reexec
If daemon-reexec fails with timeout then you should try
# kill 1
Related Articles
SSH login using windows SSH private key
Ansible playbook for copying ssh keys
run long-running jobs from ssh sessions
Thanks for Your Wonderful Support and Encouragement
More than 40,000 techies are part of our ARKIT community. Join us today and keep learning Linux, Cloud, Storage, DevOps, and IT technologies.