Closed seve-martinez closed 3 months ago
Turns out this was an issue with CoreOS and podman. Podman does some dark magic with networking and requires containers to be in a pod to communicate. Even if you put them on the same bridge network when starting them, it still won't work.
What version of Music Assistant has the issue?
2.0.7
What version of the Home Assistant Integration have you got installed?
2024.6.2
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
When trying to add Music Assistant server to Home Assistant, I get an ambiguous "Failed to connect" error message.
What I have verified:
When I restart Home Assistant, the MA server will show up in the "discovered" section with the proper url and port. However, clicking submit returns the same error.
Setup Main OS: Fedora CoreOS
podman run -d --network host --privileged -v mass:/data ghcr.io/music-assistant/server
Upon restart:
Manual addition:
How to reproduce
Spin up HA container
podman run --name home-assistant -p 8123:8123 --cap-add=NET_RAW --cap-add=NET_ADMIN -v ha_config:/config:Z homeassistant/home-assistant
Spin up MA container
podman run -d --network host --privileged -v mass:/data ghcr.io/music-assistant/server
Add HACS to HA:
Add MA
Music Providers
NA
Player Providers
NA
Full log output
log.txt
Additional information
digging into the home-assistant logs i found this stack trace:
Which originates here: https://github.com/music-assistant/server/blob/main/music_assistant/client/connection.py#L26 I don't know why the
http://
is getting stripped.What version of Home Assistant Core are your running
2024.7.0
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Linux