If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex Tuner Service is not stopping, preventing shut down of Plex service

zofrexzofrex Posts: 5Members, Plex Pass Plex Pass

Description

When I try to stop the plex service, it (rc.d) hangs indefinitely waiting for Plex Tuner Service to close. PTS is unresponsive to kill, and I have to kill -9 it to shut it down.

Version

I'm running plexmediaserver-1.5.7.4016 on FreeBSD-10.3-p19. I'm seeing the same behaviour on all 4 of my servers so hopefully this is easy to reproduce, but if not let me know and I'll try out different combinations!

By the way, I've been seeing it for a few versions of Plex now. I think it's been happening ever since Plex Tuner Service was introduced, but I'm not certain.

Steps to reproduce

When plex is started, run:

sudo service plexmediaserver stop

Check there are no plex processes left running, e.g. ps aux | grep -i plex

Expected

Plex shuts down and no plex processes are running.

Actual

The service command hangs indefinitely waiting for plex processes to shut down:

$ sudo service plexmediaserver stop
Stopping plexmediaserver.
Waiting for PIDS: 5892.
Cleaning up leftover child processes.
Waiting for PIDS: 5918 5917 5916 5896

If I kill it and check for processes, I see the Plex Tuner Service:

$ ps aux | grep -i plex | less
plex          5917   0.0  0.1 90552 6560  -  I    Sun12AM      0:06.31 /usr/local/share/plexmediaserver/Plex Tuner Service /usr/local/share/plexmediaserver/Resources/Tuner/Private /usr/local/share/plexmediaserver/Resources/Tuner/Shared 1.5.7.4016-25d94bad9 32600 /waitmutex

sudo kill 5917 doesn't help, it goes away with sudo kill -9 5917

Answers

  • sae24sae24 Posts: 5Members, Plex Pass Plex Pass

    Thank U, I have the save situation when trying to restart. I'm using plexmediaserver-1.7.5.4035 from ports. May be it will be fixed soon?

  • ManicheeManichee Posts: 1Members, Plex Pass Plex Pass

    I have had this same issue ever since the Tuner service was added. I wish there was a way to completely disable the service as I do not have a tuner nor do I plan on buying one anytime soon.

  • ironcatironcat Posts: 8Members, Plex Pass Plex Pass
  • zofrexzofrex Posts: 5Members, Plex Pass Plex Pass

    This isn't quite the same as disabling it, although I suppose that would probably also fix that problem. The process appears to be completely locked up, as it won't respond to a polite request to quit, so presumably it wouldn't work for people who do want it on this system configuration either?

  • Roedy86Roedy86 Posts: 18Members, Plex Pass Plex Pass

    I have the exact same issue. I created a script to check for a new version of plex. If a new version is available and no one is streaming from plex, the script goes ahead and download the new version and shutdown plex before updating to the new version and starting plex again. Sadly every time its stuck trying to shutdown the tuner service and I have to connect to the server an kill it with kill -9.

  • rspeedrspeed Posts: 4Members ✭✭

    Same here. The issue is still present in version 1.8.1.4139.

  • havoc70havoc70 Posts: 2Members, Plex Pass Plex Pass
    edited September 22

    It's been doing it since introduction of the useless tuner service. I don't have a tuner, I don't want the service. I wrote a wrapper script to kill Plex.

    #!/usr/local/bin/bash
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
    ps $(cat /var/run/plex/plex.pid) &>/dev/null || { echo "Plex does not appear to be running";exit; }
    echo "Applying the hammer to Plex"
    bash -c 'sudo nohup /usr/local/etc/rc.d/plexmediaserver_plexpass stop &>/dev/null &'
    sleep 5
    sudo pkill -9 -f .*Tuner.*
    
  • ghostcorpsghostcorps Posts: 30Members, Plex Pass Plex Pass

    @zofrex said:
    This isn't quite the same as disabling it, although I suppose that would probably also fix that problem. The process appears to be completely locked up, as it won't respond to a polite request to quit, so presumably it wouldn't work for people who do want it on this system configuration either?

    Until today, I was in the situation of not using the tuner so didn't worry about having to kill a few process every one in a while but, now I can confirm that it does lock up the tuner.

    Version 1.9.2.4285

    Thanks to the OP for saving me the trouble to writing this up as I would love to actually get the tuner fixed now that I have paid the $s to the Plexpass and a tuner... any news or hopes on this front?

    Does anyone have the Tuner working in FreeBSD? I am currently on 10.3.

  • fschulzefschulze Posts: 6Members, Plex Pass Plex Pass

    Same issue here

Sign In or Register to comment.