freenas / iocage-plugin-plexmediaserver

Artifact file(s) for PlexMediaServer iocage plugin
1 stars 5 forks source link

`service` reports "plexmediaserver is not running" during normal operation #4

Open dhharris opened 2 years ago

dhharris commented 2 years ago

Found an interesting issue when updating my plex jail.

Service is reported to b e down

[root@plex ~]# service plexmediaserver status
plexmediaserver is not running.

However, plex is running perfectly fine (can watch videos, etc).

ps shows the processes running

[root@plex ~]# ps -A | grep -i plex
56477  -  IsJ  0:00.00 daemon: /usr/local/share/plexmediaserver/Plex_Media_Server
56478  -  IJ   0:00.87 /usr/local/share/plexmediaserver/Plex_Media_Server (Plex M
56479  -  INJ  0:01.45 Plex Plug-in [com.plexapp.system] /usr/local/share/plexmed
56484  -  SJ   0:00.09 /usr/local/share/plexmediaserver/Plex Tuner Service /usr/l
56485  -  IJ   0:01.26 Plex Plug-in [com.plexapp.agents.imdb] /usr/local/share/pl
56619  1  S+J  0:00.00 grep -i plex

The pidfile specified in the rc script is also correct, and shows the pid of the daemon process.

/usr/local/etc/rc.d/plexmediaserver
---
pidfile=/var/run/plex/plex-daemon.pid
[root@plex ~]# ps $(cat /var/run/plex/plex-daemon.pid)
  PID TT  STAT    TIME COMMAND
56477  -  IsJ  0:00.00 daemon: /usr/local/share/plexmediaserver/Plex_Media_Server

This brings the question - why does service plexmediaserver status think that it is not running? start, stop and restart subcommands work fine. This issue doesn't hurt the usability of plex, but it's still a weird bug that should probably be investigated.