GioF71 / squeezelite-docker

Easily run SqueezeLite with Alsa or PulseAudio output with Docker. Bluetooth support. Upsampling 2x 4x 8x with "Goldilocks" settings by Archimago
Apache License 2.0
33 stars 10 forks source link

Docker container keeps returning "Broken pipe" and "unhandled vers" #316

Open carlo161 opened 5 hours ago

carlo161 commented 5 hours ago

Describe the bug I am using the Docker container in combination with Music Assistant (ghcr.io/music-assistant/server:2.3.3), Squeezelite connect to Music Assistant (I can see it it the list of players) but as soon as I send it a track the log starts to show that messages: I cannot understand what I am doing wrong, does anyone sees it?

[10:44:44.618179] process:532 unhandled vers
[11:11:37.622748] send_packet:114 failed writing to socket: Broken pipe
[11:11:37.622815] send_packet:114 failed writing to socket: Broken pipe
[11:11:37.622852] send_packet:114 failed writing to socket: Broken pipe
[11:11:37.724511] process:532 unhandled vers
[11:13:10.823807] send_packet:114 failed writing to socket: Broken pipe
[11:13:10.823874] send_packet:114 failed writing to socket: Broken pipe
[11:13:10.823911] send_packet:114 failed writing to socket: Broken pipe
[11:13:10.926264] process:532 unhandled vers

Expected behavior I expect that the track starts to be played on the audio card I chose.

Docker-compose.yaml file This is the compose file part:

  audio-player:
    image: "giof71/squeezelite:debian-full-squeezelite-current-2024-09-23"
    container_name: "audio-player"
    networks:
      - "mia-servmng"
    dns:
      - 172.19.0.1
    environment:
      - "SQUEEZELITE_NAME=audio-player"
      - "SQUEEZELITE_SERVER_PORT=music-assistant:3483"
      - "DISPLAY_PRESETS=Y"
      - "SQUEEZELITE_AUDIO_DEVICE=hw:CARD=PCH,DEV=0"
      - "SQUEEZELITE_AUDIO_DEVICE=hw:CARD=PCH,DEV=0"
      - "SQUEEZELITE_MAC_ADDRESS=ab:cd:ef:12:34:56"
      - "DISABLE_MAC_ADDRESS_GENERATION=true"
      - "TZ=Europe/Rome"
    volumes:
      - "/usr/share/zoneinfo:/usr/share/zoneinfo"
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
    devices:
      - "/dev/snd:/dev/snd"

Screenshots If applicable, add screenshots to help explain your problem.

Operating system(please complete the following information): Docker

Additional context This is the complete log:

$docker logs -f audio-player

Setting default value for SQUEEZELITE_MODE: [ALSA]
Setting default value for STARTUP_DELAY_SEC: [0]
About to sleep for 0 second(s)
Ready to start.
Using ALSA mode
=== BEGIN Available audio devices ===
Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  default                        - Default Audio Device
  sysdefault                     - Default Audio Device
  hw:CARD=Device,DEV=0           - USB PnP Audio Device, USB Audio - Direct hardware device without any conversions
  plughw:CARD=Device,DEV=0       - USB PnP Audio Device, USB Audio - Hardware device with all software conversions
  default:CARD=Device            - USB PnP Audio Device, USB Audio - Default Audio Device
  sysdefault:CARD=Device         - USB PnP Audio Device, USB Audio - Default Audio Device
  front:CARD=Device,DEV=0        - USB PnP Audio Device, USB Audio - Front output / input
  dsnoop:CARD=Device,DEV=0       - USB PnP Audio Device, USB Audio - Direct sample snooping device
  hw:CARD=PCH,DEV=0              - HDA Intel PCH, ALC221 Analog - Direct hardware device without any conversions
  hw:CARD=PCH,DEV=3              - HDA Intel PCH, HDMI 0 - Direct hardware device without any conversions
  hw:CARD=PCH,DEV=7              - HDA Intel PCH, HDMI 1 - Direct hardware device without any conversions
  hw:CARD=PCH,DEV=8              - HDA Intel PCH, HDMI 2 - Direct hardware device without any conversions
  plughw:CARD=PCH,DEV=0          - HDA Intel PCH, ALC221 Analog - Hardware device with all software conversions
  plughw:CARD=PCH,DEV=3          - HDA Intel PCH, HDMI 0 - Hardware device with all software conversions
  plughw:CARD=PCH,DEV=7          - HDA Intel PCH, HDMI 1 - Hardware device with all software conversions
  plughw:CARD=PCH,DEV=8          - HDA Intel PCH, HDMI 2 - Hardware device with all software conversions
  default:CARD=PCH               - HDA Intel PCH, ALC221 Analog - Default Audio Device
  sysdefault:CARD=PCH            - HDA Intel PCH, ALC221 Analog - Default Audio Device
  front:CARD=PCH,DEV=0           - HDA Intel PCH, ALC221 Analog - Front output / input
  surround21:CARD=PCH,DEV=0      - HDA Intel PCH, ALC221 Analog - 2.1 Surround output to Front and Subwoofer speakers
  surround40:CARD=PCH,DEV=0      - HDA Intel PCH, ALC221 Analog - 4.0 Surround output to Front and Rear speakers
  surround41:CARD=PCH,DEV=0      - HDA Intel PCH, ALC221 Analog - 4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=PCH,DEV=0      - HDA Intel PCH, ALC221 Analog - 5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=PCH,DEV=0      - HDA Intel PCH, ALC221 Analog - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=PCH,DEV=0      - HDA Intel PCH, ALC221 Analog - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  hdmi:CARD=PCH,DEV=0            - HDA Intel PCH, HDMI 0 - HDMI Audio Output
  hdmi:CARD=PCH,DEV=1            - HDA Intel PCH, HDMI 1 - HDMI Audio Output
  hdmi:CARD=PCH,DEV=2            - HDA Intel PCH, HDMI 2 - HDMI Audio Output
  dmix:CARD=PCH,DEV=0            - HDA Intel PCH, ALC221 Analog - Direct sample mixing device
  dmix:CARD=PCH,DEV=3            - HDA Intel PCH, HDMI 0 - Direct sample mixing device
  dmix:CARD=PCH,DEV=7            - HDA Intel PCH, HDMI 1 - Direct sample mixing device
  dmix:CARD=PCH,DEV=8            - HDA Intel PCH, HDMI 2 - Direct sample mixing device
  dsnoop:CARD=PCH,DEV=0          - HDA Intel PCH, ALC221 Analog - Direct sample snooping device

=== END-- Available audio devices ===

=== BEGIN Loading presets ===
Loading built-in Presets...
Loading preset [no-dsd.exclude-codecs]=[dsd]
Loading preset [goldilocks.upsampling]=[v::4:28:95:105:45]
Loading preset [extremus.upsampling]=[v::3.05:28:99.7:100:45]
Loading preset [goldilocks_96k.rates]=[96000:200]
Loading preset [goldilocks_96k.upsampling]=[v::4:28:95:105:45]
Loading preset [goldilocks_2x_only.rates]=[88200,96000:200]
Loading preset [goldilocks_2x_only.upsampling]=[v::4:28:95:105:45]
Loading preset [goldilocks_4x_only.rates]=[176400,192000:200]
Loading preset [goldilocks_4x_only.upsampling]=[v::4:28:95:105:45]
Loading preset [goldilocks_8x_only.rates]=[352800,384000:200]
Loading preset [goldilocks_8x_only.upsampling]=[v::4:28:95:105:45]
Loading preset [rates_96k.rates]=[96000:200]
Loading preset [rates_up_to_96k.rates]=[44100-96000:200]
Loading preset [rates_up_to_192k.rates]=[44100-192000:200]
Loading preset [rates_up_to_384k.rates]=[44100-384000:200]
Loading preset [rates_up_to_768k.rates]=[44100-768000:200]
Loading preset [rates_2x_only.rates]=[88200,96000:200]
Loading preset [rates_4x_only.rates]=[176400,192000:200]
Loading preset [rates_8x_only.rates]=[352800,384000:200]
Loading preset [rates_16x_only.rates]=[705600,768000:200]
Loading preset [archimago-goldilocks.upsampling]=[v::4:28:95:105:45]
Loading preset [archimago-extremus.upsampling]=[v::3.05:28:99.7:100:45]
Loading preset [goldilocks_up_to_96k.rates]=[44100-96000:200]
Loading preset [goldilocks_up_to_96k.upsampling]=[v::4:28:95:105:45]
Loading preset [goldilocks_up_to_192k.rates]=[44100-192000:200]
Loading preset [goldilocks_up_to_192k.upsampling]=[v::4:28:95:105:45]
Loading preset [goldilocks_up_to_384k.rates]=[44100-384000:200]
Loading preset [goldilocks_up_to_384k.upsampling]=[v::4:28:95:105:45]
Loading preset [goldilocks_up_to_768k.rates]=[44100-768000:200]
Loading preset [goldilocks_up_to_768k.upsampling]=[v::4:28:95:105:45]
Loading preset [dac.device]=["hw:CARD=DAC"]
Loading preset [x20.device]=["hw:CARD=x20"]
Loading preset [aune-s6-sw.device]=["hw:CARD=DAC"]
Loading preset [aune-s6.device]=["hw:CARD=DAC"]
Loading preset [aune-s6.mixer-device]=["hw:CARD=DAC"]
Loading preset [aune-s6.volume-control]=["S6 USB DAC Output"]
Loading preset [aune-x1s.device]=["hw:CARD=DAC"]
Loading preset [fiio-e18.device]=["hw:CARD=DACE18"]
Loading preset [gustard-u12-sw.device]=["hw:CARD=x20"]
Loading preset [gustard-u12.device]=["hw:CARD=x20"]
Loading preset [gustard-u12.mixer-device]=["hw:CARD=x20"]
Loading preset [gustard-u12.volume-control]=["xCORE USB Audio 2.0 Output"]
Loading preset [gustard-x12-sw.device]=["hw:CARD=x20"]
Loading preset [gustard-x12.device]=["hw:CARD=x20"]
Loading preset [gustard-x12.mixer-device]=["hw:CARD=x20"]
Loading preset [gustard-x12.volume-control]=["xCORE USB Audio 2.0 Output"]
Loading preset [gustard-x12-goldilocks.device]=["hw:CARD=x20"]
Loading preset [gustard-x12-goldilocks.mixer-device]=["hw:CARD=x20"]
Loading preset [gustard-x12-goldilocks.volume-control]=["xCORE USB Audio 2.0 Output"]
Loading preset [gustard-x12-goldilocks.rates]=[44100-384000:200]
Loading preset [gustard-x12-goldilocks.upsampling]=[v::4:28:95:105:45]
Loading preset [gustard-x16.device]=["hw:CARD=G20"]
Loading preset [hifiberry-dac-plus.device]=["hw:CARD=sndrpihifiberry"]
Loading preset [ifi-zen-dac.device]=["hw:CARD=Audio"]
Loading preset [peachtree-dacit.device]=["hw:CARD=DAC"]
Loading preset [pi-headphones.device]=["hw:CARD=Headphones"]
Loading preset [topping-d10-sw.device]=["hw:CARD=D10"]
Loading preset [topping-d10.device]=["hw:CARD=D10"]
Loading preset [topping-d10.mixer-device]=["hw:CARD=D10"]
Loading preset [topping-d10.volume-control]=["D10 "]
Loading preset [topping-d10s-sw.device]=["hw:CARD=D10s"]
Loading preset [topping-d10s.device]=["hw:CARD=D10s"]
Loading preset [topping-d10s.mixer-device]=["hw:CARD=D10s"]
Loading preset [topping-d10s.volume-control]=["D10s "]
Loading preset [topping-d10-balanced-sw.device]=["hw:CARD=Balanced"]
Loading preset [topping-d10-balanced.device]=["hw:CARD=Balanced"]
Loading preset [topping-d10-balanced.mixer-device]=["hw:CARD=Balanced"]
Loading preset [topping-d10-balanced.volume-control]=["D10 Balanced"]
Loading preset [topping-dx5.device]=["hw:CARD=DX5"]
Loading preset [topping-dx5.device]=["hw:CARD=E30"]
Loading preset [yulong-d200-sw.device]=["hw:CARD=DAC"]
Loading preset [yulong-d200.device]=["hw:CARD=DAC"]
Loading preset [yulong-d200.mixer-device]=["hw:CARD=DAC"]
Loading preset [yulong-d200.volume-control]=["YULONG Audio 384k DSD DAC "]
Finished loading built-in presets
No additional preset file found
There are [73] available presets
PRESET [topping-d10s.volume-control]=["D10s "]
PRESET [gustard-x12-goldilocks.upsampling]=[v::4:28:95:105:45]
PRESET [gustard-u12.mixer-device]=["hw:CARD=x20"]
PRESET [goldilocks_2x_only.upsampling]=[v::4:28:95:105:45]
PRESET [rates_up_to_768k.rates]=[44100-768000:200]
PRESET [goldilocks_96k.rates]=[96000:200]
PRESET [topping-d10.device]=["hw:CARD=D10"]
PRESET [rates_2x_only.rates]=[88200,96000:200]
PRESET [goldilocks_up_to_768k.rates]=[44100-768000:200]
PRESET [goldilocks_8x_only.rates]=[352800,384000:200]
PRESET [goldilocks.upsampling]=[v::4:28:95:105:45]
PRESET [gustard-u12.volume-control]=["xCORE USB Audio 2.0 Output"]
PRESET [gustard-x12.mixer-device]=["hw:CARD=x20"]
PRESET [yulong-d200-sw.device]=["hw:CARD=DAC"]
PRESET [topping-d10.volume-control]=["D10 "]
PRESET [aune-s6.device]=["hw:CARD=DAC"]
PRESET [goldilocks_up_to_96k.rates]=[44100-96000:200]
PRESET [yulong-d200.mixer-device]=["hw:CARD=DAC"]
PRESET [rates_up_to_384k.rates]=[44100-384000:200]
PRESET [goldilocks_4x_only.upsampling]=[v::4:28:95:105:45]
PRESET [gustard-x12-goldilocks.mixer-device]=["hw:CARD=x20"]
PRESET [aune-s6.mixer-device]=["hw:CARD=DAC"]
PRESET [gustard-x12.volume-control]=["xCORE USB Audio 2.0 Output"]
PRESET [topping-d10s-sw.device]=["hw:CARD=D10s"]
PRESET [gustard-u12.device]=["hw:CARD=x20"]
PRESET [goldilocks_4x_only.rates]=[176400,192000:200]
PRESET [dac.device]=["hw:CARD=DAC"]
PRESET [goldilocks_2x_only.rates]=[88200,96000:200]
PRESET [x20.device]=["hw:CARD=x20"]
PRESET [aune-x1s.device]=["hw:CARD=DAC"]
PRESET [goldilocks_up_to_384k.rates]=[44100-384000:200]
PRESET [topping-d10-sw.device]=["hw:CARD=D10"]
PRESET [topping-d10s.mixer-device]=["hw:CARD=D10s"]
PRESET [topping-d10.mixer-device]=["hw:CARD=D10"]
PRESET [goldilocks_up_to_192k.rates]=[44100-192000:200]
PRESET [pi-headphones.device]=["hw:CARD=Headphones"]
PRESET [gustard-x12-goldilocks.device]=["hw:CARD=x20"]
PRESET [rates_8x_only.rates]=[352800,384000:200]
PRESET [yulong-d200.device]=["hw:CARD=DAC"]
PRESET [archimago-extremus.upsampling]=[v::3.05:28:99.7:100:45]
PRESET [hifiberry-dac-plus.device]=["hw:CARD=sndrpihifiberry"]
PRESET [goldilocks_up_to_192k.upsampling]=[v::4:28:95:105:45]
PRESET [rates_4x_only.rates]=[176400,192000:200]
PRESET [yulong-d200.volume-control]=["YULONG Audio 384k DSD DAC "]
PRESET [goldilocks_up_to_96k.upsampling]=[v::4:28:95:105:45]
PRESET [gustard-x12-sw.device]=["hw:CARD=x20"]
PRESET [rates_up_to_96k.rates]=[44100-96000:200]
PRESET [archimago-goldilocks.upsampling]=[v::4:28:95:105:45]
PRESET [rates_96k.rates]=[96000:200]
PRESET [rates_up_to_192k.rates]=[44100-192000:200]
PRESET [topping-d10-balanced.volume-control]=["D10 Balanced"]
PRESET [gustard-x16.device]=["hw:CARD=G20"]
PRESET [topping-d10-balanced-sw.device]=["hw:CARD=Balanced"]
PRESET [topping-d10-balanced.mixer-device]=["hw:CARD=Balanced"]
PRESET [rates_16x_only.rates]=[705600,768000:200]
PRESET [aune-s6.volume-control]=["S6 USB DAC Output"]
PRESET [gustard-u12-sw.device]=["hw:CARD=x20"]
PRESET [gustard-x12-goldilocks.rates]=[44100-384000:200]
PRESET [goldilocks_8x_only.upsampling]=[v::4:28:95:105:45]
PRESET [goldilocks_96k.upsampling]=[v::4:28:95:105:45]
PRESET [goldilocks_up_to_768k.upsampling]=[v::4:28:95:105:45]
PRESET [peachtree-dacit.device]=["hw:CARD=DAC"]
PRESET [extremus.upsampling]=[v::3.05:28:99.7:100:45]
PRESET [gustard-x12-goldilocks.volume-control]=["xCORE USB Audio 2.0 Output"]
PRESET [no-dsd.exclude-codecs]=[dsd]
PRESET [topping-d10-balanced.device]=["hw:CARD=Balanced"]
PRESET [topping-dx5.device]=["hw:CARD=E30"]
PRESET [gustard-x12.device]=["hw:CARD=x20"]
PRESET [fiio-e18.device]=["hw:CARD=DACE18"]
PRESET [goldilocks_up_to_384k.upsampling]=[v::4:28:95:105:45]
PRESET [ifi-zen-dac.device]=["hw:CARD=Audio"]
PRESET [aune-s6-sw.device]=["hw:CARD=DAC"]
PRESET [topping-d10s.device]=["hw:CARD=D10s"]
=== END-- Loading presets ===
Initializing command line: [/app/bin/squeezelite]
No presets have been specified
Variable SQUEEZELITE_SERVER_PORT has been specified: music-assistant:3483
Variable SQUEEZELITE_NAME has been specified: audio-player
Variable SQUEEZELITE_MODEL_NAME has not been specified
Variable SQUEEZELITE_TIMEOUT has not been specified, using default 2
Variable SQUEEZELITE_AUDIO_DEVICE has been specified: hw:CARD=PCH,DEV=0
Variable SQUEEZELITE_MIXER_DEVICE has not been specified
Variable SQUEEZELITE_DELAY has not been specified, using default 500
Variable SQUEEZELITE_PARAMS has not been specified
Variable SQUEEZELITE_VOLUME_CONTROL not specified
Variable SQUEEZELITE_LINEAR_VOLUME not specified
Variable SQUEEZELITE_CODECS has not been specified
Variable SQUEEZELITE_EXCLUDE_CODECS has not been specified
Variable SQUEEZELITE_RATES not specified
Variable SQUEEZELITE_PRIORITY has not been specified
Variable SQUEEZELITE_UPSAMPLING not specified
Variable SQUEEZELITE_READ_FORMATS_FROM_HEADER not specified
Variable SQUEEZELITE_BUFFER_SIZE not specified
Variable SQUEEZELITE_STREAM_AND_OUTPUT_BUFFER_SIZE (DEPRECATED) not specified
Variable SQUEEZELITE_UNMUTE not specified
Variable SQUEEZELITE_VISUALIZER not specified
Current user id is [0], requested USER_MODE=[]
Resulting actual_user_mode: [0]
User mode disabled
Variable SQUEEZELITE_MAC_ADDRESS specified: ab:cd:ef:12:34:56
Command Line: [/app/bin/squeezelite -s "music-assistant:3483" -n "audio-player" -C "2" -o "hw:CARD=PCH,DEV=0" -D "500" -m "ab:cd:ef:12:34:56"]
[10:44:44.618179] process:532 unhandled vers
[11:11:37.622748] send_packet:114 failed writing to socket: Broken pipe
[11:11:37.622815] send_packet:114 failed writing to socket: Broken pipe
[11:11:37.622852] send_packet:114 failed writing to socket: Broken pipe
[11:11:37.724511] process:532 unhandled vers
[11:13:10.823807] send_packet:114 failed writing to socket: Broken pipe
[11:13:10.823874] send_packet:114 failed writing to socket: Broken pipe
[11:13:10.823911] send_packet:114 failed writing to socket: Broken pipe
[11:13:10.926264] process:532 unhandled vers
carlo161 commented 5 hours ago

With the following modifications in the compose file it seems to work:

    network_mode: "host"
    extra_hosts:
      - "music-assistant:192.168.16.100"

But I still do not understand why it does not work with the previous configuration.

GioF71 commented 4 hours ago

Hello, maybe music-assistant was not accessible without that extra_host. You might be able to verify that with the first config, by entering the container and executing a few commands:

docker exec -it audio-player bash
apt-get update
apt-get install -y iputils-ping
ping music-assistant

As long as you specify the SQUEEZELITE_SERVER_PORT, it should not be necessary to use host networking.

Have you tried to set SQUEEZELITE_SERVER_PORT=192.168.16.100 with bridge (non-host, so default mode) networking?