Bugzilla – Bug 15523
Fedora & like OSs, SBS 7.4.1 and above: squeezeboxserver service cannot be stopped or restarted after a 'internal' restart
Last modified: 2011-11-16 22:05:14 UTC
After a normal squeezeboxserver service start, ps ax shows the process as: /usr/bin/perl -w /usr/libexec/squeezeboxserver --daemon ..etc. A 'service squeezeboxserver restart' succeeds. However, if one restarts the service 'internally', i.e. from the extension downloader or via a [restartserver] cli request, ps ax now shows the running process as: /usr/bin/perl /usr/libexec/squeezeboxserver --daemon ..etc. ..in other words, the "-w" parameter is now missing. Without the "-w", /etc/init.d/squeezeboxserver can't stop or restart the service, giving a "[FAILED]" error message.
Looking at the 7.5 embedded svn code, in server/slimserver.pl, line 1048: sub stopServer { my $restart = shift; logger('')->info( 'Squeezebox Server ' . ($restart ? 'restarting...' : 'shutting down.') ); $::stop = 1; cleanup(); if ($restart && Slim::Utils::OSDetect->getOS()->canRestartServer() && !main::ISWINDOWS) { exec($^X, $0, @argv); } exit(); } I'm not sure what effect adding a '-w' argument to that exec call would have on other OSs, e.g. OSX, etc. On the other hand, the /etc/init.d/squeezeboxserver script doesn't explicitly call 'perl -w', but rather 'daemon' which apparently defaults to 'perl -w' for any .pl script, so this can't really be fixed in the service script.
Duh. Look at the top of the file and think before you speak next time, Gordon.
I'm not linuxy enough to interpret your last comment, Gordon. Is the fix clear, or not needed?
I assume that Andy fixed this in the 'ssvn r29923 -- Don't run with -w warning flag' change, though I haven't tested this to see if it solves the problem. On the face of it, it ought to. I asked if svn 29923 was made in response to this bug, but never got an answer. See: http://forums.slimdevices.com/showthread.php?t=74552
Since you're the only one interested in this bug (apparently) I'll just leave it to you for now. :)
OK. I'll test and, if svn r29923 has fixed it, I'll close the bug.
Unassigned bugs cannot have a priority.
I don't know how long it will take for other rpm-based distros to transition to using systemd for service control, but with Fedora 15 (& 16) this bug's problem can be solved by using a service unit file, rather than a startup script. e.g. /lib/systemd/system/lms.service: ================================================================= [Unit] Description=Logitech Media Server Daemon After=local-fs.target network.target [Service] ExecStart=/usr/share/lms/server/slimserver.pl --daemon --pidfile=/run/lms.pid --user=lms --group=lms --prefsdir=/var/lib/lms/prefs --logdir=/var/log/lms --cachedir=/var/lib/lms/cache --charset=utf8 Type=simple PIDFile=/run/lms.pid RestartSec=5 Restart=on-failure [Install] WantedBy=multi-user.target Alias=logitechmediaserver =================================================================
bug 17729 has a good analysis of this issue *** This bug has been marked as a duplicate of bug 17729 ***