Re: dbus and swapping systemd targets.

Simon Lees <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>

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@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@linux-gruo:~> date
Fri May 12 12:10:10 ACST 2017
test@linux-gruo:~> date
Fri May 12 12:10:32 ACST 2017

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

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

test@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

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEED0hBIYMo9ADHKtZgEdQumr4Y/JEFAlkVJXUACgkQEdQumr4Y
/JEBzAf8CoXG1v5crwbpxp4mpkOTkWX0Tsn+6MJ/ulrEOJmqClEx9kNY7089Qx6M
1Z7InfxykYFiHo5Ul3wlL1IhITJIjI0n+3pXQXeBxhlIi9XZaFH8HNmFkg0+Nekc
vN0xuGHmyNgC5fIFzjzOPnw+YOUPbfd0DJCFljbRjsb76U1oAMbULCm26Sr6TIB7
xvuAj4R5dS6mGUS5lAq3cvWNU8uJoDNT0d9KSuHayKzAn9vjkuOfLaq8SQA2vvU4
orv247dQRd9sFEEsCW/zKqBrEXN05/utBELQKW7bTvogagiWr89RNJ9b7F+vGO08
9nOhKRDMgzYtt+JOM3jg12MFVdMf7A==
=Nc0w
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.