Closed michaelkleinhenz closed 4 years ago
Added the audio group on my synology and the container stays up. Thanks very much for this.
Looking at this commit: https://github.com/home-assistant/audio/commit/1e237ab2f0c9dc0c1e5ef2ca076e32d2b753a670, I guess just checking /dev/snd isn't enough. If the host does not have an audio
group, this should also terminate gracefully.
I am trying to get into a new home assistant install that is on docker contained on a Dell Poweredge server. I already have the user group for audio and I still get this error. Here is a copy of my log:
[cont-finish.d] done.
[s6-finish] waiting for services.
s6-svwait: fatal: timed out
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing...
starting version 3.2.9
[20:06:55] INFO: Update udev informations
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
20-03-23 20:06:56 INFO (MainThread) [__main__] Initialize Supervisor setup
20-03-23 20:06:56 INFO (SyncWorker_0) [supervisor.docker.supervisor] Attach to Supervisor homeassistant/amd64-hassio-supervisor with version 209
20-03-23 20:06:56 INFO (MainThread) [__main__] Setup Supervisor
20-03-23 20:06:56 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1
20-03-23 20:06:56 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1
20-03-23 20:06:56 WARNING (MainThread) [supervisor.dbus.rauc] Host has no rauc support. OTA updates have been disabled.
20-03-23 20:06:56 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.NetworkManager - /org/freedesktop/NetworkManager/DnsManager
20-03-23 20:06:56 INFO (MainThread) [supervisor.host.info] Update local host information
20-03-23 20:06:56 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
20-03-23 20:06:56 INFO (MainThread) [supervisor.host.services] Update service information
20-03-23 20:06:56 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
20-03-23 20:06:56 INFO (MainThread) [supervisor.host.network] Update local network DNS information
20-03-23 20:06:56 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
20-03-23 20:06:57 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-03-23 20:06:57 INFO (MainThread) [supervisor.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'}
20-03-23 20:06:57 INFO (MainThread) [supervisor.host.services] Reload local service hassio-apparmor.service
20-03-23 20:06:57 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ReloadOrRestartUnit on /org/freedesktop/systemd1
20-03-23 20:06:57 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/amd64-hassio-dns with version 1
20-03-23 20:06:57 INFO (SyncWorker_2) [supervisor.docker.interface] Attach to homeassistant/amd64-hassio-audio with version 9
20-03-23 20:06:57 INFO (MainThread) [supervisor.dns] Start CoreDNS plugin
20-03-23 20:06:57 INFO (MainThread) [supervisor.misc.forwarder] Start DNS port forwarding to 172.30.32.3
20-03-23 20:06:57 INFO (MainThread) [supervisor.audio] Start Audio plugin
20-03-23 20:06:57 INFO (SyncWorker_7) [supervisor.docker.interface] Clean hassio_dns application
20-03-23 20:06:57 INFO (SyncWorker_8) [supervisor.docker.interface] Clean hassio_audio application
20-03-23 20:06:59 WARNING (SyncWorker_8) [supervisor.docker.audio] Kernel have no audio support in
20-03-23 20:07:42 INFO (SyncWorker_7) [supervisor.docker.dns] Start DNS homeassistant/amd64-hassio-dns with version 1 - 172.30.32.3
20-03-23 20:07:42 ERROR (SyncWorker_8) [supervisor.docker] Can't start hassio_audio: 400 Client Error: Bad Request ("OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied\"": unknown")
20-03-23 20:07:42 ERROR (MainThread) [supervisor.audio] Can't start Audio plugin
20-03-23 20:07:42 INFO (SyncWorker_9) [supervisor.docker.interface] Attach to homeassistant/qemux86-64-homeassistant with version 0.107.5
20-03-23 20:07:43 INFO (MainThread) [supervisor.store.git] Load add-on /data/addons/core repository
20-03-23 20:07:43 INFO (MainThread) [supervisor.store.git] Load add-on /data/addons/git/a0d7b954 repository
20-03-23 20:07:43 INFO (MainThread) [supervisor.store] Load add-ons from store: 65 all - 65 new - 0 remove
20-03-23 20:07:43 INFO (MainThread) [supervisor.addons] Found 0 installed add-ons
20-03-23 20:07:43 INFO (MainThread) [supervisor.updater] Fetch update data from https://version.home-assistant.io/stable.json
20-03-23 20:07:43 INFO (MainThread) [supervisor.snapshots] Found 0 snapshot files
20-03-23 20:07:43 INFO (MainThread) [supervisor.discovery] Load 0 messages
20-03-23 20:07:43 INFO (MainThread) [supervisor.ingress] Load 0 ingress session
20-03-23 20:07:43 INFO (MainThread) [supervisor.secrets] Load Home Assistant secrets: 0
20-03-23 20:07:43 INFO (MainThread) [__main__] Run Supervisor
20-03-23 20:07:43 INFO (MainThread) [supervisor.api] Start API on 172.30.32.2
20-03-23 20:07:43 INFO (MainThread) [supervisor.addons] Phase 'initialize' start 0 add-ons
20-03-23 20:07:43 INFO (MainThread) [supervisor.core] Supervisor reboot detected
20-03-23 20:07:43 INFO (MainThread) [supervisor.tasks] All core tasks are scheduled
20-03-23 20:07:43 INFO (MainThread) [supervisor.hwmon] Started Supervisor hardware monitor
20-03-23 20:07:43 INFO (MainThread) [supervisor.core] Supervisor is up and running
20-03-23 20:07:43 INFO (MainThread) [supervisor.host.info] Update local host information
20-03-23 20:07:43 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
20-03-23 20:07:43 INFO (MainThread) [supervisor.host.services] Update service information
20-03-23 20:07:43 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
20-03-23 20:07:43 INFO (MainThread) [supervisor.host.network] Update local network DNS information
20-03-23 20:07:43 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
20-03-23 20:07:43 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-03-23 20:08:03 WARNING (MainThread) [supervisor.tasks] Watchdog found a problem with PulseAudio plugin!
20-03-23 20:08:03 INFO (MainThread) [supervisor.audio] Start Audio plugin
20-03-23 20:08:03 INFO (SyncWorker_16) [supervisor.docker.interface] Clean hassio_audio application
20-03-23 20:08:10 WARNING (SyncWorker_16) [supervisor.docker.audio] Kernel have no audio support in
20-03-23 20:08:45 ERROR (SyncWorker_16) [supervisor.docker] Can't start hassio_audio: 400 Client Error: Bad Request ("OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied\"": unknown")
20-03-23 20:08:45 ERROR (MainThread) [supervisor.audio] Can't start Audio plugin
20-03-23 20:08:45 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished coro=<Tasks._watchdog_audio_docker() done, defined at /usr/src/supervisor/supervisor/tasks.py:244> exception=AudioError()>
Traceback (most recent call last):
File "/usr/src/supervisor/supervisor/tasks.py", line 252, in _watchdog_audio_docker
await self.sys_audio.start()
File "/usr/src/supervisor/supervisor/audio.py", line 168, in start
raise AudioError() from None
supervisor.exceptions.AudioError
20-03-23 20:08:45 WARNING (MainThread) [supervisor.tasks] Watchdog found a problem with PulseAudio plugin!
20-03-23 20:08:45 INFO (MainThread) [supervisor.audio] Start Audio plugin
20-03-23 20:08:45 INFO (SyncWorker_8) [supervisor.docker.interface] Clean hassio_audio application
20-03-23 20:08:52 WARNING (SyncWorker_8) [supervisor.docker.audio] Kernel have no audio support in
20-03-23 20:09:12 ERROR (SyncWorker_8) [supervisor.docker] Can't start hassio_audio: 400 Client Error: Bad Request ("OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied\"": unknown")
20-03-23 20:09:12 ERROR (MainThread) [supervisor.audio] Can't start Audio plugin
20-03-23 20:09:12 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished coro=<Tasks._watchdog_audio_docker() done, defined at /usr/src/supervisor/supervisor/tasks.py:244> exception=AudioError()>
Traceback (most recent call last):
File "/usr/src/supervisor/supervisor/tasks.py", line 252, in _watchdog_audio_docker
await self.sys_audio.start()
File "/usr/src/supervisor/supervisor/audio.py", line 168, in start
raise AudioError() from None
supervisor.exceptions.AudioError
20-03-23 20:09:12 WARNING (MainThread) [supervisor.tasks] Watchdog found a problem with PulseAudio plugin!
20-03-23 20:09:12 INFO (MainThread) [supervisor.audio] Start Audio plugin
20-03-23 20:09:12 INFO (SyncWorker_11) [supervisor.docker.interface] Clean hassio_audio application
Look your docker have an issue they you need fix:
400 Client Error: Bad Request ("OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied\"": unknown")
Fix with v12
The
adjust-audio-group.sh
crashes if the host does not have anaudio
group. This is the case on non-standard systems like NAS devices. Tested on Synology, adding anaudio
group fixes the problem and the container starts.This is somewhat critical as a crashing
hassio_audio
container blocks the startup of thehomeassistant
container on NAS systems.