Ulrar / hassio-addons

Repo for hassio addons
MIT License
23 stars 10 forks source link

Addon won't start in combination with Home Assistant OS 5.8 #22

Open GoSpursGoNL opened 3 years ago

GoSpursGoNL commented 3 years ago

Since I upgraded to Home Assistant OS 5.8, the addon can't succesfully start anymore. I hope you can assist, thanks in advance!

[2020-12-15 09:02:28] [ LOG] lib: Library init scan completed in 7 sec (200 changes) [ LOG] lib: Library init scan completed in 7 sec (200 changes) [2020-12-15 09:02:29] [ LOG] main: Cache deinit [ LOG] main: Cache deinit [ LOG] main: Worker deinit [ LOG] main: Database deinit [2020-12-15 09:02:29] [ LOG] main: Worker deinit [2020-12-15 09:02:29] [ LOG] main: Database deinit [2020-12-15 09:02:29] [ LOG] main: mDNS deinit [2020-12-15 09:02:29] [ LOG] main: Exiting. [ LOG] main: mDNS deinit [ LOG] main: Exiting. [09:02:29] INFO: Starting the forked-daapd Server... [2020-12-15 09:02:29] [ LOG] main: Forked Media Server Version 27.2 taking off [2020-12-15 09:02:29] [ LOG] main: Built with: [ LOG] main: Forked Media Server Version 27.2 taking off [2020-12-15 09:02:29] [ LOG] main: - ffmpeg [ LOG] main: Built with: [2020-12-15 09:02:29] [ LOG] main: - iTunes XML [ LOG] main: - ffmpeg [2020-12-15 09:02:29] [ LOG] main: - Spotify [ LOG] main: - iTunes XML [2020-12-15 09:02:29] [ LOG] main: - LastFM [ LOG] main: - Spotify [2020-12-15 09:02:29] [ LOG] main: - Chromecast [ LOG] main: - LastFM [2020-12-15 09:02:29] [ LOG] main: - MPD [ LOG] main: - Chromecast [2020-12-15 09:02:29] [ LOG] main: - Device verification [ LOG] main: - MPD [2020-12-15 09:02:29] [ LOG] main: - Websockets [ LOG] main: - Device verification [2020-12-15 09:02:29] [ LOG] main: - ALSA [ LOG] main: - Websockets [2020-12-15 09:02:29] [ LOG] main: - Pulseaudio [ LOG] main: - ALSA [2020-12-15 09:02:29] [ LOG] main: - Webinterface [ LOG] main: - Pulseaudio [ LOG] main: - Webinterface [ LOG] main: - Regex [2020-12-15 09:02:29] [ LOG] main: - Regex [2020-12-15 09:02:29] [ LOG] main: mDNS init [ LOG] main: mDNS init [ LOG] mdns: Avahi state change: Client connecting [ LOG] db: Configured to use database file '/share/forked-daapd/cache/songs3.db' [2020-12-15 09:02:29] [ LOG] mdns: Avahi state change: Client connecting [2020-12-15 09:02:29] [ LOG] db: Configured to use database file '/share/forked-daapd/cache/songs3.db' [ LOG] db: Now vacuuming database, this may take some time... [2020-12-15 09:02:29] [ LOG] db: Now vacuuming database, this may take some time... [ LOG] db: Database OK with 1001 active files and 6 active playlists [2020-12-15 09:02:30] [ LOG] db: Database OK with 1001 active files and 6 active playlists [ LOG] mdns: Failed to create service browser: Bad state [ LOG] raop: Could not add mDNS browser for AirPlay devices [2020-12-15 09:02:30] [ LOG] mdns: Failed to create service browser: Bad state [2020-12-15 09:02:30] [ LOG] raop: Could not add mDNS browser for AirPlay devices [ LOG] mdns: Failed to create service browser: Bad state [ LOG] cast: Could not add mDNS browser for Chromecast devices [2020-12-15 09:02:30] [ LOG] mdns: Failed to create service browser: Bad state [2020-12-15 09:02:30] [ LOG] cast: Could not add mDNS browser for Chromecast devices [ LOG] scan: Scanned 200 files... [2020-12-15 09:02:30] [ LOG] scan: Scanned 200 files... [ LOG] mdns: Failed to create service browser: Bad state [FATAL] remote: Could not browse for Remote services [FATAL] main: Remote pairing service failed to start [ LOG] main: MPD deinit [2020-12-15 09:02:30] [ LOG] mdns: Failed to create service browser: Bad state [2020-12-15 09:02:30] [FATAL] remote: Could not browse for Remote services [2020-12-15 09:02:30] [FATAL] main: Remote pairing service failed to start [2020-12-15 09:02:30] [ LOG] main: MPD deinit [ LOG] main: HTTPd deinit [2020-12-15 09:02:30] [ LOG] main: HTTPd deinit [ LOG] scan: Scanned 400 files... [2020-12-15 09:02:31] [ LOG] scan: Scanned 400 files... [ LOG] scan: Scanned 600 files... [2020-12-15 09:02:31] [ LOG] scan: Scanned 600 files... [2020-12-15 09:02:31] [ LOG] main: Player deinit [ LOG] main: Player deinit [2020-12-15 09:02:32] [ LOG] scan: Scanned 800 files... [ LOG] scan: Scanned 800 files... [2020-12-15 09:02:32] [ LOG] scan: Scanned 1000 files... [ LOG] scan: Scanned 1000 files... [2020-12-15 09:02:32] [ LOG] main: Library scanner deinit [ LOG] main: Library scanner deinit [2020-12-15 09:02:32] [ LOG] spotify: No spotify refresh token found [ LOG] spotify: No spotify refresh token found [ LOG] spotify: Spotify webapi token refresh failed. In order to use the web api, authorize forked-daapd to access your saved tracks by visiting http://forked-daapd.local:3689 [2020-12-15 09:02:32] [ LOG] spotify: Spotify webapi token refresh failed. In order to use the web api, authorize forked-daapd to access your saved tracks by visiting http://forked-daapd.local:3689 [2020-12-15 09:02:32] [ LOG] lib: Library init scan completed in 2 sec (1 changes) [ LOG] lib: Library init scan completed in 2 sec (1 changes) [ LOG] main: Cache deinit [2020-12-15 09:02:33] [ LOG] main: Cache deinit [2020-12-15 09:02:33] [ LOG] main: Worker deinit [ LOG] main: Worker deinit [2020-12-15 09:02:33] [ LOG] main: Database deinit [ LOG] main: Database deinit [ LOG] main: mDNS deinit [2020-12-15 09:02:33] [ LOG] main: mDNS deinit [2020-12-15 09:02:33] [ LOG] main: Exiting. [ LOG] main: Exiting.

And the above seems to repeat itself indefinitely.

jannislehmann commented 3 years ago

I can confirm this issue as I am running into this as well. The cause seems to be the change of the mDNS service: https://github.com/home-assistant/operating-system/pull/986 However, my guess would be that we should forward this issue to the developer itself as this might not be easily fixable within a Dockerfile? Or maybe someone form the HassOS developer team can assist.

TychoWerner commented 3 years ago

I have this aswell

Ulrar commented 3 years ago

Good catch @Cludch, looks like they removed avahi from the host. That's going to break a whole bunch of stuff ..

Ideally I'd say let's just make another addon with avahi-daemon and host_network: true to replace it, but I bet that'll conflict with resolved and won't start.

So I guess that just leaves disabling mdns altogether, I've just pushed a change for that, can someone try rebuilding the addon and see if that helps ? If you were using the mdns address (like forked-daapd.local) it won't work anymore, you'll have to access the IP / Port directly. I'm running HA on a now unsupported setup and I haven't been able to upgrade, so I can't really test this now myself.

jannislehmann commented 3 years ago

I just did an uninstall and re-installed the add-on. However, the same issue still comes up. But I am unsure, whether it really pulled the newest version. Will do some testing later again, but I think that the issue still persists.

Ulrar commented 3 years ago

Right, to pull the new version you need to make sure you run a refresh on the repo page of hassio, or it won't pull the new files.

jannislehmann commented 3 years ago

Yeah, I just remembered that and did a refresh. However, no change. As I am in a hurry, I will try this in the evening again.

TychoWerner commented 3 years ago

I just did the reinstall with reload on the add-on's store page and it still seems to be looping

pzuccar commented 3 years ago

Hello,

Just checked that I have the last version, with the --mdns-no-... flags, but it keeps trying to initialize mdns and failling Here is the log:

[19:36:52] INFO: Starting the forked-daapd Server...
[2020-12-20 19:36:52] [  LOG]     main: Forked Media Server Version 27.2 taking off
[  LOG]     main: Forked Media Server Version 27.2 taking off
[  LOG]     main: Built with:
[2020-12-20 19:36:52] [  LOG]     main: Built with:
[  LOG]     main: - ffmpeg
[  LOG]     main: - iTunes XML
[  LOG]     main: - Spotify
[  LOG]     main: - LastFM
[2020-12-20 19:36:52] [  LOG]     main: - ffmpeg
[  LOG]     main: - Chromecast
[2020-12-20 19:36:52] [  LOG]     main: - iTunes XML
[  LOG]     main: - MPD
[2020-12-20 19:36:52] [  LOG]     main: - Spotify
[  LOG]     main: - Device verification
[2020-12-20 19:36:52] [  LOG]     main: - LastFM
[2020-12-20 19:36:52] [  LOG]     main: - Chromecast
[2020-12-20 19:36:52] [  LOG]     main: - MPD
[  LOG]     main: - Websockets
[2020-12-20 19:36:52] [  LOG]     main: - Device verification
[  LOG]     main: - ALSA
[  LOG]     main: - Pulseaudio
[  LOG]     main: - Webinterface
[  LOG]     main: - Regex
[2020-12-20 19:36:52] [  LOG]     main: - Websockets
[2020-12-20 19:36:52] [  LOG]     main: - ALSA
[2020-12-20 19:36:52] [  LOG]     main: - Pulseaudio
[2020-12-20 19:36:52] [  LOG]     main: - Webinterface
[2020-12-20 19:36:52] [  LOG]     main: - Regex
[  LOG]     main: mDNS init
[2020-12-20 19:36:52] [  LOG]     main: mDNS init
[2020-12-20 19:36:52] [  LOG]     mdns: Avahi state change: Client connecting
[2020-12-20 19:36:52] [  LOG]       db: Configured to use database file '/share/forked-daapd/cache/songs3.db'
[  LOG]     mdns: Avahi state change: Client connecting
[  LOG]       db: Configured to use database file '/share/forked-daapd/cache/songs3.db'
[  LOG]       db: Now vacuuming database, this may take some time...
[2020-12-20 19:36:52] [  LOG]       db: Now vacuuming database, this may take some time...
[  LOG]       db: Database OK with 1 active files and 6 active playlists
[2020-12-20 19:36:52] [  LOG]       db: Database OK with 1 active files and 6 active playlists
[  LOG]     mdns: Failed to create service browser: Bad state
[  LOG]     raop: Could not add mDNS browser for AirPlay devices
[2020-12-20 19:36:52] [  LOG]     mdns: Failed to create service browser: Bad state
[2020-12-20 19:36:52] [  LOG]     raop: Could not add mDNS browser for AirPlay devices
[2020-12-20 19:36:52] [  LOG]   laudio: Adding Pulseaudio sink 'Built-in Audio Stereo' (alsa_output.0.stereo-fallback) with name 'Computer'
[  LOG]   laudio: Adding Pulseaudio sink 'Built-in Audio Stereo' (alsa_output.0.stereo-fallback) with name 'Computer'
[  LOG]     mdns: Failed to create service browser: Bad state
[  LOG]     cast: Could not add mDNS browser for Chromecast devices
[2020-12-20 19:36:52] [  LOG]     mdns: Failed to create service browser: Bad state
[2020-12-20 19:36:52] [  LOG]     cast: Could not add mDNS browser for Chromecast devices
[19:36:52] INFO: Starting Nginx...
[  LOG]     scan: Bulk library scan completed in 0 sec
[2020-12-20 19:36:52] [  LOG]     scan: Bulk library scan completed in 0 sec
[2020-12-20 19:36:52] [  LOG]     mdns: Failed to create service browser: Bad state
[2020-12-20 19:36:52] [FATAL]   remote: Could not browse for Remote services
[2020-12-20 19:36:52] [FATAL]     main: Remote pairing service failed to start
[2020-12-20 19:36:52] [  LOG]     main: MPD deinit
[  LOG]     mdns: Failed to create service browser: Bad state
[FATAL]   remote: Could not browse for Remote services
[FATAL]     main: Remote pairing service failed to start
[  LOG]     main: MPD deinit
[2020-12-20 19:36:52] [  LOG]  spotify: No spotify refresh token found
[2020-12-20 19:36:52] [  LOG]  spotify: Spotify webapi token refresh failed. In order to use the web api, authorize forked-daapd to access your saved tracks by visiting http://forked-daapd.local:3689
[  LOG]  spotify: No spotify refresh token found
[  LOG]  spotify: Spotify webapi token refresh failed. In order to use the web api, authorize forked-daapd to access your saved tracks by visiting http://forked-daapd.local:3689
[2020-12-20 19:36:52] [  LOG]     main: HTTPd deinit
[  LOG]     main: HTTPd deinit
[2020-12-20 19:36:52] [  LOG]      lib: Library init scan completed in 0 sec (0 changes)
[  LOG]      lib: Library init scan completed in 0 sec (0 changes)
[2020-12-20 19:36:53] [  LOG]     main: Player deinit
[  LOG]     main: Player deinit
[  LOG]   laudio: Pulseaudio terminated
[2020-12-20 19:36:53] [  LOG]   laudio: Pulseaudio terminated
[2020-12-20 19:36:53] [  LOG]     main: Library scanner deinit
[  LOG]     main: Library scanner deinit
[  LOG]     main: Cache deinit
[2020-12-20 19:36:53] [  LOG]     main: Cache deinit
[2020-12-20 19:36:53] [  LOG]     main: Worker deinit
[  LOG]     main: Worker deinit
[2020-12-20 19:36:53] [  LOG]     main: Database deinit
[  LOG]     main: Database deinit
[  LOG]     main: mDNS deinit
[2020-12-20 19:36:53] [  LOG]     main: mDNS deinit
[  LOG]     main: Exiting.
[2020-12-20 19:36:53] [  LOG]     main: Exiting.
GoSpursGoNL commented 3 years ago

Indeed I see the same behaviour after a rebuild of the addon. Hope you are able to find the cause @Ulrar :muscle:

pzuccar commented 3 years ago

Hi, I'm currently on Home Assistant OS 5.9 and the issue persists.

Ulrar commented 3 years ago

Unfortunately I'm not sure there's a solution, looks like forked-daapd depends on avahi even if it's not anouncing itself. I believe it's needed to discover chromecast and airplay devices so it makes sense.

In any case I don't know what we can do here, I don't think this addon is possible to fix.

On Thu 31 Dec 2020, 21:10 Pietro, notifications@github.com wrote:

Hi, I'm currently on Home Assistant OS 5.9 and the issue persists.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ulrar/hassio-addons/issues/22#issuecomment-753161748, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVHTYDZUXTJSEGLYN4UOTSXTSDBANCNFSM4U34QVEA .

agners commented 3 years ago

Home Assistant OS 5 moved to systemd-resolved to resolve mDNS. Currently it doesn't announce services, but it can act as a DNS-SD responder. So is/was daapd using the hosts AVAHI?

Ulrar commented 3 years ago

That's correct, forked-daapd has a hard dependency on avahi so it was using the host's one through dbus.

Unfortunately adding avahi in the container wouldn't help since it'd be announcing the wrong IP, it has to run on the host.

On Mon 4 Jan 2021, 23:21 Stefan Agner, notifications@github.com wrote:

Home Assistant OS 5 moved to systemd-resolved to resolve mDNS. Currently it doesn't announce services, but it can act as a DNS-SD responder. So is/was daapd using the hosts AVAHI?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ulrar/hassio-addons/issues/22#issuecomment-754281024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVHT76MG5ZCK5LLDZSCGDSYJEN5ANCNFSM4U34QVEA .

Ulrar commented 3 years ago

Hi,

I don't have hassos anymore so I can't test this, but I've pushed a new avahi-daemon addon which may resolve this. Could someone try it ? You should just have to install it, shouldn't need any config. I'm not sure if it'll conflict with systemd-resolved, but if it doesn't forked-daapd should work again.

jannislehmann commented 3 years ago

Hey,

I just tested the avahi-daemon. However it does not start:

[13:54:31] INFO: Starting the avahi daemon...
Found user 'avahi' (UID 102) and group 'avahi' (GID 102).
Successfully dropped root privileges.
avahi-daemon 0.7 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
dbus_bus_get_private(): Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.7 exiting.
Ulrar commented 3 years ago

Looks like you need a special config file on the dbus side (so on the host) to be allowed to register a service, like avahi tries to do on startup. I'm guessing this is what's failing here, hard to be sure without seeing the host logs but that would make sense. Sorry I've never really paid attention to avahi before, it always just worked.

So unfortunately short of running something like docker cp avahi-daemon:/etc/dbus-1/system.d/avahi-dbus.conf /etc/dbus-1/system.d/ on the host itself and then restarting dbus, I'm not sure there's a solution, this add-on might be dead at least until forked-daapd removes it's dependency on avahi, if that ever happens.

davy932 commented 3 years ago

Been fighting with this for the past 72 hrs. Wanted to install and control some Airport Express Speakers.

Been going mad - now i know why Hope it can be fixed at some point

thanks

moriahmorgan commented 3 years ago

So unfortunately short of running something like docker cp avahi-daemon:/etc/dbus-1/system.d/avahi-dbus.conf /etc/dbus-1/system.d/ on the host itself and then restarting dbus, I'm not sure there's a solution, this add-on might be dead at least until forked-daapd removes it's dependency on avahi, if that ever happens.

Tried what you suggested, no luck. dbus-1 is read only and couldn't figure out how to populate that file.

Any chance you can find out how the guys at linuxserver.io did it all in one container?: https://github.com/linuxserver/docker-daapd

Thanks for the addon. I wish Hass would have kept the daemon around for legacy apps.

Hackashaq666 commented 3 years ago

So unfortunately short of running something like docker cp avahi-daemon:/etc/dbus-1/system.d/avahi-dbus.conf /etc/dbus-1/system.d/ on the host itself and then restarting dbus, I'm not sure there's a solution, this add-on might be dead at least until forked-daapd removes it's dependency on avahi, if that ever happens.

Tried what you suggested, no luck. dbus-1 is read only and couldn't figure out how to populate that file.

Any chance you can find out how the guys at linuxserver.io did it all in one container?: https://github.com/linuxserver/docker-daapd

Thanks for the addon. I wish Hass would have kept the daemon around for legacy apps.

The linuxserver.io docker forked-daapd container runs ok on hassos, not sure why it would be different than this addon?

moriahmorgan commented 3 years ago

The linuxserver.io docker forked-daapd container runs ok on hassos, not sure why it would be different than this addon?

I tried using it on HassOS with the Custom component for the announcements and it didn't seem to work. Maybe I did something wrong?

pzuccar commented 3 years ago

Hi, I noticed you added an Avahi Daemon Addon to try to solve this issue. Sadly I can't get it to start either:

[17:56:24] INFO: Starting the avahi daemon...
Found user 'avahi' (UID 102) and group 'avahi' (GID 102).
Successfully dropped root privileges.
avahi-daemon 0.7 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
dbus_bus_get_private(): Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.7 exiting.
Ulrar commented 3 years ago

Yes, the avahi addon won't work because it requires config on the host dbus, which isn't present. I'll take a look at the other containers tomorrow, I suspect it just has avahi in the container itself and doesn't map to the host dbus, and probably runs on the host network. I suppose that'll work as long as you have only one addon that requires avahi, not ideal but better than nothing, we might give that a try

On Tue 26 Jan 2021, 20:58 Pietro, notifications@github.com wrote:

Hi, I noticed you added an Avahi Daemon Addon to try to solve this issue. Sadly I can't get it to start either:

[17:56:24] INFO: Starting the avahi daemon... Found user 'avahi' (UID 102) and group 'avahi' (GID 102). Successfully dropped root privileges. avahi-daemon 0.7 starting up. WARNING: No NSS support for mDNS detected, consider installing nss-mdns! dbus_bus_get_private(): Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. WARNING: Failed to contact D-Bus daemon. avahi-daemon 0.7 exiting.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Ulrar/hassio-addons/issues/22#issuecomment-767823574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVHT5NLF43SXJUUUEMGZ3S34UI3ANCNFSM4U34QVEA .

Hackashaq666 commented 3 years ago

Interesting that addons would have conflict if more than one used avahi. I am running docker containers for homebridge, forked-daapd and shairport-sync on my hassos system, and all 3 use avahi. I don't understand the differences between docker containers and addons.

moriahmorgan commented 3 years ago

Homebridge (HomeKit) no longer uses Avahi from what I gather. That's why we're in the situation we are in now.

Ulrar commented 3 years ago

As I suspected the linuxserver.io container runs on host network mode, and is running avahi and dbus directly. I've made the same change to this addon, I would now expect it to work on HassOS but I can't test it, let me know. Note that the addon now runs on host mode, meaning it can use any ports it wants regardless of what's actually configured in hassio.

I've also removed the avahi addon since that wasn't working.

steveof2620 commented 3 years ago

Hello,

I was asked to install your forked DAAP add on and report my findings over at the HA forums.

I received this error message upon installation, but it later seemed to install OK:

Screen Shot 2021-02-02 at 12 17 30

With the add-on running I was unable to access the web-ui either through the sidebar (“502: Bad Gateway”) or via http://[ip address]:3688 or via http://[ip address]:3689 (ERR_CONNECTION_REFUSED).

Assume the port for the web-ui is set to 3688: # Websocket port for the web interface. websocket_port = 3688

I saw this in the add-on log: forked-daapd: client.c:791: avahi_client_errno: Assertionclient' failed.`

I am running Home Assistant on core-2021.1.5 and supervisor-2021.01.7.

Hope that is useful. Thanks for the add-on.

pzuccar commented 3 years ago

Hello @Ulrar, finally got some time to test the new version:

First it complains about a non existing update and a parse error:

[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] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Forked DAAPD
 Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
-----------------------------------------------------------
 Add-on version: dev
 There is an update available for this add-on!
 Latest add-on version: null
 Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[22:33:08] ERROR: Unknown HTTP error occured
 System:   (armv7 / raspberrypi4)
 Home Assistant Core: 2021.2.0
 Home Assistant Supervisor: 2021.01.7
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 

Then it fails to start and keeps trying indefinitely:

[2021-02-03 22:36:01] [  LOG]     main: - Pulseaudio
[2021-02-03 22:36:01] [  LOG]     main: - Webinterface
[2021-02-03 22:36:01] [  LOG]     main: - Regex
[2021-02-03 22:36:01] [  LOG]     main: mDNS init
[2021-02-03 22:36:01] [  LOG]     main: mDNS init
forked-daapd: client.c:791: avahi_client_errno: Assertion `client' failed.
[22:36:01] INFO: Starting the forked-daapd Server...
[2021-02-03 22:36:02] [  LOG]     main: Forked Media Server Version 27.2 taking off
[2021-02-03 22:36:02] [  LOG]     main: Forked Media Server Version 27.2 taking off
[2021-02-03 22:36:02] [  LOG]     main: Built with:
[2021-02-03 22:36:02] [  LOG]     main: Built with:
darthsebulba04 commented 3 years ago

I did some troubleshooting on this myself and found the following:

root@local-forked-daapd:/etc/services.d# avahi-daemon 
Found user 'avahi' (UID 102) and group 'avahi' (GID 102).
Successfully dropped root privileges.
avahi-daemon 0.7 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
dbus_bus_get_private(): Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.7 exiting.

This was even with changing the add-on to unprotected full access. Command was run from within the container itself.

I'm guessing there is some configuration missing for d-bus, but I'm unfamiliar with these system processes and can't be sure.

If there is something someone would like me to try, let me know and I'll give it a run.

Hope this helps in some way. Look forward to getting it working again.

tingles2233 commented 3 years ago

I have the same forked-daapd: client.c:791: avahi_client_errno: Assertion client' failed.` loop as stated above by @pzuccar and @steveof2620

Willing to do any tests or help out in any way to get this working again. Let me know what you need.

System: (amd64 / qemux86-64) Home Assistant Core: 2021.2.1 Home Assistant Supervisor: 2021.02.5

Operating System Debian GNU/Linux 10 (buster) Docker version 20.10.3

Dezorian commented 3 years ago

I have the same trouble as above. Using Raspberry Pi 4 4GB with HassOS 5.8 (will soon update to 5.11) and Core 2021.2.3

This is the startup log of the addon:

Add-on: Forked DAAPD
Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
-----------------------------------------------------------
 Add-on version: dev
 There is an update available for this add-on!
 Latest add-on version: null
 Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[14:37:15] ERROR: Unknown HTTP error occured
 System:   (armv7 / raspberrypi4)
 Home Assistant Core: 2021.2.3
 Home Assistant Supervisor: 2021.02.6
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------

After that i get the same avahi_client_errno: Assertion client' failed log.

This just keeps repeating:

[14:44:05] INFO: Starting the forked-daapd Server...
[2021-02-12 14:44:05] [  LOG]     main: Forked Media Server Version 27.2 taking off
[2021-02-12 14:44:05] [  LOG]     main: Forked Media Server Version 27.2 taking off
[2021-02-12 14:44:05] [  LOG]     main: Built with:
[2021-02-12 14:44:05] [  LOG]     main: Built with:
[2021-02-12 14:44:05] [  LOG]     main: - ffmpeg
[2021-02-12 14:44:05] [  LOG]     main: - ffmpeg
[2021-02-12 14:44:05] [  LOG]     main: - Spotify
[2021-02-12 14:44:05] [  LOG]     main: - Spotify
[2021-02-12 14:44:05] [  LOG]     main: - LastFM
[2021-02-12 14:44:05] [  LOG]     main: - LastFM
[2021-02-12 14:44:05] [  LOG]     main: - Chromecast
[2021-02-12 14:44:05] [  LOG]     main: - Chromecast
[2021-02-12 14:44:05] [  LOG]     main: - MPD
[2021-02-12 14:44:05] [  LOG]     main: - MPD
[2021-02-12 14:44:05] [  LOG]     main: - Websockets
[2021-02-12 14:44:05] [  LOG]     main: - Websockets
[2021-02-12 14:44:05] [  LOG]     main: - ALSA
[2021-02-12 14:44:05] [  LOG]     main: - ALSA
[2021-02-12 14:44:05] [  LOG]     main: - Pulseaudio
[2021-02-12 14:44:05] [  LOG]     main: - Pulseaudio
[2021-02-12 14:44:05] [  LOG]     main: - Webinterface
[2021-02-12 14:44:05] [  LOG]     main: - Webinterface
[2021-02-12 14:44:05] [  LOG]     main: - Regex
[2021-02-12 14:44:05] [  LOG]     main: - Regex
[2021-02-12 14:44:05] [  LOG]     main: mDNS init
[2021-02-12 14:44:05] [  LOG]     main: mDNS init
forked-daapd: client.c:791: avahi_client_errno: Assertion `client` failed.
Rrapa commented 3 years ago

Having exactly same issue [17:31:57] INFO: Starting the forked-daapd Server... [2021-02-13 17:31:57] [ LOG] main: Forked Media Server Version 27.2 taking off [2021-02-13 17:31:57] [ LOG] main: Built with: [2021-02-13 17:31:57] [ LOG] main: - ffmpeg [2021-02-13 17:31:57] [ LOG] main: - Without Spotify [2021-02-13 17:31:57] [ LOG] main: - LastFM [2021-02-13 17:31:57] [ LOG] main: Forked Media Server Version 27.2 taking off [2021-02-13 17:31:57] [ LOG] main: Built with: [2021-02-13 17:31:57] [ LOG] main: - ffmpeg [2021-02-13 17:31:57] [ LOG] main: - Without Spotify [2021-02-13 17:31:57] [ LOG] main: - LastFM [2021-02-13 17:31:57] [ LOG] main: - Chromecast [2021-02-13 17:31:57] [ LOG] main: - MPD [2021-02-13 17:31:57] [ LOG] main: - Websockets [2021-02-13 17:31:57] [ LOG] main: - Chromecast [2021-02-13 17:31:57] [ LOG] main: - MPD [2021-02-13 17:31:57] [ LOG] main: - Websockets [2021-02-13 17:31:57] [ LOG] main: - ALSA [2021-02-13 17:31:57] [ LOG] main: - Pulseaudio [2021-02-13 17:31:57] [ LOG] main: - Webinterface [2021-02-13 17:31:57] [ LOG] main: - ALSA [2021-02-13 17:31:57] [ LOG] main: - Pulseaudio [2021-02-13 17:31:57] [ LOG] main: - Webinterface [2021-02-13 17:31:57] [ LOG] main: - Regex [2021-02-13 17:31:57] [ LOG] main: mDNS init [2021-02-13 17:31:57] [ LOG] main: - Regex [2021-02-13 17:31:57] [ LOG] main: mDNS init forked-daapd: client.c:791: avahi_client_errno: Assertionclient' failed.`

Ulrar commented 3 years ago

Hi all,

Sorry about the delay, I'm quite busy these days and since I don't actually use this addon myself anymore it tends to fall at the bottom of my todo.

Can anyone check if dbus and avahi are actually starting with the latest version ? Just docker exec into it and run a ps aux for example. I can see you're all getting a syntax error on something, but I can't spot any typo or differences in the services files so I'm not quite sure which service is causing this.

thanks

cf-vnkr commented 3 years ago

There's no ps in this container.

What I could get is this:

root@e4ac757a-forked-daapd:/usr/local/etc$ find /proc -mindepth 2 -maxdepth 2 -name exe -exec ls -lh {} \; 2>/dev/null
lrwxrwxrwx 1 root root 0 Feb 13 19:03 /proc/1/exe -> /sbin/docker-init
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/6/exe -> /bin/s6-svscan
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/32/exe -> /bin/s6-supervise
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/355/exe -> /bin/s6-supervise
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/357/exe -> /bin/s6-supervise
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/360/exe -> /bin/bash
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/387/exe -> /usr/bin/timeout
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/388/exe -> /bin/bash
lrwxrwxrwx 1 root root 0 Feb 13 19:03 /proc/642/exe -> /bin/dash
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/736/exe -> /bin/sleep
lrwxrwxrwx 1 root root 0 Feb 13 19:04 /proc/740/exe -> /usr/bin/find
Ulrar commented 3 years ago

Thanks, that's very helpful. So it looks like neither dbus nor avahi are starting, I'll look into why that might be.

tingles2233 commented 3 years ago

Thanks Ulrar I appreciate you looking into this. If there is anything you need tested or other questions please let us know!

tingles2233 commented 3 years ago

Just following up on this issue to see if anyone has found any work arounds or assistance in getting this working.

steveof2620 commented 3 years ago

I don't have a work around for this particular add on, but I do have forked-daapd up and running on home assistant. You'll need to install the docker add-on first though. The instructions are here if you're interested:

tingles2233 commented 3 years ago

Excellent! I`ll give that a shot here in the next day and update. Thanks for the info.

Plobli commented 3 years ago

I don't have a work around for this particular add on, but I do have forked-daapd up and running on home assistant. You'll need to install the docker add-on first though. The instructions are here if you're interested:

Yes, this way works!

GoSpursGoNL commented 3 years ago

I don't have a work around for this particular add on, but I do have forked-daapd up and running on home assistant. You'll need to install the docker add-on first though. The instructions are here if you're interested:

Thanks, that works indeed. Not as nice as an addon, but at least forked-daapd works again!

KiLLeRRaT commented 3 years ago

Same issue here, looking forward to a fix :)

Ulrar commented 3 years ago

Hi all,

I have a newborn at home so to be honest I don't expect this getting much attention any time soon, but I'll be happy to merge PRs or even point to another repo if someone wants to take over ! Happy to see there's an alternative way of getting it running at least, that's great