Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to bus: No such file or directory #11603

Open
1 of 2 tasks
zed76r opened this issue May 21, 2024 · 16 comments
Open
1 of 2 tasks

Failed to connect to bus: No such file or directory #11603

zed76r opened this issue May 21, 2024 · 16 comments

Comments

@zed76r
Copy link

zed76r commented May 21, 2024

Windows Version

Microsoft Windows [Version 10.0.22635.3640]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Debian Sid

Other Software

No response

Repro Steps

  1. Fully shutdown WSL
  2. start wsl (slowly to startup ~10s)
  3. check on dmesg

Expected Behavior

Not shown the error and startup faster

Actual Behavior

[    3.101163] Failed to connect to bus: No such file or directory
[    3.358417] Failed to connect to bus: No such file or directory
[    3.620951] Failed to connect to bus: No such file or directory
[    3.885758] Failed to connect to bus: No such file or directory
[    4.146125] Failed to connect to bus: No such file or directory
[    4.405763] Failed to connect to bus: No such file or directory
[    4.661344] Failed to connect to bus: No such file or directory
[    4.865303] misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
[    4.870424] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[    4.870990] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[    4.871448] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[    4.872131] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    4.874075] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[    4.874821] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[    4.875557] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[    4.876400] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    4.916190] Failed to connect to bus: No such file or directory
[    5.171256] Failed to connect to bus: No such file or directory
[    5.427397] Failed to connect to bus: No such file or directory
[    5.683769] Failed to connect to bus: No such file or directory
[    5.940100] Failed to connect to bus: No such file or directory
[    6.196674] Failed to connect to bus: No such file or directory
[    6.453576] Failed to connect to bus: No such file or directory
[    6.710390] Failed to connect to bus: No such file or directory
[    6.970699] Failed to connect to bus: No such file or directory
[    7.228377] Failed to connect to bus: No such file or directory
[    7.486034] Failed to connect to bus: No such file or directory
[    7.748179] Failed to connect to bus: No such file or directory
[    8.005552] Failed to connect to bus: No such file or directory
[    8.265451] Failed to connect to bus: No such file or directory
[    8.522279] Failed to connect to bus: No such file or directory
[    8.784220] Failed to connect to bus: No such file or directory
[    9.047631] Failed to connect to bus: No such file or directory
[    9.308141] Failed to connect to bus: No such file or directory
[    9.568661] Failed to connect to bus: No such file or directory
[    9.831443] Failed to connect to bus: No such file or directory
[   10.095917] Failed to connect to bus: No such file or directory
[   10.355075] Failed to connect to bus: No such file or directory
[   10.612391] Failed to connect to bus: No such file or directory
[   10.871735] Failed to connect to bus: No such file or directory
[   11.134293] Failed to connect to bus: No such file or directory
[   11.392979] Failed to connect to bus: No such file or directory
[   11.655457] Failed to connect to bus: No such file or directory
[   11.917953] Failed to connect to bus: No such file or directory
[   12.179918] Failed to connect to bus: No such file or directory
[   12.442001] Failed to connect to bus: No such file or directory
[   12.702894] Failed to connect to bus: No such file or directory
[   12.962935] Failed to connect to bus: No such file or directory
[   12.965135] WSL (2) ERROR: WaitForBootProcess:3342: /sbin/init failed to start within 10000
[   12.965137] ms
[   12.975594] WSL (2): Creating login session for zed

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@zed76r
Copy link
Author

zed76r commented May 21, 2024

I've already tried the workarounds mentioned on #2941 and
#10350, but it's didn't help.

image

@zed76r
Copy link
Author

zed76r commented May 21, 2024

Copy link

Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0

@zed76r zed76r closed this as completed May 27, 2024
@Gchengan
Copy link

I use arch,same error encountered,how did you solve it

@zed76r
Copy link
Author

zed76r commented Jul 12, 2024

I use arch,same error encountered,how did you solve it

Try upgrade systemd or downgrade it.

@kloon15
Copy link

kloon15 commented Jul 27, 2024

I use arch,same error encountered,how did you solve it

This works for me until MS fix the issue with v256:
sudo downgrade 'systemd=255.7' 'lib32-systemd=255.7' 'systemd-libs=255.7' 'systemd-sysvcompat=255.7'

@zed76r
Copy link
Author

zed76r commented Jul 28, 2024

I reopen this issue, because the error is reproduced again since MSFT drop new pre-release WSL.

I ran same debian(sid) and systemd(256.4-2) version but different WSL version, the error is only on WSL 2.3.13.

@zed76r zed76r reopened this Jul 28, 2024
@Gchengan
Copy link

我使用arch,遇到了同样的错误,你是怎么解决的

这在 MS 修复 v256 的问题之前对我有用: sudo downgrade 'systemd=255.7' 'lib32-systemd=255.7' 'systemd-libs=255.7' 'systemd-sysvcompat=255.7'

屏幕截图 2024-07-28 224354
屏幕截图 2024-07-28 224430
This doesn't seem to work for me, what am I doing wrong

@kloon15
Copy link

kloon15 commented Jul 28, 2024

@Gchengan I use the pre-release wsl and using docker with systemd 255.7 is fine.

@kloon15
Copy link

kloon15 commented Aug 5, 2024

Anyone try 2.3.14?

@zed76r
Copy link
Author

zed76r commented Aug 6, 2024

@Gchengan Whatever systemd's version I use, the functions of the systemd are works, just slow down the init. So, we aren't the same issue.

image

@kloon15
Copy link

kloon15 commented Aug 12, 2024

我使用arch,遇到了同样的错误,你是怎么解决的

这在 MS 修复 v256 的问题之前对我有用: sudo downgrade 'systemd=255.7' 'lib32-systemd=255.7' 'systemd-libs=255.7' 'systemd-sysvcompat=255.7'

屏幕截图 2024-07-28 224354 屏幕截图 2024-07-28 224430 This doesn't seem to work for me, what am I doing wrong

Workaround for systemd >=256 detailed here:
#11857

@Gchengan
Copy link

Gchengan commented Aug 12, 2024

sudo systemctl list-jobs | grep running
sudo systemctl cancel
sudo systemctl disable systemd-networkd-wait-online

yuk7/ArchWSL#356

@kloon15 It works for me

@zed76r
Copy link
Author

zed76r commented Aug 13, 2024

my workaround here.

fully disable cgroupv1 to fix warn "Failed to connect to bus"

ref: #11857 (comment)

and make sure disable systemd-networkd-wait-online to fix "WSL (2) ERROR: WaitForBootProcess:3342: /sbin/init failed to start within 10000 ms"

ref: #11603 (comment)

@karJac
Copy link

karJac commented Aug 27, 2024

For me the problem was solved by doing this:

[10569:0827/004757.735915:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory

can be fixed by adding these lines to ~/.bashrc

if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
    dbus-daemon --session --address=unix:path=/run/user/1000/bus --fork
    export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
fi

The issue is that when running program, it expects the socket to be located at a fixed path in /run/user/1000/bus, which doesn't work in WSL2 where the socket is instead created as an abstract socket and is found under /tmp

dbus-launch --sh-syntax --exit-with-session
DBUS_SESSION_BUS_ADDRESS='unix:abstract=**/tmp/dbuslADZpPMOKJ,guid=55593467f737024f5f2ed7c566cd08fd**';
export DBUS_SESSION_BUS_ADDRESS;
DBUS_SESSION_BUS_PID=11021;
DBUS_SESSION_BUS_WINDOWID=6291457;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants