Skip to content

snapclient started via wrapper constantly restart when snapcast webserver is disabled #6

Description

@fauust

Hi!

My understanding is that snapcastmpris restart the snapcast client every 5 seconds if it is not able to join the snapcast webserver. I am not sure this is wanted but it should be documented if so IMO.

Client log given by journalctl command:

Jul 02 16:53:54 hifiberry python3[1611]: requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.102', port=1780): Max retries exceeded with url: /jsonrpc (Caused by NewConnectionError('<urllib3.c
Jul 02 16:53:54 hifiberry systemd[1]: snapcastmpris.service: Main process exited, code=exited, status=1/FAILURE
Jul 02 16:53:54 hifiberry mpris-proxy[303]: Message recipient disconnected from message bus without replying
Jul 02 16:53:54 hifiberry python3[334]: ERROR: proxies - Introspect error on :1.86:/org/mpris/MediaPlayer2: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from m
Jul 02 16:53:54 hifiberry python3[334]: WARNING: mpris - got exception org.freedesktop.DBus.Error.ServiceUnknown: The name :1.86 was not provided by any .service files while polling MPRIS data
Jul 02 16:53:54 hifiberry python3[334]: INFO: controller - Got no state from org.mpris.MediaPlayer2.snapcast
Jul 02 16:53:54 hifiberry python3[334]: WARNING: controller - snapcast failed, trying to restart
Jul 02 16:53:54 hifiberry python3[334]: WARNING: watchdog - don't know how to restart snapcast
Jul 02 16:53:54 hifiberry systemd[1]: snapcastmpris.service: Failed with result 'exit-code'.

Server log (in syslog):

Jul  2 14:54:36 pi2 snapserver[1691]: StreamServer::NewConnection: 192.168.1.101
Jul  2 14:54:36 pi2 snapserver[1691]: Hello from b8:27:eb:de:79:8b, host: hifiberry, v0.22.0, ClientName: Snapclient, OS: Buildroot 2020.11, Arch: armv7l, Protocol version: 2
Jul  2 14:54:38 pi2 snapserver[1691]: Error reading message header of length 0: End of file
Jul  2 14:54:38 pi2 snapserver[1691]: onDisconnect: b8:27:eb:de:79:8b

There is no problem if you start the client from CLI with something like:

snapclient -e -h 192.168.1.102 -p 1704

Workaround:

  • either configure the snapcast server to enable the http webserver;
  • or start the snapcast client with something like snapclient -e -h 192.168.1.102 -p 1704 -d (or better creating a systemd service for next reboot).

Great project BTW!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions