Plex plugin works but won't start

Status
Not open for further replies.

ric

Contributor
Joined
Dec 22, 2013
Messages
180
I had a very similar issue where my plex server was running perfectly, but i couldn't stop the service. I would also get "plexmediaserver not running? (check /var/run/plex/plex.pid)." It also showed in the freenas GUI as being turned off even though everything was working fine.

I remember messing with permissions a few days ago by making plex run as media:media. I forgot that might mess things up. So to fix the problem, I just needed to change the permissions on the plex directory: "chown -R media:media /var/run/plex". I also changed the owner of the fcgi file too. Once i did that, I stopped the jail and turned it back on and now everything is working normally. My freenas GUI says its turned on and now I can stop and start the service via putty.

I hope it helps someone who is google searching.

in: /var/run/
old:
drwxr-xr-x 2 plex wheel 2 Dec 10 09:14 plex
-rw-rw-rw- 1 root wheel 5 Dec 10 09:14 plexmediaserver_fcgi_server.pid

new:
drwxr-xr-x 2 media media 2 Dec 10 09:14 plex
-rw-rw-rw- 1 media media 5 Dec 10 09:14 plexmediaserver_fcgi_server.pid

I have same exact problem here, my plexmediaserver won't start (I'm getting "some error occurred" when starting the mediaserver)
The following command didn't work for me either..
"chown -R media:media /var/run/plex".
"chown -R media:media /var/run/plexmediaserver_fcgi_server.pid".
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I have same exact problem here, my plexmediaserver won't start (I'm getting "some error occurred" when starting the mediaserver)
The following command didn't work for me either..
"chown -R media:media /var/run/plex".
"chown -R media:media /var/run/plexmediaserver_fcgi_server.pid".
you initial issue was probably networking issues between the FreeNAS webui and the plugin. you should have debugged by trying to ping your computer from the jail, and running 'service plexmediaserver onestart' before changing permissions.

that first command you ran should only be done if you changed the user the plugin runs as to 'media'
the second command should never be run, as the fcgi process is run by root and will never have permission issues.

I suggested you do the following
Code:
chown -R plex:plex /var/run/plex
sysrc plexmediaserver_enable=YES
service plexmediaserver start
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
you initial issue was probably networking issues between the FreeNAS webui and the plugin. you should have debugged by trying to ping your computer from the jail, and running 'service plexmediaserver onestart' before changing permissions.

that first command you ran should only be done if you changed the user the plugin runs as to 'media'
the second command should never be run, as the fcgi process is run by root and will never have permission issues.

I suggested you do the following
Code:
chown -R plex:plex /var/run/plex
sysrc plexmediaserver_enable=YES
service plexmediaserver start

plex_error_wont_start.png
Also, if I tried to change the permission of below files with same user and group permission (root:ric) on destination folder (mymedia), it says "illegal group name".
plex
plexmediaserver_fcgi_server.pid
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

ric

Contributor
Joined
Dec 22, 2013
Messages
180
I've reviewed
Reverted back permission of below file as instructed:
"chown -R root:wheel /var/run/plexmediaserver_fcgi_server.pid".

ran the following command:
chown -R plex:plex /var/run/plex
sysrc plexmediaserver_enable=YES
service plexmediaserver start

Plexmediaserver still won't start.
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
I've reviewed
Reverted back permission of below file as instructed:
"chown -R root:wheel /var/run/plexmediaserver_fcgi_server.pid".

ran the following command:
chown -R plex:plex /var/run/plex
sysrc plexmediaserver_enable=YES
service plexmediaserver start

Plexmediaserver still won't start.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I've reviewed
Reverted back permission of below file as instructed:
"chown -R root:wheel /var/run/plexmediaserver_fcgi_server.pid".

ran the following command:
chown -R plex:plex /var/run/plex
sysrc plexmediaserver_enable=YES
service plexmediaserver start

Plexmediaserver still won't start.
what was the output of 'service plexmediaserver start' ?
how about 'service plexmediaserver onestatus' ?
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
[root@freenas] ~# jls
JID IP Address Hostname Path
1 - VBOX /mnt/tank/VBOX
2 - btsync_1 /mnt/tank/btsync_1
3 - couchpotato_1 /mnt/tank/couchpotato_1
4 - customplugin_1 /mnt/tank/customplugin_1 <==== Plexmediaserver
5 - htpc-manager_1 /mnt/tank/htpc-manager_1
6 - nextcloud_1 /mnt/tank/nextcloud_1
7 - owncloud_1 /mnt/tank/owncloud_1
8 - syncthing_1 /mnt/tank/syncthing_1
9 - transmission_1 /mnt/tank/transmission_1
[root@freenas] ~# jexec 4 tcsh

root@customplugin_1:/ # service plexmediaserver start
Starting plexmediaserver.
root@customplugin_1:/ # service plexmediaserver onestatus
plexmediaserver is not running.
root@customplugin_1:/ #
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
[root@freenas] ~# jls
JID IP Address Hostname Path
1 - VBOX /mnt/tank/VBOX
2 - btsync_1 /mnt/tank/btsync_1
3 - couchpotato_1 /mnt/tank/couchpotato_1
4 - customplugin_1 /mnt/tank/customplugin_1 <==== Plexmediaserver
5 - htpc-manager_1 /mnt/tank/htpc-manager_1
6 - nextcloud_1 /mnt/tank/nextcloud_1
7 - owncloud_1 /mnt/tank/owncloud_1
8 - syncthing_1 /mnt/tank/syncthing_1
9 - transmission_1 /mnt/tank/transmission_1
[root@freenas] ~# jexec 4 tcsh

root@customplugin_1:/ # service plexmediaserver start
Starting plexmediaserver.
root@customplugin_1:/ # service plexmediaserver onestatus
plexmediaserver is not running.
root@customplugin_1:/ #
can you delete your plex data-directory (in case you messed with the permissions of that too), then try it again
'rm -r /var/db/plexmediaserver
service plexmediaserver start'
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
I was able to the start the plugin (plexmediaserver) using "service plexmediaserver start", however it doesn't seem to be available at left menu on freenas gui including Transmission plugin. I even tried restarting my freenas system just to make sure but same results.
 

Attachments

  • Plex_Error_freenas.png
    Plex_Error_freenas.png
    102.2 KB · Views: 379
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
since the icon is showing on that page, I'm thinking the fcgi connection is somewhat working. I suggest reloading your browser page.
if that still doesn't work, what I personally always do is disable VIMAGE, assign a network interface to the jail, and restart the jail.
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
After disabling VIMAGE in the Jail config, and assigned NIC to Jail, Plex finally show up however it doesn't find a way to connect online and plex was able to go outside (WAN) via icmp .
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
After disabling VIMAGE in the Jail config, and assigned NIC to Jail, Plex finally show up however it doesn't find a way to connect online and plex was able to go outside (WAN).
from the jail can you ping 8.8.8.8 or google.com

maybe the default gateway or DNS isnt setup
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
Like I said earlier it can go outside my lan. Google.com or 8.8.8.8 is pingable from jail.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
if the jail can connect out, I'm not sure why plex can't. I'm not very experienced with plex as I don't use it.
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
Plex plugin is now able to connect out after system restarted a few attempts. However, I have the same issues on the rest of other plugins which is it wont start.

Thanks!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Plex plugin is now able to connect out after system restarted a few attempts. However, I have the same issues on the rest of other plugins which is it wont start.

Thanks!
you could try disabling VIMAGE, setting network interface, and restarting on their jails. then try enabling on the plugins tab.

the way communicating between the FreeNAS webui and the plugins can be flaky, and in my experience VIMAGE makes things worse.
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
Disabled VIMAGE, still wont start on either way with plugins tab or command line. See below error message.

root@owncloud_1:/ # service owncloud onestart
owncloud does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Disabled VIMAGE, still wont start on either way with plugins tab or command line. See below error message.

root@owncloud_1:/ # service owncloud onestart
owncloud does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)
the service name in that case is actually "apache24"
 
Status
Not open for further replies.
Top