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 get D-Bus connection: No such file or directory #1153

Closed
keeee21 opened this issue Apr 26, 2024 · 3 comments
Closed

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

keeee21 opened this issue Apr 26, 2024 · 3 comments
Labels
t/bug Something isn't working

Comments

@keeee21
Copy link

keeee21 commented Apr 26, 2024

Describe the bug

When I try to run systemctl status nginx it says Failed to get D-Bus connection: No such file or directory

To Reproduce

  1. docker compose up
  2. docker exec -it { name } bin/bash
  3. exec systemctl status nginx (docker image is FROM --platform=linux/amd64 amazonlinux:2)

Expected behavior

faild_to_get_d-bus

Diagnostic report (REQUIRED)

OrbStack info:
Version: 1.5.1
Commit: 4cfac15e1080617c70eb163966e1cb2009dac1c2 (v1.5.1)

System info:
macOS: 14.2.1 (23C71)
CPU: arm64, 8 cores
CPU model: Apple M1
Model: MacBookPro17,1
Memory: 16 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-04-26T15-09-39.138072Z.zip

Screenshots and additional context (optional)

if it were docker desktop, i know how to solve this issue.

// vim ~/Library/Group\ Containers/group.com.docker/settings.json
{
  // ︙
  "dataFolder": "/Users/xxx/Library/Containers/com.docker.docker/Data/vms/0/data",
  "deprecatedCgroupv1": false,             // ← change to true
  "disableHardwareAcceleration": false,
  "disableTips": true,
  // ︙
}

this is written by Japanese, but it shows about this.
https://qiita.com/NaoyaMiyagawa/items/22a870112377a91e1c99

Related to this is this issues
docker/for-mac#6073

@keeee21 keeee21 added the t/bug Something isn't working label Apr 26, 2024
@slinorb
Copy link
Member

slinorb commented Apr 26, 2024

Does the container image use systemd to start the nginx.service? Most of container images start the application directly instead of using an init system like systemd.

@keeee21
Copy link
Author

keeee21 commented Apr 27, 2024

In the current Dockerfile, the container is launched using the init process.
Specifically, at the end of the Dockerfile, there is the following CMD directive:
CMD ["/sbin/init"]

@kdrag0n
Copy link
Member

kdrag0n commented May 23, 2024

The systemd version that Amazon Linux 2 ships with is too old. Duplicate of #66

It's unlikely that OrbStack will support cgroup v1. Please update the image to AL2023 if possible.

@kdrag0n kdrag0n closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants