Snapcast: Exception in Controller::worker()

Created on 18 May 2016  路  11Comments  路  Source: badaix/snapcast

Since last update ( I think I jumped from v 0.4.1 but im not 100% sure) to 0.7.0 my raspberry client cant connect any more. On the client I see:

May 18 07:11:25 rapi2 snapclient[2889]: Connected to 172.16.1.117 
May 18 07:11:26 rapi2 snapclient[2889]: Exception in Controller::worker(): sum timeout exceeded 10s

In the systemd logs and on the server I get:

May 18 08:58:53 serv snapserver[1272]: StreamServer::NewConnection: 172.16.1.83
May 18 08:58:54 serv snapserver[1272]: 2016-05-18 08-58-54 [Err] Exception in StreamSession::reader(): read_some: End of file
May 18 08:58:54 serv snapserver[1272]: 2016-05-18 08-58-54 [out] onDisconnect:
May 18 08:58:54 serv snapserver[1272]: Exception in StreamSession::reader(): read_some: End of file

I also run a client instance on the same machine as the server. This client does work without error message.

For wat its worth, I use Arch Linux on both machines (client raspberry pi, server x86) and the packages are compiled from source.

Most helpful comment

I am having this issue with 0.11.1 without pulseaudio.
in my raspbian installation this was due to the home directory of the snapclient user not existing and not being writable to th snapclient user. after creating the directory /var/lib/snapclient and chowning it to the snapclient user, everything works like a charm.
This may be an issue of the snapclient package...

Update: here is the command:
mkdir /var/lib/snapclient
chown snapclient /var/lib/snapclient

All 11 comments

Are you sure that client and server are both on 0.7?
Did you make clean after pulling the latest version?

You are completely right, the updated didnt work. Thanks a lot.

@deisi @badaix have the same issue, fresh installation raspberry Arch linux and x64 Manjaro(Arch distribution) both have 0.10.0-2 version builded from aur
on client

Jan 16 01:35:26 jarvis snapclient[20550]: Connected to 192.168.1.187
Jan 16 01:35:28 jarvis snapclient[20550]: Exception in Controller::worker(): sum timeout exceeded 10s

and
on server x64

Jan 15 22:27:25 alarmpi snapserver[4728]: Exception in StreamSession::reader(): read_some: End of file
Jan 15 22:27:26 alarmpi snapserver[4728]: StreamServer::NewConnection: 192.168.1.2

clients on android(two smartphones works ok) server runned on x64 works with clients on androids and client on x64 machine gives the same issue.

Any ideas what i've faced?

uff, I currently have a broken rpi and cant test. In any case, I will change back to debian, because I hat too much trouble with Arch on ARM.

So no, Idear sry.

I get exactly the same problem with 2 freshly install Snapcast 0.11.1 installed from Arch AUR:

  • exact same version on streaming server and client,
  • client on server itself (loopback) works,
  • client on my laptop don't with the error messages indicated by @seniorivn.

hey how you start the client? From systemd?
Try starting it maual with:
snapclient and see if it works

If it works, you might have the same problem as I just described in #229

If this is the problem It would be interesting to hear if you are using pulseaudio as well.

Ok, further testing with two clients both running Arch (same dist on the server too):

  • Raspberry Pi without PulseAudio: works flawlessly launched in command line with or without daemon mode, and launched through _systemd_,
  • Laptop with PulseAudio: works when launched in command line with or without daemon, not when launched through _systemd_ (errors indicated above).

So, it seems it is linked in some way to #229.

I am having this issue with 0.11.1 without pulseaudio.
in my raspbian installation this was due to the home directory of the snapclient user not existing and not being writable to th snapclient user. after creating the directory /var/lib/snapclient and chowning it to the snapclient user, everything works like a charm.
This may be an issue of the snapclient package...

Update: here is the command:
mkdir /var/lib/snapclient
chown snapclient /var/lib/snapclient

I also encountered this problem with exactly the same log, use @christf 's fix and it works.

Hello menghan and christf,

I have the same problem, what is the code you use to get this working?
i tried "sudo` chown -c snapsclient /var/lib/snapclient/"
But that does not work.
Can you please help me?
i am using version 0.11.1.
Thank you in advance

@atze09 sorry for the late response.

The fix command: mkdir /var/lib/snapclient; chown snapclient /var/lib/snapclient works for me as 0.11.1. Since snapcast has newer release, I think it best to try the latest release.
Fix commands working for 0.11.1 may not works for the latest.

Was this page helpful?
0 / 5 - 0 ratings