Bug 6924 - Cannot stop or restart squeezecenter service
: Cannot stop or restart squeezecenter service
Status: CLOSED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.0
: PC RedHat Linux
: P5 normal (vote)
: ---
Assigned To: Mark Miksis
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-03 09:10 UTC by Peter
Modified: 2009-09-08 09:24 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Patch to squeezecenter init file (844 bytes, patch)
2008-02-04 09:45 UTC, Mark Miksis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2008-02-03 09:10:44 UTC
Possibly because there's no /var/run/squeezecenter-server.pid file being made.
OS is actually Fedora Core 4

[root@alastor init.d]# /etc/init.d/squeezecenter stop
Stopping SqueezeCenter:                                    [FAILED]

Version: squeezecenter-7.0-0.2.17126.noarch.rpm
Comment 1 Mark Miksis 2008-02-03 09:31:54 UTC
The SC RPM has only been tested with currently supported Linux distros.  FC4 went EOL sometime in 2006 (I think).  However, CentOS 4 works and is based on FC3 so I wouldn't expect any problems with FC4.

When you try to stop SC as you describe, can you verify that it is still running?  I wondering if it is getting stopped properly but the [FAILED] message is wrong.

What's happens if you try to stop SC with the following 3 commands:

# source /etc/init.d/functions 
# killproc /usr/libexec/squeezecenter-server 
# echo $?   
Comment 2 Peter 2008-02-03 11:16:48 UTC
I verified it's running.

The output of your commands:

[root@alastor Wire]# source /etc/init.d/functions
[root@alastor Wire]# killproc /usr/libexec/squeezecenter-server
[1] 4325                                                   [FAILED]
[1]+  Exit 1                  [ -w /var/gdm/.gdmfifo ] && echo "BOOTUP_ERRORS" >/var/gdm/.gdmfifo
[root@alastor Wire]# echo $?
0
Comment 3 Mark Miksis 2008-02-03 11:57:49 UTC
Hrm.  That GDM error looks unrelated.

Someone from SD, feel free to assign this to me and I'll look into it during the week.  But if it's not something simple, it's probably not worth spending much time on such an old version of Fedora.
Comment 4 Blackketter Dean 2008-02-03 11:59:28 UTC
Thanks, Fletch.

We should document somewhere what OS versions we support for the RPM and deb packages.
Comment 5 Peter 2008-02-03 12:03:39 UTC
Fair enough, perhaps I got my installation messed up.
That gdm thing is strange.
Thanks.
Comment 6 Mark Miksis 2008-02-03 12:19:15 UTC
Peter,

AFAIK, one of the reasons for the "service" command in RH is to make sure the init script is run in a predictable environment.  Can you see if you get the same results with:

# /sbin/service squeezecenter stop
(or restart)

Dean,

There is already a mention of which distros were tested at http://wiki.slimdevices.com/index.cgi?SqueezeCenterRPM.  
Comment 7 Peter 2008-02-03 12:34:32 UTC
[root@alastor landen]# /sbin/service squeezecenter stop
Stopping SqueezeCenter:                                    [FAILED]
[root@alastor landen]# /sbin/service squeezecenter restart
Stopping SqueezeCenter:                                    [FAILED]
Starting SqueezeCenter:

No difference. The restart hangs, presumably because the stopping failed.


Comment 8 Peter 2008-02-03 23:50:24 UTC
I downloaded an FC4 and an FC5 vmware image from http://www.thoughtpolice.co.uk/vmware/
The 'service squeezecenter stop' command works fine on the FC5 image.
It fails on the fresh FC4 image in the same way it fails on mine.

So there seems to be a genuine problem on FC4, but it probably works fine on anything more recent. Only people with 'real ol' fedora's will run into this.
Comment 9 Blackketter Dean 2008-02-04 07:20:01 UTC
Is it unreasonable to set FC5 as the last supported release?

Comment 10 Mark Miksis 2008-02-04 07:35:59 UTC
OK, I see this.  Sheesh, it seems like every version of RH and Fedora have slight changes to the killproc function that might break something.  Anyway...

Peter,

I think this should work for FC4 by just changing the stop script to use killall instead of killproc.  Try making this change to the init script:

--- squeezecenter.orig  2008-02-04 07:19:00.000000000 -0800
+++ squeezecenter       2008-02-04 07:19:00.000000000 -0800
@@ -65,20 +65,10 @@
 
        stop() {
                echo -n "Stopping SqueezeCenter: "
-               # Support old versions of RHEL and still fix bug 5620
-               KILLPROC_ARGS=""
-               if [ `grep -c 'Usage: killproc.*-d delay' /etc/init.d/functions` -ge 1 ]; then
-                       KILLPROC_ARGS="-d 6"
-               fi
-               killproc $KILLPROC_ARGS $SQUEEZECENTER_BIN
-               RETVAL=$?
-                if [ $RETVAL -ne 0 ]; then
-                        # If killproc fails, try killall (fix for RHEL4)
                         killall squeezecenter-server
                         RETVAL=$?
                         [ $RETVAL -eq 0 ] && echo_success
                         [ $RETVAL -ne 0 ] && echo_failure
-                fi
                echo
                [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
                return $RETVAL



Dean,

killproc is still more reliable and the preferred RH way to do things.  I could probably add some conditional logic, but I'd rather not add yet another kludge to an already messy script.  My recommendation is to close as WONTFIX.  Anyone using an obsolete version of Fedora can manually apply the above patch.

(In reply to comment #9)
> Is it unreasonable to set FC5 as the last supported release?
> 

I see no reason to even go that far.  F7 and F8 are the only versions that are officially maintained by the Fedora project and are the only versions I tested with.  I'll still try to fix obvious problems with older versions, but "supported" is up to you...
Comment 11 Peter 2008-02-04 07:48:05 UTC
Hi Fletch,

Patch fails for me:

[root@alastor init.d]# patch < /shared/x
(Stripping trailing CRs from patch.)
patching file squeezecenter
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file squeezecenter.rej

Dean,

Doesn't sound unreasonable to me.
I'll probably switch to CentOS in the future, they support their OS a lot longer.
It's not a big problem on FC4, everything works except this and a manual killall is easy.
It did work on SS 6.5, though...
Comment 12 Peter 2008-02-04 07:51:43 UTC
I just manually commented out the if/fi lines and now it seems to work: 

                #if [ $RETVAL -ne 0 ]; then
                        # If killproc fails, try killall (fix for RHEL4)
                        killall squeezecenter-server
                        RETVAL=$?
                        [ $RETVAL -eq 0 ] && echo_success
                        [ $RETVAL -ne 0 ] && echo_failure
                #fi

Could've thought of this myself, I guess.

Comment 13 Mark Miksis 2008-02-04 09:45:29 UTC
Created attachment 2813 [details]
Patch to squeezecenter init file

The patch probably failed due to line wrapping in the cut/paste.  Here it is as an attachment.
Comment 14 Peter 2008-02-04 09:50:22 UTC
Yep, that worked as well.
Thanks!
Comment 15 Blackketter Dean 2008-02-05 09:18:15 UTC
Fletch: can you commit your change?
Comment 16 Mark Miksis 2008-02-05 11:56:20 UTC
(In reply to comment #15)
> Fletch: can you commit your change?
> 

Sorry I wasn't clear.  IMO, this is a usable fix for FC4, but the existing stop script is still better for F7, F8, RHEL4 and RHEL5.  I still prefer to leave as-is and mark as WONTFIX.
Comment 17 Chris Owens 2008-03-07 09:04:12 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.