← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2111107] Re: systemd user scope fails to connect

 

Verifying on plucky:

# apt policy systemd
systemd:
  Installed: 257.4-1ubuntu3.1
  Candidate: 257.4-1ubuntu3.1
  Version table:
     257.4-1ubuntu3.2 100
        100 http://archive.ubuntu.com/ubuntu plucky-proposed/main amd64 Packages
 *** 257.4-1ubuntu3.1 500
        500 http://archive.ubuntu.com/ubuntu plucky-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu plucky-security/main amd64 Packages
        100 /var/lib/dpkg/status
     257.4-1ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu plucky/main amd64 Packages

# systemctl --user status
● tester-p
    State: running
    Units: 63 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 2025-08-28 17:45:58 UTC; 9min ago
  systemd: 257.4-1ubuntu3.1
  Tainted: unmerged-bin
   CGroup: /user.slice/user-0.slice/user@0.service
           └─init.scope
             ├─585 /usr/lib/systemd/systemd --user
             └─586 "(sd-pam)"

# systemd-analyze --user verify /usr/lib/systemd/user/systemd-tmpfiles-setup.service
# echo $?
0
# systemctl  --user status
Failed to connect to user scope bus via local transport: Connection refused

So the bug is verifiable on plucky. Checking fix:

# apt policy systemd
systemd:
  Installed: 257.4-1ubuntu3.2
  Candidate: 257.4-1ubuntu3.2
  Version table:
 *** 257.4-1ubuntu3.2 100
        100 http://archive.ubuntu.com/ubuntu plucky-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     257.4-1ubuntu3.1 500
        500 http://archive.ubuntu.com/ubuntu plucky-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu plucky-security/main amd64 Packages
     257.4-1ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu plucky/main amd64 Packages

# systemd-analyze --user verify /usr/lib/systemd/user/systemd-tmpfiles-setup.service
# echo $?
0
# systemctl --user status
● tester-p
    State: running
    Units: 63 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 2025-08-28 17:45:58 UTC; 1h 46min ago
  systemd: 257.4-1ubuntu3.2
  Tainted: unmerged-bin
   CGroup: /user.slice/user-0.slice/user@0.service
           └─init.scope
             ├─585 /usr/lib/systemd/systemd --user --deserialize=28
             └─586 "(sd-pam)"

So the bug is fixed.

** Tags removed: verification-needed verification-needed-plucky
** Tags added: verification-done verification-done-plucky

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2111107

Title:
  systemd user scope fails to connect

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Plucky:
  Fix Committed

Bug description:
  [ Impact ]

   * Running `systemd-analyze --user verify` causes further calls to the systemd user scope to fail with `Failed to connect to user scope bus via local transport: Connection refused`.
   * This bug only exists on the version of systemd shipped in Plucky, and is already fixed upstream.

  [ Test Plan ]

   * Run `systemd --user status` or another systemd command targeting the user scope and observe normal output.
   * Run `systemd-analyze --user verify /usr/lib/systemd/user/systemd-tmpfiles-setup.service` which should run normally.
   * Running `systemd --user status` or another systemd command targeting the user scope afterwards should not fail.

  [ Where problems could occur ]

   * The fix for this bug effects the systemd manager, but only when running in test mode.
   * More specifically, running `systemd-analyze --user verify` or any other command that starts the manager in test mode should still work as expected.

  [ Other Info ]

   * Upstream issue: https://github.com/systemd/systemd/issues/36540
   * Upstream fix: https://github.com/systemd/systemd/pull/36719

  [ Original Description ]

  Using systemd --user for several user-level services. Upgraded to
  25.04 yesterday and noticed an issue today. Sometimes systemctl --user
  commands, threw a "Connection refused", which was new to me.

  Example:
  user@host:~$ systemctl --user daemon-reload
  Failed to connect to user scope bus via local transport: Connection refused

  So I went to look online and found this workaround in this thread for Arch ( https://bbs.archlinux.org/viewtopic.php?id=302556 ):
  unset XDG_RUNTIME_DIR
  systemctl --user daemon-reexec

  I know it's a different distro, but still wanted to mention it,
  especially since we're also using systemd 257 and this should be fixed
  in 258. The mentioned upstream bugreport:
  https://github.com/systemd/systemd/issues/36540

  ProblemType: Bug
  DistroRelease: Ubuntu 25.04
  Package: systemd 257.4-1ubuntu3
  ProcVersionSignature: Ubuntu 6.14.0-15.15-generic 6.14.0
  Uname: Linux 6.14.0-15-generic x86_64
  ApportVersion: 2.32.0-0ubuntu5
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CloudArchitecture: x86_64
  CloudID: none
  CloudName: none
  CloudPlatform: none
  CloudSubPlatform: config
  CurrentDesktop: sway
  Date: Fri May 16 15:49:11 2025
  InstallationDate: Installed on 2022-05-14 (1098 days ago)
  InstallationMedia: Ubuntu-Server 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220421)
  MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-6.14.0-15-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro
  SourcePackage: systemd
  SystemdFailedUnits:
   Error: command ['systemctl', 'status', '--full', '●'] failed with exit code 4: Invalid unit name "●" escaped as "\xe2\x97\x8f" (maybe you should use systemd-escape?).
   Unit \xe2\x97\x8f.service could not be found.
   ------
   Error: command ['systemctl', 'status', '--full', '●'] failed with exit code 4: Invalid unit name "●" escaped as "\xe2\x97\x8f" (maybe you should use systemd-escape?).
   Unit \xe2\x97\x8f.service could not be found.
  UpgradeStatus: Upgraded to plucky on 2025-05-15 (1 days ago)
  dmi.bios.date: 08/21/2024
  dmi.bios.release: 5.17
  dmi.bios.vendor: American Megatrends International, LLC.
  dmi.bios.version: L3.47
  dmi.board.name: B550 Phantom Gaming-ITX/ax
  dmi.board.vendor: ASRock
  dmi.chassis.asset.tag: To Be Filled By O.E.M.
  dmi.chassis.type: 3
  dmi.chassis.vendor: To Be Filled By O.E.M.
  dmi.chassis.version: To Be Filled By O.E.M.
  dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrL3.47:bd08/21/2024:br5.17:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnB550PhantomGaming-ITX/ax:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:skuToBeFilledByO.E.M.:
  dmi.product.family: To Be Filled By O.E.M.
  dmi.product.name: To Be Filled By O.E.M.
  dmi.product.sku: To Be Filled By O.E.M.
  dmi.product.version: To Be Filled By O.E.M.
  dmi.sys.vendor: To Be Filled By O.E.M.
  modified.conffile..etc.logrotate.d.apport: [modified]
  modified.conffile..etc.systemd.journald.conf: [modified]
  mtime.conffile..etc.logrotate.d.apport: 2023-01-22T12:04:04.279288
  mtime.conffile..etc.systemd.journald.conf: 2022-08-13T22:29:21.911636

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2111107/+subscriptions



References