Plex fails to start up.

Status
Not open for further replies.

Magnus Svensson

Dabbler
Joined
Apr 5, 2016
Messages
33
Hiya.

My hardware :
Build FreeNAS-9.3-STABLE-201602031011
Platform Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
Memory 16270MB
I dont remember the motherboard, but its an Asus 1155 socket. Memory are DDR3 ECC.

Ive been runing freenas for a month now and really love it.
Ran ubuntu for over 1 year but my friends talked me over to join freenas and I love it.

But Im getting really annoyed on Plex now. Every time I have to restart it I have to reinstall it and create a new database.
So I moved the database to my backup drive. A lonly 1.5T drive for my mobile photos and Pled DB.
I only made : cp -R /var/db/plexdata /Media/Backup/plexdata

I install Plex plugin, add the Media share and then plexdata to /var/db/plexdata
Then when I try to start Plex it just dont want to start.checking in

Code:
root@plexmediaserver_1:/var/log # service plexmediaserver onestart
Starting plexmediaserver.
su: pam_start: system error
/usr/local/etc/rc.d/plexmediaserver: WARNING: failed to start plexmediaserver
root@plexmediaserver_1:/var/log # service plexmediaserver start
Starting plexmediaserver.
su: pam_start: system error
/usr/local/etc/rc.d/plexmediaserver: WARNING: failed to start plexmediaserver


checking in /var/log/messages gives me the following information :

Code:
Apr  5 20:53:31 plexmediaserver_1 su: in openpam_check_desc_owner_perms(): /etc/pam.d/su: insecure ownership or permissions
Apr  5 20:53:31 plexmediaserver_1 su: pam_start: system error
Apr  5 20:53:31 plexmediaserver_1 root: /usr/local/etc/rc.d/plexmediaserver: WARNING: failed to start plexmediaserver
Apr  5 20:55:00 plexmediaserver_1 cron[80429]: _secure_path: /etc/login.conf is world writable
Apr  5 20:55:00 plexmediaserver_1 cron[80429]: login_getclass: unknown class 'daemon'
Apr  5 20:55:00 plexmediaserver_1 cron[80429]: _secure_path: /etc/login.conf is world writable
Apr  5 20:57:16 plexmediaserver_1 su: in openpam_check_desc_owner_perms(): /usr/lib/pam_rootok.so.5: insecure ownership or permissions
Apr  5 20:57:16 plexmediaserver_1 su: in try_module(): /usr/lib/pam_rootok.so.5: Operation not permitted
Apr  5 20:57:16 plexmediaserver_1 su: in openpam_load_module(): no pam_rootok.so found
Apr  5 20:57:16 plexmediaserver_1 su: pam_start: system error
Apr  5 20:57:16 plexmediaserver_1 root: /usr/local/etc/rc.d/plexmediaserver: WARNING: failed to start plexmediaserver
Apr  5 20:58:01 plexmediaserver_1 su: in openpam_check_desc_owner_perms(): /etc/pam.d/su: insecure ownership or permissions
Apr  5 20:58:01 plexmediaserver_1 su: pam_start: system error
Apr  5 20:58:01 plexmediaserver_1 root: /usr/local/etc/rc.d/plexmediaserver: WARNING: failed to start plexmediaserver


ll /etc/pam.d/
Code:
root@plexmediaserver_1:/var/log # ll /etc/pam.d/
total 77
-rwxrwxrwx  1 root  wheel  2907 Jul 11  2014 README*
-rwxrwxrwx  1 root  wheel   318 Jul 11  2014 atrun*
-rwxrwxrwx  1 root  wheel   195 Jul 11  2014 cron*
-rwxrwxrwx  2 root  wheel   527 Jul 11  2014 ftp*
-rwxrwxrwx  2 root  wheel   527 Jul 11  2014 ftpd*
-rwxrwxrwx  1 root  wheel   361 Jul 11  2014 imap*
-rwxrwxrwx  1 root  wheel   473 Jul 11  2014 kde*
-rwxrwxrwx  1 root  wheel   369 Jul 11  2014 login*
-rwxrwxrwx  1 root  wheel   667 Jul 11  2014 other*
-rwxrwxrwx  1 root  wheel   314 Jul 11  2014 passwd*
-rwxrwxrwx  1 root  wheel   361 Jul 11  2014 pop3*
-rwxrwxrwx  1 root  wheel   324 Jul 11  2014 rsh*
-rwxrwxrwx  1 root  wheel   744 Jul 11  2014 sshd*
-rwxrwxrwx  1 root  wheel   380 Jul 11  2014 su*
-rwxrwxrwx  1 root  wheel   710 Jul 11  2014 system*
-rwxrwxrwx  1 root  wheel   760 Jul 11  2014 telnetd*
-rwxrwxrwx  1 root  wheel   525 Jul 11  2014 xdm*


**Edit added the plexdata lising.
This is inside the plexdata :
Code:
root@plexmediaserver_1:/var/db/plexdata/Plex Media Server # ll
total 33
drwxrwxrwx  5 root  wheel    9 Apr  4 18:39 Cache/
drwxrwxrwx  3 root  wheel   23 Apr  5 18:46 Logs/
drwxrwxrwx  3 root  wheel    3 Mar 18 23:23 Media/
drwxrwxrwx  4 root  wheel    4 Mar 19 00:44 Metadata/
drwxrwxrwx  7 root  wheel    7 Mar 18 23:13 Plug-in Support/
drwxrwxrwx  3 root  wheel    3 Mar 18 23:15 Plug-ins/
-rw-------  1 plex  wheel  983 Apr  5 20:58 Preferences.xml
drwxrwxrwx  2 root  wheel    2 Mar 18 23:20 Scanners/
drwxrwxrwx  3 root  wheel    3 Mar 18 23:13 Thumbnails/


It looks to be a premission error somewhere, but I just cant figure it out.
Plex starts up fine before I add the database.
Should i make a new coppy on the database with tar ?

Sure I can let Plex make a new database and I need to wait a few weeks for it to download all the subs, then sit a day or two and update our watched list and then daughters watched list again. But its getting really boring lol


//Magnus Svensson
 
Joined
Apr 9, 2015
Messages
1,258
Exactly how are you installing plex? Plugin or via package?

When you move the database over are you giving ownership to plex?

From what I can tell of my pkg install of plex it should own everything in the directory in question.

Code:
drwxr-xr-x   5 Plex  972       9 Apr  5 17:46 Cache/
drwxr-xr-x   3 Plex  972       3 Oct  9 00:46 Library/
drwxr-xr-x   3 Plex  972      44 Apr  5 17:46 Logs/
drwxr-xr-x   3 Plex  972       3 Oct  9 01:30 Media/
drwxr-xr-x   2 Plex  972       2 Feb 23 14:17 Media Upload/
drwxr-xr-x   6 Plex  972       6 Oct  9 01:39 Metadata/
drwxr-xr-x   7 Plex  972       7 Oct  9 00:46 Plug-in Support/
drwxr-xr-x  17 Plex  972      17 Apr  4 16:35 Plug-ins/
-rw-------   1 Plex  972    2807 Apr  4 18:20 Preferences.xml
drwxr-xr-x   2 Plex  972       2 Oct  9 01:01 Scanners/
drwxr-xr-x   3 Plex  972       3 Oct  9 00:46 Thumbnails/


If you are installing via the plugin I would try doing a pkg install and then put the database into the new install minding the permissions of the original file and see if the problem still exists.
 

Magnus Svensson

Dabbler
Joined
Apr 5, 2016
Messages
33
I install it as a plugin.

Then I just mounted the database in the the jail.
So I need to change permissions on the database after I mount it in to the jail ?
Im going to test that when I get home.

//Magnus Svensson
 
Joined
Apr 9, 2015
Messages
1,258
When you copied it or moved it the permissions likely did not stay the same. If you used a root account it would more than likely taken on root permissions.
 

Magnus Svensson

Dabbler
Joined
Apr 5, 2016
Messages
33
Thanks.

I sshd into my server quick and checked it.
The files in the database are root:wheel.
I installed a a new plex jail and checked it. The permission was plex: plex.

I'm going to change permission on the folder later and test that.

//Magnus Svensson.
 

Magnus Svensson

Dabbler
Joined
Apr 5, 2016
Messages
33
Wonderful!
It's working.

I changed the permission on plexdata to plex: plex and restarted the jail and it just started.

Thanks so much :smile:

//Magnus Svensson.
 
Joined
Apr 9, 2015
Messages
1,258
No problem. It took me a little while to figure out permissions so that my plex was able to delete things I didn't want to keep rather than to manually have to go find the file one at a time. It was a learning experience to say the least but I got it figured out and while it may not be the way others have posted I can replicate it and use the same method for Syncthing.
 
Status
Not open for further replies.
Top