Subject: bug#878: loginctl[2676]: Failed to connect to bus: No such file or directory

From: Andrew Bower <[email-masked]>
Date: Fri, 07 Mar 2025 19:07:43 +0000

Package: elogind
Version: 255.17-2
Severity: normal

Dear Maintainer,

I see this reported through syslog at the error level:

  loginctl[2676]: Failed to connect to bus: No such file or directory

I'm not aware of anything notably special about my environment. I've not
noticed it before, but that's probably because I just switched syslog daemon.

Thanks,

Andrew

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 6 (excalibur/ceres)
Release:	6
Codename:	excalibur ceres
Architecture: x86_64

Kernel: Linux 6.10.9-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: runit (via /run/runit.stopit)

Versions of packages elogind depends on:
ii  dbus                  1.16.2-1devuan1
ii  debconf               1.5.89
ii  init-system-helpers   1.68devuan1
ii  libacl1               2.3.2-2+b1
ii  libc6                 2.41-3
ii  libcap2               1:2.73-4
ii  libelogind0           255.17-2
ii  libeudev1 [libudev1]  3.2.14-2
ii  libmount1             2.40.4-5devuan1
ii  libpam0g              1.7.0-3
ii  libselinux1           3.8-4

Versions of packages elogind recommends:
ii  libpam-elogind  255.17-2
ii  polkitd         126-2devuan1

elogind suggests no packages.

-- no debconf information

---

From: Mark Hindley <[email-masked]>
Date: Sat, 8 Mar 2025 18:29:08 +0000

Control: tags -1 unreproducible moreinfo

Andrew,

Thanks for this. However, I cannot reproduce on a sysvinit ceres system. I
wonder if it is a failure in the runit dbus scripts?

>   loginctl[2676]: Failed to connect to bus: No such file or directory

Is this every time or only the first time?

That sounds as if system dbus isn't running. What is the output of

 ps -lfC dbus-daemon

If the system bus *is* running, what does

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:32:04 +0000 (UTC)

This is the mail system at host email.devuan.org.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<[email-masked]>: host lists.dyne.org[49.12.185.81] said: 554 5.7.1
    Service unavailable; Unverified Client host [polpo.devuan.org] blocked
    using dbl.spamhaus.org; Error: open resolver;
    https://check.spamhaus.org/returnc/pub/2a01:4f8:0:a231::add:2c/ (in reply
    to RCPT TO command)

Subject: bug#878: loginctl[2676]: Failed to connect to bus: No such file or directory
From: Mark Hindley <[email-masked]>
To: Andrew Bower <[email-masked]>, [email-masked]
Date: Sat, 8 Mar 2025 18:29:08 +0000

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:34:07 +0000 (UTC)

The mail system

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:32:04 +0000 (UTC)

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:36:04 +0000 (UTC)

The mail system

<[email-masked]>: host lists.dyne.org[49.12.185.81] said: 554 5.7.1
    Service unavailable; Unverified Client host [polpo.devuan.org] blocked
    using dbl.spamhaus.org; Error: open resolver;
    https://check.spamhaus.org/returnc/pub/2a01:4f8:0:a231::add:2b/ (in reply
    to RCPT TO command)

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:34:07 +0000 (UTC)

                   The mail system

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:38:07 +0000 (UTC)

The mail system

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:36:04 +0000 (UTC)

                   The mail system

                   The mail system

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:40:03 +0000 (UTC)

The mail system

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:38:07 +0000 (UTC)

                   The mail system

                   The mail system

                   The mail system

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:42:05 +0000 (UTC)

The mail system

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:40:03 +0000 (UTC)

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:44:05 +0000 (UTC)

The mail system

<[email-masked]>: host lists.dyne.org[49.12.185.81] said: 554 5.7.1
    Service unavailable; Unverified Client host [polpo.devuan.org] blocked
    using dbl.spamhaus.org; Error: open resolver;
    https://check.spamhaus.org/returnc/pub/2a01:4f8:0:a231::add:2a/ (in reply
    to RCPT TO command)

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:42:05 +0000 (UTC)

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:46:07 +0000 (UTC)

The mail system

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:44:05 +0000 (UTC)

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: [email-masked] (Mail Delivery System)
Date: Sat, 8 Mar 2025 18:48:04 +0000 (UTC)

The mail system

<[email-masked]>: host lists.dyne.org[49.12.185.81] said: 554 5.7.1
    Service unavailable; Unverified Client host [polpo.devuan.org] blocked
    using dbl.spamhaus.org; Error: open resolver;
    https://check.spamhaus.org/returnc/pub/2a01:4f8:0:a104::add:1b/ (in reply
    to RCPT TO command)

Subject: bug#878: Undelivered Mail Returned to Sender
From: [email-masked] (Mail Delivery System)
To: [email-masked]
Date: Sat, 8 Mar 2025 18:46:07 +0000 (UTC)

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

                   The mail system

Andrew,

 ps -lfC dbus-daemon

 busctl

show?

Mark

---

From: Andrew Bower <[email-masked]>
Date: Sun, 16 Mar 2025 09:22:13 +0000

Hi Mark,

> wonder if it is a failure in the runit dbus scripts?

Sorry for the delay checking this.

You are probably right to suggest that it is much more likely to be an
issue with the startup sequencing under runit than a bug in src:elogind.

I just tried with the pending runit-service that includes

https://salsa.debian.org/debian/runit-services/-/commit/a143a4ed2970ab805a8402da928506f108f8d924

to improve dbus readiness checking but that didn't help. Perhaps I
should check on a Debian/runit host so this ends up in the right BTS.

> Is this every time or only the first time?

Once on startup. I've not noticed any functional degradation.

> That sounds as if system dbus isn't running. What is the output of

F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
4 S message+  2879  2867  3  80   0 -  1777 -      09:07 ?        00:00:07 /usr/bin/dbus-daemon --system --nofork --nopidfile
1 S ajb85     4527     1  0  80   0 -  1669 -      09:08 ?        00:00:00 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session
0 S ajb85     4566  4560  0  80   0 -  1514 -      09:08 ?        00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus_0.0

> If the system bus *is* running, what does

NAME                                  PID PROCESS         USER    CONNECTION    UNIT   SESSION DESCRIPTION
:1.0                                 2887 cupsd           root    :1.0          -      -       -
:1.1                                 3359 colord          colord  :1.1          -      -       -
:1.11                                2919 NetworkManager  root    :1.11         -      -       -
:1.13                                2985 power-profiles- root    :1.13         -      -       -
:1.14                                3516 polkitd         polkitd :1.14         -      -       -
:1.17                                3530 saned           saned   :1.17         -      -       -
:1.19                                3017 bluetoothd      root    :1.19         -      -       -
:1.25                                3021 elogind         root    :1.25         -      -       -
:1.27                                2789 cups-browsed    root    :1.27         -      -       -
:1.28                                2789 cups-browsed    root    :1.28         -      -       -
:1.29                                3737 wpa_supplicant  root    :1.29         -      -       -
:1.30                                3739 ModemManager    root    :1.30         -      -       -
:1.32                                4074 python3         root    :1.32         docker -       -
:1.35                                4195 dbus            lp      :1.35         -      -       -
:1.37                                4475 gnome-keyring-d ajb85   :1.37         1      -       -
:1.38                                4479 xfce4-session   ajb85   :1.38         1      -       -
:1.39                                4656 xfce4-panel     ajb85   :1.39         1      -       -
:1.4                                 3497 dbus            lp      :1.4          -      -       -
:1.40                                4676 xfce4-power-man ajb85   :1.40         1      -       -
:1.41                                4712 upowerd         root    :1.41         -      -       -
:1.43                                4673 wrapper-2.0     ajb85   :1.43         1      -       -
:1.44                                4756 xdg-desktop-por ajb85   :1.44         1      -       -
:1.45                                4773 gvfs-udisks2-vo ajb85   :1.45         1      -       -
:1.46                                4729 xdg-desktop-por ajb85   :1.46         1      -       -
:1.47                                4779 udisksd         root    :1.47         -      -       -
:1.48                                4790 rtkit-daemon    root    :1.48         -      -       -
:1.49                                4672 wrapper-2.0     ajb85   :1.49         1      -       -
:1.5                                 3495 dbus            lp      :1.5          -      -       -
:1.51                                4877 agent           ajb85   :1.51         1      -       -
:1.52                                4890 xscreensaver-sy ajb85   :1.52         1      -       -
:1.53                                4903 xiccd           ajb85   :1.53         1      -       -
:1.54                                4891 polkit-gnome-au ajb85   :1.54         1      -       -
:1.55                                4871 nm-applet       ajb85   :1.55         1      -       -
:1.56                                4901 applet.py       ajb85   :1.56         1      -       -
:1.57                                4857 wireplumber     ajb85   :1.57         1      -       -
:1.58                                4857 wireplumber     ajb85   :1.58         1      -       -
:1.6                                 3496 dbus            lp      :1.6          -      -       -
:1.60                                4675 nextcloud       ajb85   :1.60         1      -       -
:1.63                                6357 busctl          root    :1.63         1      -       -
:1.9                                 2980 avahi-daemon    avahi   :1.9          -      -       -
com.redhat.NewPrinterNotification    4901 applet.py       ajb85   :1.56         1      -       -
com.redhat.PrinterDriversInstaller   4901 applet.py       ajb85   :1.56         1      -       -
fi.w1.wpa_supplicant1                3737 wpa_supplicant  root    :1.29         -      -       -
net.hadess.PowerProfiles             2985 power-profiles- root    :1.13         -      -       -
org.bluez                            3017 bluetoothd      root    :1.19         -      -       -
org.freedesktop.Avahi                2980 avahi-daemon    avahi   :1.9          -      -       -
org.freedesktop.ColorManager         3359 colord          colord  :1.1          -      -       -
org.freedesktop.DBus                 2879 dbus-daemon     root    -             -      -       -
org.freedesktop.GeoClue2                - -               -       (activatable) -      -       -
org.freedesktop.ModemManager1        3739 ModemManager    root    :1.30         -      -       -
org.freedesktop.NetworkManager       2919 NetworkManager  root    :1.11         -      -       -
org.freedesktop.PolicyKit1           3516 polkitd         polkitd :1.14         -      -       -
org.freedesktop.RealtimeKit1         4790 rtkit-daemon    root    :1.48         -      -       -
org.freedesktop.UDisks2              4779 udisksd         root    :1.47         -      -       -
org.freedesktop.UPower               4712 upowerd         root    :1.41         -      -       -
org.freedesktop.UPower.PowerProfiles 2985 power-profiles- root    :1.13         -      -       -
org.freedesktop.login1               3021 elogind         root    :1.25         -      -       -
org.freedesktop.nm_dispatcher           - -               -       (activatable) -      -       -
org.freedesktop.nm_priv_helper          - -               -       (activatable) -      -       -
org.opensuse.CupsPkHelper.Mechanism     - -               -       (activatable) -      -       -

---

From: Andrew Bower <[email-masked]>
Date: Sun, 16 Mar 2025 10:39:38 +0000

> should check on a Debian/runit host so this ends up in the right BTS.

I cannot reproduce this on Debian/runit.

---

From: Mark Hindley <[email-masked]>
Date: Sun, 16 Mar 2025 19:19:10 +0000

Andrew,

> Once on startup. I've not noticed any functional degradation.

So where is that loginctl call coming from? It looks like it happens *before*
the system dbus is started.

Mark

---

From: Andrew Bower <[email-masked]>
Date: Sun, 16 Mar 2025 21:17:20 +0000

> the system dbus is started.

I suspect it's the elogind check script (/etc/sv/elogind/check). Let's
bring in Lorenzo.

---

From: Lorenzo <[email-masked]>
Date: Mon, 17 Mar 2025 01:10:57 +0100

On Sun, 16 Mar 2025 21:17:20 +0000
Andrew Bower <[email-masked]> wrote:

> > So where is that loginctl call coming from? It looks like it
> > happens *before* the system dbus is started.
> 

very likely; since dbus, elogind and login managers are started at the
same time, I'd expect elogind check at least to fail once at boot.

> I cannot reproduce this on Debian/runit.
Humm, I'd expect this on Debian too, but it's a race so it could be
intermittent

cat /etc/service/elogind/check 
#!/bin/sh

# race: greyed buttons on lightdm/sddm
# make sure that elogind can see the login and that will open a session for the user
loginctl show-seat seat0 >/dev/null && exit 0
exit 1

I guess I should silence stderr instead of stdout (or both)?
Anyway, unless I'm missing something, it's a minor bug in
runit-services.

Best,
Lorenzo

---

From: Mark Hindley <[email-masked]>
Date: Mon, 17 Mar 2025 06:49:37 +0000

> same time, I'd expect elogind check at least to fail once at boot.

Wouldn't it be better to start dbus first?

Mark

---

From: Lorenzo <[email-masked]>
Date: Mon, 17 Mar 2025 11:23:26 +0100

On Mon, 17 Mar 2025 06:49:37 +0000
Mark Hindley <[email-masked]> wrote:

> > > I suspect it's the elogind check script (/etc/sv/elogind/check).
> > > Let's bring in Lorenzo.
> > 
> > very likely; since dbus, elogind and login managers are started at
> > the same time, I'd expect elogind check at least to fail once at
> > boot.
> 

yeah, we already do that, (elogind waits for dbus) but the way the
start "sequence" works in runit imply that the elogind check file is
run to check whether elogind is available when starting a login manager
and there is no guarantee that elogind is ready in the first iteration.
I guess Andrew is using a login manager that has no hard dependency on
dbus so the run file, after checking for dbus proceeds on checking for
elogind even if dbus is not ready yet ..
Andrew, are you using slim or sddm ?

Lorenzo

---

From: Andrew Bower <[email-masked]>
Date: Mon, 17 Mar 2025 18:41:22 +0000

> Andrew, are you using slim or sddm ?

slim:

  sv start dbus || true
  sv start elogind || true

But 'sv start' will run the check script, won't it, which now tests a
dbus 'ping'.

So probably on my system it is what we (I) recently added [1],

docker:

  sv start elogind

But I don't think we want to start encoding transitive dependencies
which aren't also first class dependencies, so I think we just divert
stderr in the dbus check file as you first suggested!

-Andrew

[1] https://salsa.debian.org/debian/runit-services/-/commit/047d1c88479f0ab750bacdb45a1113d1269641b4

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Thu, 10 Apr 2025 13:52:02 +0000

This is an automatic notification regarding your bug report
which was filed against the runit-services package:

#878: loginctl[2676]: Failed to connect to bus: No such file or directory

It has been closed by Lorenzo <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Lorenzo <[email-masked]> by
replying to this email.

-- 
878: https://bugs.devuan.org/cgi/bugreport.cgi?bug=878
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: done in Debian - runit-services 0.9.0
From: Lorenzo <[email-masked]>
To: [email-masked]
Date: Thu, 10 Apr 2025 15:50:27 +0200

Package: runit-servics
Version: 0.9.0

thanks

Subject: loginctl[2676]: Failed to connect to bus: No such file or directory
From: Andrew Bower <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Fri, 07 Mar 2025 19:07:43 +0000

Package: elogind
Version: 255.17-2
Severity: normal

Dear Maintainer,

Thanks,

Andrew

-- System Information:
Distributor ID:	Devuan