PDA

View Full Version : Problem stopping Slimserver



Dave Horoschak
2006-03-11, 17:49
Every time I try to stop Slimserver in Linux (.../slimserver stop), I'm
getting a FAILED message. I'd like to create a script that stops
Slimserver, starts Music Magic, and restarts Slimserver, but I can't do
this if I'm not able to reliably stop the server. None of the log files
seem to have any indications of a problem. This occurred with 6.2.1 and
with the 6.5b1 I just installed.

Any ideas?
- Dave

max.spicer
2006-03-12, 06:13
Are you running as root (or a similarly privileged user) when you try and stop it?

Max


Every time I try to stop Slimserver in Linux (.../slimserver stop), I'm
getting a FAILED message. I'd like to create a script that stops
Slimserver, starts Music Magic, and restarts Slimserver, but I can't do
this if I'm not able to reliably stop the server. None of the log files
seem to have any indications of a problem. This occurred with 6.2.1 and
with the 6.5b1 I just installed.

Any ideas?
- Dave

rudholm
2006-03-12, 08:37
Is there any reason you don't want to just kill the process?

Dave Horoschak
2006-03-12, 09:19
Yes - I am logged in as root.
- Dave

max.spicer wrote:
> Are you running as root (or a similarly privileged user) when you try
> and stop it?
>
> Max
>
> Dave Horoschak Wrote:
>
>> Every time I try to stop Slimserver in Linux (.../slimserver stop), I'm
>>
>> getting a FAILED message. I'd like to create a script that stops
>> Slimserver, starts Music Magic, and restarts Slimserver, but I can't do
>>
>> this if I'm not able to reliably stop the server. None of the log
>> files
>> seem to have any indications of a problem. This occurred with 6.2.1
>> and
>> with the 6.5b1 I just installed.
>>
>> Any ideas?
>> - Dave
>>
>
>
>

Dave Horoschak
2006-03-12, 09:21
Two reasons:

1. I'm trying to use this as a part of a script and I have no way of
knowing the PID ahead of time.

2. I wasn't sure if there were any other processes or cleanup that the
"server stop" executes that don't happen when you kill the process.
- Dave


rudholm wrote:
> Is there any reason you don't want to just kill the process?
>
>
>

max.spicer
2006-03-12, 09:42
'pkill slimserver' should probably do the job nicely, but you're right - it's best to use the init script. Does the init script work when you run it manually?

Max

PS You'll get a better response in the Linux/Unix forum.


Two reasons:

1. I'm trying to use this as a part of a script and I have no way of
knowing the PID ahead of time.

2. I wasn't sure if there were any other processes or cleanup that the
"server stop" executes that don't happen when you kill the process.
- Dave


rudholm wrote:
> Is there any reason you don't want to just kill the process?
>
>
>

rudholm
2006-03-13, 00:31
Two reasons:

1. I'm trying to use this as a part of a script and I have no way of
knowing the PID ahead of time.

2. I wasn't sure if there were any other processes or cleanup that the
"server stop" executes that don't happen when you kill the process.
- Dave


rudholm wrote:
> Is there any reason you don't want to just kill the process?
>
>
>

pkill should solve the problem of knowing the PID. I've never had any problems just killing the slimserver. (I just send it a standard TERM signal, not a KILL, so it *should* exit gracefully by doing whatever it needs to do before actually exiting). I've never used any init script to start or stop it (I never stop it except when I'm upgrading it).

Also, the best practice is to run slimserver as a non-privileged user. I've created a 'slim' user on my server for just this purpose.