You are not logged in.

#1 2014-10-28 19:04:47

MikeDacre
Member
From: San Francisco Bay Area
Registered: 2013-01-18
Posts: 51
Website

dbus issue on ssh - ssh delay

I have been having trouble with dbus on one of my servers for a couple of weeks.

At some point, for no reason I can figure out, logins via ssh start becomeing very slow, and I start seeing the following errors:

Oct 28 11:42:09 <host> dbus[5351]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Oct 28 11:42:34 <host> sshd[16074]: pam_systemd(sshd:session): Failed to create session: Connection timed out
Oct 28 11:42:34 <host> dbus[5351]: [system] Failed to activate service 'org.freedesktop.login1': timed out

Specifically, for every attepted ssh session, journalctl -f -u sshd shows:

Oct 28 11:57:44 <host> sshd[23722]: Accepted password for <user> from 192.168.0.4 port 39612 ssh2
Oct 28 11:57:44 <host> sshd[23722]: pam_unix(sshd:session): session opened for user <user> by (uid=0)
Oct 28 11:58:09 <host> sshd[23722]: pam_systemd(sshd:session): Failed to create session: Connection timed out

and journalctl -f /usr/bin/dbus-daemon shows:

Oct 28 11:57:44 <host> dbus[19374]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Oct 28 11:58:09 <host> dbus[19374]: [system] Failed to activate service 'org.freedesktop.login1': timed out

This happens even when I login without X11 support.

I noticed a related problem trying to run emacs earier today, on startup it would display the message:

** (emacs:19770): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-OwF0frKx4G: Connection refused

After some experimentation I found that even after explicitly starting a dbus session with dbus-launch, dbus created no session in /tmp, it set

DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-e2DDyF2Ifb,guid=2165f2c1370aeb39026a9b04544fd218

but /tmp/dbus-e2DDyF2Ifb did not exist, and attempts to connect to it failed.

This last issue is not a big deal, but the login issue is. Last time this issue happened, logins were slow for several hours, and then at some point after a while, the CPU locked up and refused to allow any ssh sessions refused to run. I had to reboot the machine, and the reboot failed also, necessitating a hard reboot.  This all seems to be related to dbus, ssh, and pam, but I can't unravel it.

Any ideas?

Last edited by MikeDacre (2014-10-28 19:32:37)

Offline

#2 2014-10-28 19:32:23

MikeDacre
Member
From: San Francisco Bay Area
Registered: 2013-01-18
Posts: 51
Website

Re: dbus issue on ssh - ssh delay

Note, this is a clone of this thread: https://bbs.archlinux.org/viewtopic.php?id=178357

However, although rebooting fixes this issue, it comes back after a few days.

I did find one big clue though. When I checked the journal for systemd-logind, I found these two lines:

Oct 28 10:42:52 fraser-server systemd-logind[592]: Failed to abandon session scope: Transport endpoint is not connected
Oct 28 10:46:35 fraser-server systemd-logind[592]: Failed to abandon session scope: Transport endpoint is not connected

right at the time when the issue started.

Restarting systemd seems to have fixed the problem, at least for now.

I also notice that in /etc/pam.d/system-login there is the following line:

-session   optional   pam_systemd.so

Is that line necessary? I have a desktop environment installed on this system.. but it is rarely used and I am considering deleting it. This computer is never logged into locally, and is only ever accessed via ssh and nfs.

Offline

Board footer

Powered by FluxBB