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

Mounting /var/run/dbus for Avahi mDNS causes dbus issues when running in Docker #561

Closed
nnhoang opened this issue Apr 10, 2024 · 2 comments

Comments

@nnhoang
Copy link

nnhoang commented Apr 10, 2024

Analysis

After following the wiki to enable Avahi, I got dbus problems. Docker failed on new containers and some system commands also printed dbus related errors.

Expected Behavior

Docker started to have cgroup errors when running new containers

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: 
unable to apply cgroup configuration: unable to start unit "docker-511dafefeb50591cff0dbd332bf0e8285f95efdc35770477d8874151b4db4083.scope"
(properties [{Name:Description Value:"libcontainer container 511dafefeb50591cff0dbd332bf0e8285f95efdc35770477d8874151b4db4083"} {Name:Slice Value:"system.slice"} {Name:Delegate Value:true} {Name:PIDs Value:@au [11590]} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]): Launch helper exited with unknown return code 1: unknown

Other dbus problems:

❯ sudo reboot
Failed to connect to bus: No such file or directory

Steps To Reproduce

I use oznu/homebridge Docker.

docker-compose

  homebridge:
    image: oznu/homebridge
    container_name: homebridge
    restart: always
    network_mode: host
    environment:
      - HOMEBRIDGE_CONFIG_UI_PORT=8581
    volumes:
      - homebridge-config:/homebridge
      # For Avahi mDNS, Linux only, more efficient protocol than Bonjour
      - /var/run/dbus:/var/run/dbus
      - /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket
    security_opt:
      - apparmor:unconfined # For Avahi mDNS
    logging:
      driver: json-file
      options:
        max-size: 100mb
        max-file: 2

docker run for new containers would then fail.

Logs

.

Configuration

.

Environment

  • OS: Debian 12, kernel 6.6.13+bpo-amd64
  • Software: Docker version 26.0.0
  • Node:
  • npm:

Process Supervisor

Docker

Additional Context

Image oznu/homebridge

@nnhoang nnhoang added the bug label Apr 10, 2024
@NorthernMan54 NorthernMan54 transferred this issue from homebridge/homebridge Apr 11, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 12, 2024
Copy link

This issue has been closed as no further activity has occurred.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant