music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.36k stars 52 forks source link

cannot update cause slimproto failed to install #3035

Closed AuqW9cQ closed 2 weeks ago

AuqW9cQ commented 2 weeks ago

What version of Music Assistant has the issue?

2.2.7

What version of the Home Assistant Integration have you got installed?

2024.10.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 i try to update MA from 2.2.0 to 2.2.7 i got the following log:

2024-10-15 15:57:39.088 INFO (MainThread) [music_assistant] Starting Music Assistant Server (2095757d21164ce0b79c9f4c622ff07e) version 2.2.7 - HA add-on: False - Safe mode: False
2024-10-15 15:57:39.100 INFO (MainThread) [music_assistant.cache] Initializing cache controller...
2024-10-15 15:57:47.167 INFO (MainThread) [music_assistant.music] Migrating database from version 7 to 9
2024-10-15 15:57:47.296 INFO (MainThread) [music_assistant.cache] Clearing database...
2024-10-15 15:57:47.906 INFO (MainThread) [music_assistant.cache] Clearing database DONE
2024-10-15 15:58:07.859 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes.
2024-10-15 15:58:07.954 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 6.1.1 with libsoxr support
2024-10-15 15:58:07.954 INFO (MainThread) [music_assistant.streams] Starting server on  0.0.0.0:8097 - base url: http://192.168.111.243:8097
2024-10-15 15:58:07.958 INFO (MainThread) [music_assistant.webserver] Starting server on  0.0.0.0:8095 - base url: http://192.168.111.243:8095
2024-10-15 15:58:08.504 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/aiorun.py", line 219, in new_coro
    await coro
  File "/app/venv/lib/python3.12/site-packages/music_assistant/__main__.py", line 212, in start_mass
    await mass.start()
  File "/app/venv/lib/python3.12/site-packages/music_assistant/server/server.py", line 161, in start
    await self._load_providers()
  File "/app/venv/lib/python3.12/site-packages/music_assistant/server/server.py", line 549, in _load_providers
    prov_configs = await self.config.get_provider_configs(include_values=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/music_assistant/server/controllers/config.py", line 169, in get_provider_configs
    await self.get_provider_config(prov_conf["instance_id"])
  File "/app/venv/lib/python3.12/site-packages/music_assistant/server/controllers/config.py", line 183, in get_provider_config
    config_entries = await self.get_provider_config_entries(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/music_assistant/server/controllers/config.py", line 233, in get_provider_config_entries
    prov_mod = await load_provider_module(provider_domain, prov.requirements)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/music_assistant/server/helpers/util.py", line 116, in load_provider_module
    await install_package(requirement)
  File "/app/venv/lib/python3.12/site-packages/music_assistant/server/helpers/util.py", line 49, in install_package
    raise RuntimeError(msg)
RuntimeError: Failed to install package aioslimproto==3.0.1
error: failed to create file `/app/venv/.lock`
  Caused by: Permission denied (os error 13)

How to reproduce

Update Container from 2.2.0 to 2.2.7 with installed Slimproto

Music Providers

The Problem is during starting the container, so the problem is no result of playing music.

Installed are: MusicAssistant RadioBrowser Spotify Filesystem (Local disk)

Player Providers

Slimproto

Full log output

No response

Additional information

No response

What version of Home Assistant Core are your running

2024.10.2

What type of installation are you running?

Home Assistant Container

On what type of hardware are you running?

Alternative

OzGav commented 2 weeks ago

Are you using the docker compose from the docs?

AuqW9cQ commented 2 weeks ago

First of all, thanks for your responce.

Im running the Container in my kubernetes cluster, deployed via Flux.

Here´s my helmrelease.yml

---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: musicassistant
spec:
  interval: 15m
  chart:
    spec:
      chart: app-template
      version: 3.4.0
      sourceRef:
        kind: HelmRepository
        name: bjw-s-charts
        namespace: flux-system
      interval: 15m
  install:
    createNamespace: true
    remediation:
      retries: 5
  upgrade:
    remediation:
      retries: 5
  values:
    controllers:
      musicassistant:
        pod:
          securityContext:
            runAsUser: 568
            runAsGroup: 568
            runAsNonRoot: true
            fsGroup: 10081
            fsGroupChangePolicy: OnRootMismatch
        containers:
          main:
            image:
              repository: ghcr.io/music-assistant/server
              tag: 2.2.0
            resources:
              requests:
                cpu: 47m
                memory: 512Mi
              limits:
                memory: 1024Mi
            probes:
              liveness:
                enabled: true
              readiness:
                enabled: true
            env:
              TZ: Europe/Berlin

    service:
      main:
        controller: musicassistant
        type: LoadBalancer
        loadBalancerIP: 192.168.1.10 # set this Published IP Adress
        annotations:
          metallb.universe.tf/allow-shared-ip: "true"
        ports:
          http:
            port: 8095
          stream1:
            port: 8097
            targetPort: 8097
          stream2:
            port: 8098
            targetPort: 8098
          api:
            port: 9000
            protocol: TCP
          sbcli:
            port: 9090
            protocol: TCP
          psb:
            port: 3483
            protocol: TCP

      second:
        controller: musicassistant
        type: LoadBalancer
        loadBalancerIP: 192.168.1.10
        annotations:
          metallb.universe.tf/allow-shared-ip: "true"
        ports:
          psb-udp:
            port: 3483
            protocol: UDP

    ingress:
      main:
        enabled: true
        className: nginx
        hosts:
          - host: musicassistant.mydomain.local 
            paths:
              - path: /
                pathType: Prefix
                service:
                  identifier: main
                  port: http
    persistence:
      config:
        enabled: true
        existingClaim: musicassistant-config
        globalMounts:
          - path: /data
      music:
        existingClaim: musicassistant-music-pvc
marcelveldt commented 2 weeks ago

We cant support kubernetes setups. Have a look at our example docker configs (especially about the permissions).

marcelveldt commented 2 weeks ago

Also, I'm not a Kubernetes expert but I notice multiple issues in your setup:

Basically, you are on your own for setup. We really do not have the manpower to support complex setups like this, sorry. Ofcourse if you find out how to make it work, feel free to share your experience to help others.