dbus and swapping systemd targets.

Simon Lees sflees at suse.de
Fri May 12 03:01:08 UTC 2017



On 05/10/2017 01:14 AM, Simon McVittie wrote:
> On Tue, 09 May 2017 at 16:42:41 +0930, Simon Lees wrote:
>> Having done that most desktops won't boot due to not being able to
>> connect to dbus and running dbus monitor from the ssh session reports.
>>
>> Failed to open connection to session bus: Failed to connect to socket
>> /run/user/1001/bus: Connection refused
>>
>> Does anyone have any suggestions for making this work better?
> 
> Please look at the Journal log and see whether something has been
> stopped that should not have been. If that doesn't guide you to a solution,
> please tell us what happened, with excerpts from the log wherever they
> seem relevant.
> 
> I would guess that `systemctl isolate` might be terminating the
> `systemd --user` instance that was started by your ssh login,
> which is what listens on the $XDG_RUNTIME_DIR/bus socket? But that's
> a wild guess that is not based on any evidence, because I don't have
> any evidence.
> 
Based off the following evidence its probably a reasonable assumption,
if the whole session is closing I guess it would be better to try and
fix that rather then focusing just on dbus.

test at linux-gruo:~> dbus-monitor
signal time=1494556806.294641 sender=org.freedesktop.DBus ->
destination=:1.1 serial=2 path=/org/freedesktop/DBus;
interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.1"

 .....

test at linux-gruo:~> date
Fri May 12 12:10:10 ACST 2017
test at linux-gruo:~> date
Fri May 12 12:10:32 ACST 2017

  < systemctl isolate graphical.target run from a different session>

test at linux-gruo:~> dbus-monitor
Failed to open connection to session bus: Failed to connect to socket
/run/user/1001/bus: Connection refused
test at linux-gruo:~> date
Fri May 12 12:10:43 ACST 2017

test at linux-gruo:~> journalctl
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.

  ......

May 12 12:10:01 linux-gruo systemd[1554]: Reached target Timers.
May 12 12:10:01 linux-gruo systemd[1554]: Starting D-Bus User Message
Bus Socket.
May 12 12:10:01 linux-gruo systemd[1554]: Reached target Paths.
May 12 12:10:01 linux-gruo systemd[1554]: Listening on D-Bus User
Message Bus Socket.
May 12 12:10:01 linux-gruo systemd[1554]: Reached target Sockets.
May 12 12:10:01 linux-gruo systemd[1554]: Reached target Basic System.
May 12 12:10:01 linux-gruo systemd[1554]: Reached target Default.
May 12 12:10:01 linux-gruo systemd[1554]: Startup finished in 66ms.
May 12 12:10:06 linux-gruo systemd[1554]: Started D-Bus User Message Bus.
May 12 12:10:06 linux-gruo dbus-daemon[1603]: Connection :1.1 (uid=1001
pid=1602 comm="dbus-monitor ") became a monitor.
May 12 12:10:08 linux-gruo dbus-daemon[1603]: Monitoring connection :1.1
closed.
May 12 12:10:33 linux-gruo systemd[1554]: Stopping D-Bus User Message Bus...
May 12 12:10:33 linux-gruo systemd[1554]: Stopped target Default.
May 12 12:10:33 linux-gruo systemd[1554]: Stopped D-Bus User Message Bus.
May 12 12:10:33 linux-gruo systemd[1554]: Stopped target Basic System.
May 12 12:10:33 linux-gruo systemd[1554]: Stopped target Timers.
May 12 12:10:33 linux-gruo systemd[1554]: Stopped target Paths.
May 12 12:10:33 linux-gruo systemd[1554]: Stopped target Sockets.
May 12 12:10:33 linux-gruo systemd[1554]: Closed D-Bus User Message Bus
Socket.
May 12 12:10:33 linux-gruo systemd[1554]: Reached target Shutdown.
May 12 12:10:33 linux-gruo systemd[1554]: Starting Exit the Session...
May 12 12:10:33 linux-gruo systemd[1554]: Received SIGRTMIN+24 from PID
1661 (kill).
May 12 12:10:33 linux-gruo systemd[1555]:
pam_unix(systemd-user:session): session closed for user test

-- 

Simon Lees (Simotek)                            http://simotek.net

Emergency Update Team                           keybase.io/simotek
SUSE Linux                           Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20170512/53c63ee6/attachment.sig>


More information about the dbus mailing list