Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release? #481

Closed
gerroon opened this issue Oct 15, 2019 · 27 comments
Closed

New release? #481

gerroon opened this issue Oct 15, 2019 · 27 comments

Comments

@gerroon
Copy link

gerroon commented Oct 15, 2019

Hi

Are there plans for a new release soon?

thanks

@badaix
Copy link
Owner

badaix commented Oct 15, 2019

yes, within the next few days, I'm testing and cleaning up. Release notes will look something like that:

Version 0.16.0

Features

Bugfixes

General

  • Control server uses less threads (one in total, instead of 1+2n)
  • Snapserver: Configuration is moved into a file
  • Removed submodules "popl" and "aixlog" to ease build
  • Snapcast depends on boost::asio and boost::beast (header only)
  • Tidy up code base
  • Makefile doesn't statically link libgcc and libstdc++

@badaix
Copy link
Owner

badaix commented Oct 16, 2019

https://github.com/badaix/snapcast/releases/tag/v0.16.0
enjoy 🤘

@gerroon
Copy link
Author

gerroon commented Oct 16, 2019

@badaix

Thanks for the release but it is failing to start on Debian Testing 🚨

systemctl status snapserver.service                                                                                                              :(
● snapserver.service - Snapcast server
   Loaded: loaded (/lib/systemd/system/snapserver.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-10-16 18:13:37 CDT; 2s ago
     Docs: man:snapserver(1)
  Process: 30366 ExecStart=/usr/bin/snapserver $SNAPSERVER_OPTS (code=exited, status=1/FAILURE)
 Main PID: 30366 (code=exited, status=1/FAILURE)

Oct 16 18:13:37  systemd[1]: snapserver.service: Service RestartSec=100ms expired, scheduling restart.
Oct 16 18:13:37  systemd[1]: snapserver.service: Scheduled restart job, restart counter is at 5.
Oct 16 18:13:37  systemd[1]: Stopped Snapcast server.
Oct 16 18:13:37  systemd[1]: snapserver.service: Start request repeated too quickly.
Oct 16 18:13:37  systemd[1]: snapserver.service: Failed with result 'exit-code'.
Oct 16 18:13:37  systemd[1]: Failed to start Snapcast server.

@gerroon
Copy link
Author

gerroon commented Oct 16, 2019

I think there is an issue with the snapserver user but I cant figure it out.

@gerroon
Copy link
Author

gerroon commented Oct 16, 2019

Btw how does the web server feature work?

@badaix
Copy link
Owner

badaix commented Oct 17, 2019

I replaced my debian packaging scripts with the official debian ones. The official debian package is using the username and groupname "_snapserver" and "_snapclient". Maybe this is the problem.
On one of my test systems I had to purge the old installation sudo dpkg --purge snapserver. Can you try this?

@badaix
Copy link
Owner

badaix commented Oct 17, 2019

regarding the webserver: you can configure the doc_root in /etc/snapserver.conf to e.g. (there is a basic web UI interface.html in the snapcast source tree):

[http]
doc_root = /home/johannes/Develop/snapcast/server/etc

after restart sudo service snapserver restart you can open http:\\<IP of your server>:1780\interface.html in a browser.
For the web UI to work, you should put your snapserver's IP address in this line of interface.html:
var connection = new WebSocket('ws://127.0.0.1:1780/jsonrpc');

@derglaus
Copy link
Contributor

Minor optimization would be to change the line to

var connection = new WebSocket('ws://'+window.location.hostname+':1780/jsonrpc');

Great that you included Webserver and WebSocket :)

@badaix
Copy link
Owner

badaix commented Oct 17, 2019

Hi glause, sorry for not getting back to you, this is exactly the question I wanted to ask you :)
I'm thinking of how to optionally ship this UI with the installer, this is planned for the next release

@badaix
Copy link
Owner

badaix commented Oct 17, 2019

What's missing in the docs right now:
the websocket server can be fired with the really same json RPC commands as the telnet server (which is still built-in and will stay in future releases) at:
ws://<server host address>:1780/jsonrpc

You can also HTTP POST JSON RPC commands to the really same address (of course this is without push notifications):
http://<server host address>:1780/jsonrpc

the whole HTTP server can be enabled/disabled in /etc/snapserver.conf, also the port is configurable (default is 1780), as well as the doc_root and the listening address, which can be used to bind the servert to a specific network interface (also the loopback interface (127.0.0.1))

At the moment there is no TLS (HTTPS or WSS) available, this is planned for some later release.
Of course, it's not recommended to expose the HTTP server to the internet.

@mogwa1
Copy link
Contributor

mogwa1 commented Oct 17, 2019

Hi, thanks for the new release!
I'm the maintainer for the archlinux AUR package (https://aur.archlinux.org/packages/snapcast/).
I haven't yet looked into compiling the updated package, but looking through the recent commits I did notice that the system users and groups have changed to have a leading underscore (also mentioned earlier in this thread). Is there any particular reason for that?
This seems to clash with arch conventions, so I want to double check whether this is something to take on board or not ...
Thanks in advance!

@badaix
Copy link
Owner

badaix commented Oct 17, 2019

Hi @mogwa1
I don't know the reason for the leading underscores, they came in by copying the debian build scripts. Also I didn't find anything on Google, but just wrote the maintainer an email, asking for the reason.
In my Raspbian's passwd file there is one more user with underscore: _apt.
In general snapcast doesn't depend on specific users, but needs certain permissions, e.g. the client needs access to audio devices.

@mogwa1
Copy link
Contributor

mogwa1 commented Oct 17, 2019

Hi @badaix, I appreciate the quick answer! So it's not just me that couldn't find anything on these underscores. :-)

Ok, I'll sleep on it another night. I think I'm going to keep the current users (without underscores) for the time being.
Arch is using systemd-sysusers to create the system users, which AFAIK has no way of removing sysusers. They're supposed to be removed manually by the sysadmin when they're no longer needed. So, introducing new sysusers at this point in time would litter systems which already had a previous version installed.

Another thing: would it be a good idea to mention the arch AUR package in the README.md?

@rcmcronny
Copy link

I don't know the reason for the leading underscores, they came in by copying the debian build scripts. Also I didn't find anything on Google, but just wrote the maintainer an email, asking for the reason.
In my Raspbian's passwd file there is one more user with underscore: _apt.
In general snapcast doesn't depend on specific users, but needs certain permissions, e.g. the client needs access to audio devices.

I would like, to get back to the old user/group, as this update broke everything, because of the new user (and other stuff of course :) ) I am back to a 0.15 backup for now.
I use MPDwith Pulse and some legacy fifos, the fifos were working after i fixed the config, streams, but the pulse targets not.

@Schluggi
Copy link

@badaix

Thanks for the release but it is failing to start on Debian Testing rotating_light

systemctl status snapserver.service                                                                                                              :(
● snapserver.service - Snapcast server
   Loaded: loaded (/lib/systemd/system/snapserver.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-10-16 18:13:37 CDT; 2s ago
     Docs: man:snapserver(1)
  Process: 30366 ExecStart=/usr/bin/snapserver $SNAPSERVER_OPTS (code=exited, status=1/FAILURE)
 Main PID: 30366 (code=exited, status=1/FAILURE)

Oct 16 18:13:37  systemd[1]: snapserver.service: Service RestartSec=100ms expired, scheduling restart.
Oct 16 18:13:37  systemd[1]: snapserver.service: Scheduled restart job, restart counter is at 5.
Oct 16 18:13:37  systemd[1]: Stopped Snapcast server.
Oct 16 18:13:37  systemd[1]: snapserver.service: Start request repeated too quickly.
Oct 16 18:13:37  systemd[1]: snapserver.service: Failed with result 'exit-code'.
Oct 16 18:13:37  systemd[1]: Failed to start Snapcast server.

I fall into the same issue but i've fixed it.
By running sudo -u _snapserver /usr/bin/snapserver i notice a permission error to /var/lib/snapserver/server.json. The owner was numeric. This means my system has no user found for that user id. Maybe a mistake by building the package. After running chown _snapserver:_snapserver /var/lib/snapserver/server.json the service starts running.

So the service works fine, but my Spotify couldn't find my librespot device. After switching to the new config format this was fixed too.

I hope this help!

@badaix
Copy link
Owner

badaix commented Oct 23, 2019

I don't get an answer yet from the debian package maintainer. I'm thinking about to remove the underscores from the user names/group names. In a new installation the underscore will not harm, but it's causing problems when updating an older version (w/o underscores). On the other hand, this is in line with the official debian package, and will make updates from the official to a more recent unofficial release easier.

@badaix
Copy link
Owner

badaix commented Oct 23, 2019

@mogwa1

Another thing: would it be a good idea to mention the arch AUR package in the README.md?

yes, of course, it's a good idea to point Arch users to the official packages, as they are much more compatible, convenient and auto updated compared to make install installations.
I'm actually proud about the fact that there are official packages for some of the big Linux distros available.

@mogwa1
Copy link
Contributor

mogwa1 commented Oct 25, 2019

I've created pull request #491 to update the documentation to mention the Arch package.

@badaix
Copy link
Owner

badaix commented Oct 25, 2019

thanks @mogwa1 it's already merged

@badaix
Copy link
Owner

badaix commented Oct 25, 2019

regarding the underscores: Felix, the debian package maintainer, said that the underscores are prepended to the user name to avoid conflicts with existing user names (unlikely, but not impossible)

@mariolukas
Copy link
Contributor

mariolukas commented Nov 27, 2019

What's missing in the docs right now:
the websocket server can be fired with the really same json RPC commands as the telnet server (which is still built-in and will stay in future releases) at:
ws://<server host address>:1780/jsonrpc

You can also HTTP POST JSON RPC commands to the really same address (of course this is without push notifications):
http://<server host address>:1780/jsonrpc

the whole HTTP server can be enabled/disabled in /etc/snapserver.conf, also the port is configurable (default is 1780), as well as the doc_root and the listening address, which can be used to bind the servert to a specific network interface (also the loopback interface (127.0.0.1))

At the moment there is no TLS (HTTPS or WSS) available, this is planned for some later release.
Of course, it's not recommended to expose the HTTP server to the internet.

Just testet the websoket interface. Thank you so much for introducing websockets and http server support. It makes the hydraplay setup less complex!

@rcmcronny
Copy link

I use since some days the debian package for 0.17.1 (on ubuntu 18.04) and this works very good.
The user change back to the old one (without "_") was really good. THANK YOU !

I really appreciate the progress of this !

@badaix
Copy link
Owner

badaix commented Nov 27, 2019

@mariolukas good to hear :) see you at the dorkbot ;)

@zsamiatt
Copy link

zsamiatt commented Mar 19, 2021

Hello,

I tried install the latest snapserver (0.24.0) to debian 10 today.
If I write to command snapserver, the snapserver runing.
If I try runing in backgroud the snapserver can not runing. I see the log permission error to server.json.

I try change: full permission, _snapserver, snapserver, root user and group. I see in debian that this two user and group valid.

The debian 0.15.0 package working correctly.

@badaix
Copy link
Owner

badaix commented Mar 19, 2021

@zsamiatt try apt purge snapserver to remove everything and then install again.
There is no more the underscore user.

@zsamiatt
Copy link

@zsamiatt try apt purge snapserver to remove everything and then install again.
There is no more the underscore user.

You are genius :) Its work. Thx!

@badaix
Copy link
Owner

badaix commented Mar 19, 2021

Yep, I know ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants