You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Failed to connect to bus: No such file or directory" on clean WSL OpenSuse (42.3) install #2941
Your Windows build number: (Type ver at a Windows Command Prompt)
Microsoft Windows [Version 10.0.16299.192]
What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots) zypper update
What's wrong / what should be happening instead:
( 58/102) Installing: logrotate-3.11.0-15.2.x86_64 .....................................................................................................................................................................................[done]Additional rpm output:
Failed to connect to bus: No such file or directory
( 68/102) Installing: exim-4.86.2-17.1.x86_64 ..........................................................................................................................................................................................[done]Additional rpm output:
Warning: running kernel does not support fscaps
copying default config file to /etc/exim/exim.conf
Updating /etc/sysconfig/exim...
Failed to connect to bus: No such file or directory
systemctl restart dbus
Failed to connect to bus: No such file or directory
This is #2209#1579#994 et al. You are getting those errors because WSL does not run systemd (or anything that systemd usually starts, like dbus-daemon) at WSL instantiation. When zypper does an update, some of the package scripts launch systemctl which in turn uses theAF_UNIXdbussocket to communicate with systemd, and that fails because it is not there.
You can try making things a little happier by starting dbus manually. On Ubuntu sudo service dbus start works but on openSUSE Leap 42 it appears to not. You can fire it up manually with:
You need the mkdir because #2530. That will probably quash the "No such file or directory" error, but you'll almost certainly get subsequent fails like this because systemd is still not on the other end listening.
Work-around for now is to pretend you didn't see the errors; which are (to a first order) going to be harmless because none of the services the postinstall scripts are trying to tweak or restart are running anyway.
I'll hold this open for a bit because we don't get a lot of SUSE traffic around here and maybe some people would like to jump in with their current best practices and workarounds with respect to starting and stopping daemons on the platform. The landing zone for systemctl/systemd is #994 and the User Voice to support daemons is here (which will be closed soon because that's how they roll) and here for systemd specifically. Bonne chance.
Reacted by Ed Lomonaco, GreenTail, Vanderson Oliveira, Lukáš Viktora, Bansari Mehta, Chidozie Nnachor, Amanpreet Singh, Simon Piercy, Zorro Bei, He Wang and 63 more
Reacted by Dharam Singh Meena, Sam Lin, Marco Martins, mferreira3 and James Oswald
Duping this into #994 because no SUSE enthusiasts chimed in for a few weeks, and the work-around (ignore the warnings) falls under a larger umbrella of system startup ills.
You can try making things a little happier by starting dbus manually. On Ubuntu sudo service dbus start works but on openSUSE Leap 42 it appears to not. You can fire it up manually with:
FWIW, I tried this, and now sudo systemctl status just gives me Failed to read server status: Input/output error instead of Failed to connect to bus: No such file or directory.
Reacted by leon, William Desportes, lijuncloud, Sreenath Devireddy, EpicLPer, David Whynot, musznik, Rumble Huang, Eduardo and Kerem Caner Ozin
You can try making things a little happier by starting dbus manually. On Ubuntu sudo service dbus start works but on openSUSE Leap 42 it appears to not. You can fire it up manually with:
$ sudo systemctl status apache2
Failed to connect to bus: No such file or directory
$ sudo mkdir -p /run/dbus
$ sudo dbus-daemon --system
$ sudo systemctl status apache2
Failed to get properties: Launch helper exited with unknown return code 1
$ sudo systemctl status apache2
Failed to connect to bus: No such file or directory
$ sudo mkdir -p /run/dbus
$ sudo dbus-daemon --system
$ sudo systemctl status apache2
Failed to get properties: Launch helper exited with unknown return code 1
Same 10 minutes ago, for me.
Reacted by silentwolverine, will, Bilal Akbar and Marco Klein
You can try making things a little happier by starting dbus manually. On Ubuntu sudo service dbus start works but on openSUSE Leap 42 it appears to not. You can fire it up manually with:
root@K8100:# netplan apply
Failed to reload daemon: Launch helper exited with unknown return code 1
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 156, in command_apply
utils.systemctl_daemon_reload()
File "/usr/share/netplan/netplan/cli/utils.py", line 143, in systemctl_daemon_reload
subprocess.check_call(['systemctl', 'daemon-reload'])
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'daemon-reload']' returned non-zero exit status 1.
root@K8100:# service dbus start
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory
root@K8100:#
root@K8100:# mkdir -p /run/dbus
root@K8100:# dbus-daemon --system
root@K8100:# sudo netplan apply
Failed to reload daemon: Launch helper exited with unknown return code 1
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 156, in command_apply
utils.systemctl_daemon_reload()
File "/usr/share/netplan/netplan/cli/utils.py", line 143, in systemctl_daemon_reload
subprocess.check_call(['systemctl', 'daemon-reload'])
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'daemon-reload']' returned non-zero exit status 1.
root@K8100:#
root@K8100:# reboot
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Failed to talk to init daemon.
root@K8100:~#
therealkenc I've tried this command on Ubuntu20.04LTS in WSL2 and still hit the same issue, is it possible we assign a static IP for Ubuntu20.04?
sudo apt install dbus-user-session
Reading package lists... Done
Building dependency tree
Reading state information... Done
dbus-user-session is already the newest version (1.12.16-2ubuntu2.1).
0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
Activity
therealkenc commentedon Feb 13, 2018
This is #2209 #1579 #994 et al. You are getting those errors because WSL does not run
systemd(or anything thatsystemdusually starts, likedbus-daemon) at WSL instantiation. Whenzypperdoes an update, some of the package scripts launchsystemctlwhich in turn uses theAF_UNIXdbussocket to communicate withsystemd, and that fails because it is not there.You can try making things a little happier by starting dbus manually. On Ubuntu
sudo service dbus startworks but on openSUSE Leap 42 it appears to not. You can fire it up manually with:You need the
mkdirbecause #2530. That will probably quash the "No such file or directory" error, but you'll almost certainly get subsequent fails like this becausesystemdis still not on the other end listening.Work-around for now is to pretend you didn't see the errors; which are (to a first order) going to be harmless because none of the services the postinstall scripts are trying to tweak or restart are running anyway.
I'll hold this open for a bit because we don't get a lot of SUSE traffic around here and maybe some people would like to jump in with their current best practices and workarounds with respect to starting and stopping daemons on the platform. The landing zone for
systemctl/systemdis #994 and the User Voice to support daemons is here (which will be closed soon because that's how they roll) and here forsystemdspecifically. Bonne chance.archon810 commentedon Feb 13, 2018
Thank you for the details. If anything, this bug report will serve as an explainer for everyone who will undoubtedly run into the same issue.
therealkenc commentedon Mar 7, 2018
Duping this into #994 because no SUSE enthusiasts chimed in for a few weeks, and the work-around (ignore the warnings) falls under a larger umbrella of system startup ills.
BrianZbr commentedon Jan 6, 2019
FWIW, I tried this, and now
sudo systemctl statusjust gives meFailed to read server status: Input/output errorinstead ofFailed to connect to bus: No such file or directory.theAkito commentedon Aug 17, 2019
This is what I am getting.
DeathError commentedon Oct 28, 2019
similar problem with WSL debian.
theAkito commentedon Oct 28, 2019
Same 10 minutes ago, for me.
zxymike93 commentedon Dec 6, 2019
I think #1990 explained this failure.
canychan commentedon Jul 14, 2021
root@K8100:
# netplan apply# service dbus startFailed to reload daemon: Launch helper exited with unknown return code 1
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 156, in command_apply
utils.systemctl_daemon_reload()
File "/usr/share/netplan/netplan/cli/utils.py", line 143, in systemctl_daemon_reload
subprocess.check_call(['systemctl', 'daemon-reload'])
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'daemon-reload']' returned non-zero exit status 1.
root@K8100:
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory
root@K8100:
## mkdir -p /run/dbusroot@K8100:
root@K8100:
# dbus-daemon --system# sudo netplan applyroot@K8100:
Failed to reload daemon: Launch helper exited with unknown return code 1
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 156, in command_apply
utils.systemctl_daemon_reload()
File "/usr/share/netplan/netplan/cli/utils.py", line 143, in systemctl_daemon_reload
subprocess.check_call(['systemctl', 'daemon-reload'])
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'daemon-reload']' returned non-zero exit status 1.
root@K8100:
## rebootroot@K8100:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Failed to talk to init daemon.
root@K8100:~#
therealkenc I've tried this command on Ubuntu20.04LTS in WSL2 and still hit the same issue, is it possible we assign a static IP for Ubuntu20.04?
ejmarten commentedon Aug 2, 2021
https://georgik.rocks/how-to-start-d-bus-in-docker-container/
ankit15588 commentedon Sep 4, 2021
Final Solution :- (100% Working) :- Failed to connect to bus: No such file or directory
1.Run systemctl daemon-reload as root user
[root@Red-Hat-8_103 ~]# systemctl daemon-reload
2.Generate the Systemd Unit File again in /home/student/.config/systemd/user/ as student user ( you can login as per your user)
student@Red-Hat-8_103 user]$ podman generate systemd --name httpd_server_site1 --files
/home/student/.config/systemd/user/container-httpd_server_site1.service
[student@Red-Hat-8_103 user]$ systemctl --user daemon-reload
OmlineEditor commentedon Apr 7, 2022
something else helped me, I just installed the program:
sudo apt install dbus-user-sessionKrishKatamaneni commentedon Apr 28, 2022
sudo apt install dbus-user-session
Reading package lists... Done
Building dependency tree
Reading state information... Done
dbus-user-session is already the newest version (1.12.16-2ubuntu2.1).
0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
Still the issue persist