dbus Failed to connect to socket /run/dbus/system_bus_socket: Connection refused

kafteras

Member
Nov 14, 2021
15
1
8
Hello

There seems to be a problem with dbus in repos..

Code:
The following packages have unmet dependencies:
 dbus : Depends: dbus-bin (= 1.12.20-3)
        Depends: libdbus-1-3 (= 1.12.20-3) but 1.12.24-0+deb11u1 is to be installed
 dbus-daemon : Depends: dbus-bin (= 1.12.20-3)
               Depends: libdbus-1-3 (= 1.12.20-3) but 1.12.24-0+deb11u1 is to be installed
 dbus-user-session : Depends: dbus (>= 1.12.24-0+deb11u1) but 1.12.20-3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

dbus tries to update, but has dependencies that need older version.
And now im stuck with a broken dbus, unable to remove it, install it or start it

Now every vm returns:
Code:
/usr/sbin/qm start 103
org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /run/dbus/system_bus_socket: Connection refused

Help please :D

info:

Code:
pveversion -v
proxmox-ve: 7.2-1 (running kernel: 5.15.53-1-pve)
pve-manager: 7.2-11 (running version: 7.2-11/b76d3178)
pve-kernel-helper: 7.2-12
pve-kernel-5.15: 7.2-10
pve-kernel-5.13: 7.1-9
pve-kernel-5.11: 7.0-10
pve-kernel-5.15.53-1-pve: 5.15.53-1
pve-kernel-5.15.39-4-pve: 5.15.39-4
pve-kernel-5.15.39-3-pve: 5.15.39-3
pve-kernel-5.15.39-2-pve: 5.15.39-2
pve-kernel-5.15.39-1-pve: 5.15.39-1
pve-kernel-5.15.35-2-pve: 5.15.35-5
pve-kernel-5.13.19-6-pve: 5.13.19-15
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-4-pve: 5.11.22-9
ceph-fuse: 16.2.7+ds-4
corosync: 3.1.6-1
criu: 3.16.1-2
glusterfs-client: 10.1-3~bpo11+1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve1
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-4
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.2-2
libpve-guest-common-perl: 4.1-2
libpve-http-server-perl: 4.1-3
libpve-storage-perl: 7.2-8
libspice-server1: 0.15.0-2
lvm2: 2.03.11-2.1
lxc-pve: 5.0.0-3
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.2.6-1
proxmox-backup-file-restore: 2.2.6-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.5.1
pve-cluster: 7.2-2
pve-container: 4.2-2
pve-docs: 7.2-2
pve-edk2-firmware: 3.20220526-1
pve-firewall: 4.2-6
pve-firmware: 3.5-1
pve-ha-manager: 3.4.0
pve-i18n: 2.7-2
pve-qemu-kvm: 7.0.0-3
pve-xtermjs: 4.16.0-1
qemu-server: 7.2-4
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
 
Hi,
please share the output of the following
Code:
apt update
apt --fix-broken install
apt policy dbus
 
  • Like
Reactions: kafteras
Thanks for the reply

Here are the commands


Code:
root@karsl:~# apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 dbus : Depends: dbus-bin (= 1.12.20-3)
        Depends: libdbus-1-3 (= 1.12.20-3) but 1.12.24-0+deb11u1 is installed
 dbus-daemon : Depends: dbus-bin (= 1.12.20-3)
               Depends: libdbus-1-3 (= 1.12.20-3) but 1.12.24-0+deb11u1 is installed
 dbus-user-session : Depends: dbus (>= 1.12.24-0+deb11u1) but 1.12.20-3 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@karsl:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  dbus-session-bus-common dbus-system-bus-common
  linux-headers-5.18.0-0.bpo.1-amd64
  linux-headers-5.18.0-0.bpo.1-common
  linux-headers-5.18.0-0.deb11.3-amd64
  linux-headers-5.18.0-0.deb11.3-common
  pve-kernel-5.15.35-2-pve pve-kernel-5.15.39-1-pve
  pve-kernel-5.15.39-2-pve pve-kernel-5.15.39-3-pve
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  dbus
The following packages will be REMOVED:
  dbus-daemon
The following packages will be upgraded:
  dbus
1 upgraded, 0 newly installed, 1 to remove and 28 not upgraded.
1 not fully installed or removed.
Need to get 0 B/243 kB of archives.
After this operation, 23.6 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Reading changelogs... Done
(Reading database ... 165065 files and directories currently installed.)
Preparing to unpack .../dbus_1.12.24-0+deb11u1_amd64.deb ...
Unpacking dbus (1.12.24-0+deb11u1) over (1.12.20-3) ...
dpkg: error processing archive /var/cache/apt/archives/dbus_1.12.24-0+deb11u1_amd64.deb (--unpack):
 trying to overwrite '/lib/systemd/system/dbus.socket', which is also in package dbus-system-bus-common 1.12.20-3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dbus.service is a disabled or a static unit, not starting it.
Failed to get unit file state for dbus.socket: No such file or directory
dbus.socket is a disabled or a static unit, not starting it.
Errors were encountered while processing:
 /var/cache/apt/archives/dbus_1.12.24-0+deb11u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@karsl:~# apt policy dbus
dbus:
  Installed: 1.12.20-3
  Candidate: 1.12.24-0+deb11u1
  Version table:
     1.12.24-0+deb11u1 500
        500 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages
 *** 1.12.20-3 100
        100 /var/lib/dpkg/status
     1.12.20-2 500
        500 http://deb.debian.org/debian bullseye/main amd64 Packages
 
That's not the output of apt udpate ;)

What if you try apt install dbus dbus-session-bus-common- dbus-system-bus-common-? That would already remove the two packages marked for autoremoval at the same time (because of the trailing - after the package name). In particular dbus-system-bus-common which is causing a conflict when dpkg tries to install the dbus package. Of course don't approve the operation if apt suddenly tries to remove something else you want to keep!
 
Hey thanks again

Here are the results for the commands:
Code:
root@karsl:~# apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Hit:3 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:4 http://download.proxmox.com/debian/pve bullseye InRelease
Fetched 44.1 kB in 1s (79.0 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
29 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@karsl:~# apt install dbus dbus-session-bus-common- dbus-system-bus-common-
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 dbus-daemon : Depends: dbus-bin (= 1.12.20-3)
               Depends: libdbus-1-3 (= 1.12.20-3) but 1.12.24-0+deb11u1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@karsl:~#

Unfortunately it doesn't want to remove them. Its like a dependency cycle with mismatched versions.
 
Can you try apt install dbus dbus-session-bus-common- dbus-system-bus-common- dbus-daemon-? If it doesn't work, the output of apt show dbus-daemon would be interesting. On my setup, it's a purely virtual package, but for you probably not yet.
 
Thanks again for the response
Here are the results:

Code:
root@karsl:~# apt install dbus dbus-session-bus-common- dbus-system-bus-common- dbus-daemon-
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'dbus' instead of 'dbus-session-bus-common'
Note, selecting 'dbus' instead of 'dbus-system-bus-common'
The following packages were automatically installed and are no longer required:
  linux-headers-5.18.0-0.bpo.1-amd64 linux-headers-5.18.0-0.bpo.1-common linux-headers-5.18.0-0.deb11.3-amd64
  linux-headers-5.18.0-0.deb11.3-common pve-kernel-5.15.35-2-pve pve-kernel-5.15.39-1-pve pve-kernel-5.15.39-2-pve
  pve-kernel-5.15.39-3-pve
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  dbus-daemon
The following packages will be upgraded:
  dbus
1 upgraded, 0 newly installed, 1 to remove and 28 not upgraded.
1 not fully installed or removed.
Need to get 0 B/243 kB of archives.
After this operation, 23.6 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Reading changelogs... Done
(Reading database ... 165043 files and directories currently installed.)
Preparing to unpack .../dbus_1.12.24-0+deb11u1_amd64.deb ...
Unpacking dbus (1.12.24-0+deb11u1) over (1.12.20-3) ...
dpkg: error processing archive /var/cache/apt/archives/dbus_1.12.24-0+deb11u1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/dbus-daemon', which is also in package dbus-daemon 1.12.20-3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dbus.service is a disabled or a static unit, not starting it.
Failed to get unit file state for dbus.socket: No such file or directory
dbus.socket is a disabled or a static unit, not starting it.
Errors were encountered while processing:
 /var/cache/apt/archives/dbus_1.12.24-0+deb11u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@karsl:~# apt show dbus-daemon
Package: dbus-daemon
Version: 1.12.20-3
Status: install ok installed
Priority: optional
Section: admin
Source: dbus
Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Installed-Size: 402 kB
Depends: dbus-bin (= 1.12.20-3), dbus-session-bus-common (>= 1.12.20-3), libapparmor1 (>= 2.8.94), libaudit1 (>= 1:2.2.1), libc6 (>= 2.14), libcap-ng0 (>= 0.7.9), libdbus-1-3 (= 1.12.20-3), libexpat1 (>= 2.1~beta3), libselinux1 (>= 3.1~), libsystemd0
Breaks: dbus (<< 1.12.20-3~)
Replaces: dbus (<< 1.12.20-3~)
Homepage: https://dbus.freedesktop.org/
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: simple interprocess messaging system (reference message bus)
 D-Bus is a message bus, used for sending messages between applications.
 Conceptually, it fits somewhere in between raw sockets and CORBA in
 terms of complexity.
 .
 This package contains dbus-daemon, the reference implementation of a
 D-Bus message bus, and dbus-run-session, a utility to start a temporary
 session dbus-daemon in a constrained environment or for automated tests.
 .
 To provide a complete D-Bus session bus, install one of the packages
 that implement the dbus-session-bus virtual package, such as
 dbus-user-session. The recommended implementation is indicated by
 the default-dbus-session-bus virtual package.
 
That's unfortunate, because apt doesn't get that it needs to do the removal first ;)

EDIT: Also suggested by @fabian : you could try adding -o Dpkg::Options::="--force-overwrite" to the apt command.

@fabian suggested that you could still try doing only the removal first. If that also doesn't work, you'll likely need manual dpkg invocations. But it might be easier to just reinstall the system.

It seems like some of the packages come from a Debian Bookworm or Sid repository, so that's the likely cause of the issue, because downgrading is not supported in general.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!