← Back to team overview

touch-packages team mailing list archive

[Bug 1476364] [NEW] “systemd --user” instance can't find d-bus

 

Public bug reported:

I have an executable I'd like to run as a user and that user should be
able to start and stop that service without sudo.

I have `systemd --user` always running for the user by running `loginctl
enable-linger user`

I've confirmed the `systemd --user` instance is running as that user
using `ps` but when I try to run any `systemctl` command as that user, I
get the following error:

    vagrant-ubuntu-vivid-64:~$ systemctl --user list-units
    Failed to get D-Bus connection: Connection refused

Based on my googling it sounds like I should have a `dbus-daemon`
instance running as that user but it is not. It should be noted I'm
switching to the user with `su` so it may not be counting as a "login".

It seems that either:

1. My user instance of `systemd` should use the system instance of d-bus.
2. Ubuntu should somehow be starting a user instance of d-bus.

On Gentoo, for example, there is a user instance of `dbus-daemon`.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: systemd 219-7ubuntu6
ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
Uname: Linux 3.19.0-21-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
Date: Mon Jul 20 19:00:19 2015
JournalErrors: Error: command ['journalctl', '-b', '--priority', 'warning'] failed with exit code 1: No journal files were found.
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: innotek GmbH VirtualBox
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-21-generic root=UUID=e176bae0-84a5-4bd2-b968-e809e902488c ro console=tty1 console=ttyS0
SourcePackage: systemd
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.board.name: VirtualBox
dmi.board.vendor: Oracle Corporation
dmi.board.version: 1.2
dmi.chassis.type: 1
dmi.chassis.vendor: Oracle Corporation
dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:rvnOracleCorporation:rnVirtualBox:rvr1.2:cvnOracleCorporation:ct1:cvr:
dmi.product.name: VirtualBox
dmi.product.version: 1.2
dmi.sys.vendor: innotek GmbH

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug uec-images vivid

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

Title:
  “systemd --user” instance can't find d-bus

Status in systemd package in Ubuntu:
  New

Bug description:
  I have an executable I'd like to run as a user and that user should be
  able to start and stop that service without sudo.

  I have `systemd --user` always running for the user by running
  `loginctl enable-linger user`

  I've confirmed the `systemd --user` instance is running as that user
  using `ps` but when I try to run any `systemctl` command as that user,
  I get the following error:

      vagrant-ubuntu-vivid-64:~$ systemctl --user list-units
      Failed to get D-Bus connection: Connection refused

  Based on my googling it sounds like I should have a `dbus-daemon`
  instance running as that user but it is not. It should be noted I'm
  switching to the user with `su` so it may not be counting as a
  "login".

  It seems that either:

  1. My user instance of `systemd` should use the system instance of d-bus.
  2. Ubuntu should somehow be starting a user instance of d-bus.

  On Gentoo, for example, there is a user instance of `dbus-daemon`.

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: systemd 219-7ubuntu6
  ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
  Uname: Linux 3.19.0-21-generic x86_64
  ApportVersion: 2.17.2-0ubuntu1.1
  Architecture: amd64
  Date: Mon Jul 20 19:00:19 2015
  JournalErrors: Error: command ['journalctl', '-b', '--priority', 'warning'] failed with exit code 1: No journal files were found.
  Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
  MachineType: innotek GmbH VirtualBox
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-21-generic root=UUID=e176bae0-84a5-4bd2-b968-e809e902488c ro console=tty1 console=ttyS0
  SourcePackage: systemd
  UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 12/01/2006
  dmi.bios.vendor: innotek GmbH
  dmi.bios.version: VirtualBox
  dmi.board.name: VirtualBox
  dmi.board.vendor: Oracle Corporation
  dmi.board.version: 1.2
  dmi.chassis.type: 1
  dmi.chassis.vendor: Oracle Corporation
  dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:rvnOracleCorporation:rnVirtualBox:rvr1.2:cvnOracleCorporation:ct1:cvr:
  dmi.product.name: VirtualBox
  dmi.product.version: 1.2
  dmi.sys.vendor: innotek GmbH

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


Follow ups