devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 189 forks source link

Service Start Failures #709

Closed yorkadam closed 6 years ago

yorkadam commented 6 years ago

I wanted to report a couple of items that I found which caused cherrymusic (0.39.1) to fail to start. I'm using Debian 8 Jessie on an old Dell XPS 420.

I have a systemd unit setup to run cherrymusic on boot and one day I noticed cherry music was not running. The issue here was because of another unit failed (before cherry music unit load) as I forgot to remove the unit after a software un-install unrelated to cherrymusic. Once I removed the broken unit and rebooted the cherrymusic unit started at boot as expected.

Then the service was not working again for some reason and cherrymusic would not start. The systemd unit for cherrymusic was failing. This time it was because cherrymusic was not starting. When I tried to start cherrymusic from the command line i received a message that said "a pid exists.... try to delete pid file .... and restart" I deleted the temporary pid file which had only 1 line "411" written in it. I noticed the log files were large so I emptied them. After deleting the pid file and emptying the log files the systemd unit correctly restarted cherrymusic at boot time.

I am not reporting this as a bug(s) with cherrymuisic but rather as a couple of conditions that may cause startup of cherry music service to fail in hope someone having similar issue finds this useful.

As for the invalid pid file I'm not quite sure how that happened but I'm guessing a system update / upgrade orphaned the file. I plan on updating to the latest version of cherry music when I have more time.

Cherry Music is by far the best in it's class that I have ever tried. Thanks for a great application!

tilboerner commented 6 years ago

When I tried to start cherrymusic from the command line i received a message that said "a pid exists.... try to delete pid file .... and restart" I deleted the temporary pid file

Good call. :) When the cherrymusic process is stopped (or the system shuts down) before it can clean up after itself, the pid file will survive and prevent the server from starting again.

By the way, if you have cherrymusic set up as a systemd unit, you can also diagnose issues with either

$ systemctl status <UNIT>
$ journalctl -u <UNIT>

<UNIT> is whatever your cherrymusic unit is named, and you can try to start typing cherrymusic and see what autocomplete gives you.

I'm closing the issue to keep things tidy; other people will still be able to find it through search.