Repository: badaix/snapcast

Issue #486: Bad fifo default location for systems running systemd (/tmp/snapfifo)
Created: 2019-10-17T21:07:27Z
On a typical default systemd setup /tmp is cleaned every 10d:
https://github.com/systemd/systemd/blob/master/tmpfiles.d/tmp.conf.
This caused issues for my setup as mopidy fails to create a proper fifo and always just created a regular file instead when trying to play something, resulting in my setup to stop working properly every 10 days after the cleanup happened. Probably /var/lib/snapserver/ would be a better location for the fifo to not be cleaned up regularly.

Duplicate issue #737: Permission Denied on Piping to /tmp/snapfifo on snapserver amd64
Created: 2020-12-06T12:32:01Z
Describe the bug
I can't get the snapserver to run on my laptop or vm (Ubuntu 20.04 desktop and server). For some reason I got Permission denied error on piping /dev/urandom or any wav file into the default pipe /tmp/snapfifo even on minimal setup described below.
But running snapserver on a Raspberry Pi works just fine.
Steps to Reproduce
Setup server:

Install snapserver on Ubuntu 20 laptop: sudo dpkg -i snapserver_0.22.0-1_amd64.deb
Start snapserver on laptop: sudo service snapserver start

Setup client:

Install snapclient on Raspberry Pi: sudo dpkg -i snapclient*_armhf.deb
Point snapclient to snapserver's hostname on /etc/default/snapclient with SNAPCLIENT_OPTS="--host laptop.local", and restart with sudo service snapclient restart

Snapserver log on laptop (sudo journalctl -xu snapserver -f) shows that client connected successfully
Testing:
# on server
sudo su -  # to be sure I'm redirecting as root
cat /dev/urandom > /tmp/snapfifo # this or,
cat some_audio.wav > /tmp/snapfifo
Both gives:
-bash: /tmp/snapfifo: Permission denied
Output of ls -lha /tmp/snapfifo:
prw-rw-rw- 1 snapserver snapserver 0 Dez  6 11:43 /tmp/snapfifo
Environment details

Server

Ubuntu 20 native install
snapserver v0.22.0 amd64 deb


Client

Raspbian Buster native install
snapclient v0.22.0 armhf deb



Possible Relevant Log Entries
There's an Exception: end of file the first time snapserver is started:
Dec  6 13:21:23 laptop snapserver[150929]: Adding source: pipe:///tmp/snapfifo?name=default
Dec  6 13:21:23 laptop snapserver[150929]: Settings file: "/var/lib/snapserver/server.json"
Dec  6 13:21:23 laptop snapserver[150929]: Adding service 'Snapcast'
Dec  6 13:21:23 laptop snapserver[150929]: PcmStream: default, sampleFormat: 48000:16:2
Dec  6 13:21:23 laptop snapserver[150929]: Stream: default, metadata={
Dec  6 13:21:23 laptop snapserver[150929]:     "STREAM": "default"
Dec  6 13:21:23 laptop snapserver[150929]: }
Dec  6 13:21:23 laptop snapserver[150929]: onMetaChanged (default)
Dec  6 13:21:23 laptop snapserver[150929]: PipeStream mode: create
Dec  6 13:21:23 laptop snapserver[150929]: Stream: {"fragment":"","host":"","path":"/tmp/snapfifo","query":{"chunk_ms":"20","codec":"flac","name":"default","sampleformat":"48000:16:2"},"raw":"pipe:////tmp/snapfifo?chunk_ms=20&codec=flac&name=default&sampleformat=48000:16:2","scheme":"pipe"}
Dec  6 13:21:23 laptop snapserver[150929]: Exception: end of file
Dec  6 13:21:23 laptop snapserver[150929]: Creating TCP acceptor for address: 0.0.0.0, port: 1705
Dec  6 13:21:23 laptop snapserver[150929]: Creating HTTP acceptor for address: 0.0.0.0, port: 1780
Dec  6 13:21:23 laptop snapserver[150929]: Creating stream acceptor for address: 0.0.0.0, port: 1704
Dec  6 13:21:23 laptop snapserver[150929]: number of threads: 4, hw threads: 4

Any clue? Did I miss anything on the setup?

Closing comment (2021-05-17T06:17:13Z): I'm seeing this issue just now.
Isn't this just a duplicate of #486, where we were already discussing potential new locations for the fifo?
Edit: whoops, sorry, just noticed the many references to #486 above...