Snapserver

  • Hello

    I've just installed the SnapServer addon onto my rpi3

    it seems to be working well except my pulse.log has an error message every 10 secs and I dont know what is causing it

    error message is [pulseaudio] sap.c: sendmsg() failed: Connection refused


    snapserver & snapclient both report that they are version 9.0.102

    librespot reports as version 9.0.113

    kodi is 18.0-RC5 Gitc9d65b1


    Rasp3Libre:~/.config/pulse-daemon.conf.d # cat 50-snapserver.conf

    ### Pulseaudio reads this file when it starts-up

    ### Uncomment or add options if you know what you are doing

    # pulse log file while testing

    log-target = file:/storage/.config/pulse.log

    log-level = notice

    log-meta = no

    log-time = yes

    resample-method = soxr-vhq

    #default-sample-format = s16le

    #default-sample-rate = 48000


    Rasp3Libre:~/.config # cat pulse.log

    ( 0.000| 0.000) W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.

    ( 0.000| 0.000) W: [pulseaudio] main.c: Home directory of user 'root' is not '/var/run/pulse', ignoring.

    ( 0.000| 0.000) W: [pulseaudio] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.

    ( 0.001| 0.000) W: [pulseaudio] main.c: OK, so you are running PA in system mode. Please make sure that you actually do want to do that.

    ( 0.001| 0.000) W: [pulseaudio] main.c: Please read http://www.freedesktop.org/wiki/software/pulseaudio/documentation/user/whatiswrongwithsystemwide/ for an explanation why system mode is usually a bad idea.

    ( 0.061| 0.060) W: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie': No such file or directory

    ( 0.062| 0.000) W: [pulseaudio] authkey.c: Failed to load authentication key '/var/run/pulse/.config/pulse/cookie': No such file or directory

    ( 0.062| 0.000) W: [pulseaudio] authkey.c: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such file or directory

    ( 0.062| 0.000) W: [pulseaudio] authkey.c: Failed to load authentication key '/var/run/pulse/.pulse-cookie': No such file or directory

    ( 0.286| 0.002) E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

    ( 9.934| 9.648) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 19.935| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 29.936| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 39.937| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 49.938| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 59.939| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 69.939| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 79.940| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 89.941| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 99.942| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 109.943| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 119.944| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 129.945| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 139.946| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 149.947| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 159.948| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 169.949| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 179.950| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 189.951| 10.001) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 199.952| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 209.953| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 219.954| 10.001) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 229.955| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 239.956| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 249.956| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 259.957| 10.001) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 269.958| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ( 279.959| 10.000) W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    ..... continues in the same vein


    Rasp3Libre:~/.kodi/temp # head -15 kodi.log

    02:13:45.947 T:1936777888 NOTICE: -----------------------------------------------------------------------

    02:13:45.947 T:1936777888 NOTICE: Starting Kodi (18.0-RC5 Git:c9d65b1). Platform: Linux ARM 32-bit

    02:13:45.947 T:1936777888 NOTICE: Using Release Kodi x32 build (version for Raspberry Pi)

    02:13:45.947 T:1936777888 NOTICE: Kodi compiled 2019-01-17 by GCC 8.2.0 for Linux ARM 32-bit version 4.19.15 (267023)

    02:13:45.948 T:1936777888 NOTICE: Running on LibreELEC (Milhouse): devel-20190117210258-#0117-ge23e672 [Build #0117] 9.0, kernel: Linux ARM 32-bit version 4.19.15

    02:13:45.948 T:1936777888 NOTICE: FFmpeg version/source: 4.0.3-Kodi

    02:13:45.948 T:1936777888 NOTICE: Host CPU: ARMv7 Processor rev 4 (v7l), 4 cores available

    02:13:45.948 T:1936777888 NOTICE: ARM Features: Neon enabled

    02:13:45.948 T:1936777888 NOTICE: special://xbmc/ is mapped to: /usr/share/kodi/

    02:13:45.948 T:1936777888 NOTICE: special://xbmcbin/ is mapped to: /usr/lib/kodi

    02:13:45.948 T:1936777888 NOTICE: special://xbmcbinaddons/ is mapped to: /usr/lib/kodi/addons

    02:13:45.948 T:1936777888 NOTICE: special://masterprofile/ is mapped to: /storage/.kodi/userdata

    02:13:45.948 T:1936777888 NOTICE: special://envhome/ is mapped to: /storage

    02:13:45.948 T:1936777888 NOTICE: special://home/ is mapped to: /storage/.kodi

    02:13:45.948 T:1936777888 NOTICE: special://temp/ is mapped to: /storage/.kodi/temp


    Rasp3Libre:~/.kodi/temp # pactl list short sinks

    1 Snapserver module-pipe-sink.c s16le 2ch 48000Hz RUNNING

    2 librespot_sink module-null-sink.c s16le 2ch 44100Hz SUSPENDED


    if anybody has any ideas what is causing the message

    [pulseaudio] sap.c: sendmsg() failed: Connection refused

    to be repeated every 10 secs i'd be glad to know

  • This is just a warning. From what I see it comes because rtp module is loaded. You can see this by

    Code
    LibreELEC:~ # pactl list short modules |grep rtp
    18      module-rtp-send source=librespot_sink.monitor destination_ip=127.0.0.1 port=6666 source_ip=127.0.0.1

    And seems it is used/loaded by librespot: LibreELEC.tv/librespot-03_pulseaudio_sink.patch at master · LibreELEC/LibreELEC.tv · GitHub

    You can unload it by

    Code
    pactl unload-module module-rtp-send

    but maybe functionality will stop working.

  • Thanks for updates, I look forward to hearing further about issue.

    Obviously I can just stop the logging and the issue will be unnoticed, but I don't like knowing there issues lurking away in the background.

  • tkgafs

    I had a look.

    I coded snapserver.start to create a PulseAudio sink for Kodi, but I did not suspend it when unused.

    This should not cause problems other than the messages you see.

    I will fix this in an upcoming revision.

    I intend to use json RPC to configure Snapserver (set stream, set clients) and Snapclients (set volume), which should take a couple of weeks.