0

I have an AWS Linux 2 AMI EC2 instance.

When running systemctl --user status I get the message:

Failed to get D-Bus connection: No such file or directory

I then ran systemctl start dbus.socket, which gave me this message:

Failed to start dbus.socket: The name org.freedesktop.PolicyKit1 was not provided by any .service files See system logs and 'systemctl status dbus.socket' for details.

I then ran systemctl status dbus.socket -l which returned this:

dbus.socket - D-Bus System Message Bus Socket
   Loaded: loaded (/usr/lib/systemd/system/dbus.socket; static; vendor preset: disabled)
   Active: active (running) since Thu 2022-03-31 21:26:42 UTC; 14h ago
   Listen: /run/dbus/system_bus_socket (Stream)

Mar 31 21:26:42 ip-10-0-0-193.ec2.internal systemd[1]: Listening on D-Bus System Message Bus Socket.
Mar 31 21:26:42 ip-10-0-0-193.ec2.internal systemd[1]: Starting D-Bus System Message Bus Socket.

Running sudo systemctl --user status gives a different error:

Failed to get D-Bus connection: Connection refused

I'm unsure of what to investigate next or what steps to take to resolve the issue.

hyphen
  • 2,368
  • 5
  • 28
  • 59
  • Hello friend, I solve this, but my architecture it is not the same as yours. I was using a Docker container with an `amazonlinux:2` image and I encounter with this same problem. In some hours I will create a post exposing the solution to my problem in order to show you how I solve it. In any case the solution was based on this repo: [https://github.com/gdraheim/docker-systemctl-replacement](https://github.com/gdraheim/docker-systemctl-replacement) – Franco Gil Apr 04 '23 at 21:31

0 Answers0